Angband Java port

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • strangeintp
    Rookie
    • Jan 2008
    • 13

    Angband Java port

    Hopefully I'm not stirring up a nest of nether worms or commiting some other dreadful faux pas, but I'm testing the waters to see what kind of interest there might be in the Angband community for developing a Java port of Angband. I'd been wanting to develop a 2D tile based version of Moria for a while, and even started a Sourceforge project about a week ago (Jmoria - there's nothing in it right now), but then I discovered Angband, and I love the gameplay features added on to the classical Moria.

    So now I've set my sights on porting the 2D tile based Angband version to Java, with all the attendant benefits (cross platform, expandibility, maintainability, etc.) I know, a lot of time and code has already been invested in the existing version, but would any developers like to join me in seeing it happen?

    I don't have any interest (at the moment) in making a signifiant variant, just porting the latest version to Java. Eventually I'd like to add network play for small groups of players, but that would be after getting the single-player version out.

    If you're interested, let me know (either here or in the sourceforge jmoria forum)
  • pav
    Administrator
    • Apr 2007
    • 793

    #2
    What would be the target platform? PC? Phones? Consoles?
    See the elves and everything! http://angband.oook.cz

    Comment

    • strangeintp
      Rookie
      • Jan 2008
      • 13

      #3
      good question. I was thinking PC's, but now that you mention it, anything that runs a JRE could be a target platform. I'm not sure I'd want to try playing on a PDA, but I suppose if one needed one's Angband fix on the go, that could be a possibility!

      Comment

      • takkaria
        Veteran
        • Apr 2007
        • 1951

        #4
        Originally posted by strangeintp
        So now I've set my sights on porting the 2D tile based Angband version to Java, with all the attendant benefits (cross platform, expandibility, maintainability, etc.) I know, a lot of time and code has already been invested in the existing version, but would any developers like to join me in seeing it happen?
        Cross-platform, expandability and maintainability are all things we currently have. I'm naturally resistant to the idea of a Java version, just because I can't get any bloody Java apps working on my linux machine at the moment, but many people have suggested this, started, and ultimately failed. I wish you good luck if you want to try and rewrite the game, but I'm not sure it's worth it.
        takkaria whispers something about options. -more-

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9647

          #5
          Originally posted by takkaria
          Cross-platform, expandability and maintainability are all things we currently have. I'm naturally resistant to the idea of a Java version, just because I can't get any bloody Java apps working on my linux machine at the moment, but many people have suggested this, started, and ultimately failed. I wish you good luck if you want to try and rewrite the game, but I'm not sure it's worth it.
          Agreed; I don't really think it's the best use of effort. What would be nice is a front end for the existing game that runs as a Java app or in a web browser or some such. Sounds easy when you say it quickly.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • zaimoni
            Knight
            • Apr 2007
            • 590

            #6
            Originally posted by Nick
            What would be nice is a front end for the existing game that runs as a Java app or in a web browser or some such.
            Looking at nethack.alt.org, it appears the easy way would be a telnet front end which has a Java applet coming in.
            Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
            Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
            Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

            Comment

            • Zero
              Apprentice
              • Jan 2008
              • 83

              #7
              I wholeheartedly support the porting of Angband to Java. In fact, I've had the same idea for the last week or two, since I've started playing Angband again.

              I am a professional Java programmer, but inexperienced and I've been thinking that a project like this would be good for my resume and would sharpen my skills.

              I understand the resistance to Java by other developers. My own opinion of Java was poor back when I was purely C/C++, but since learning the language I have come to appreciate how it simplifies a lot of what can make C and C++ programming frustrating. It is just a nice language to work with, and the performance of the JVM has improved greatly since Java's early days.

              If I was going to do a Java Angband though, I'd change certain things. For one, I'd move as much to the edit files as possible, even things like resistances, monster types, and spells. The edit files themselves could also be converted to XML format, to simplify the code needed for edit file read/writing. I'd also change the UI so it is better suited for modern screens. Basically, there are a lot of things about Angband that could be made modifiable without recompilation, that currently require source code changes. Let me say, however, that Angband is hands-down one of the BEST designed pieces of software I have ever seen. I really have to congratulate Ben Harrison and Robert Ruehlmann for their amazingly well polished code, and I am sure that Andrew has and is continuing their quality work.

              This would be a long project, and I'm not sure if I can commit to the kind of time that would be required for it. But since you're asking to see if there's interest, yes, there's definitely interest.

              Comment

              • strangeintp
                Rookie
                • Jan 2008
                • 13

                #8
                Originally posted by Zero
                I wholeheartedly support the porting of Angband to Java. In fact, I've had the same idea for the last week or two, since I've started playing Angband again.

                I am a professional Java programmer, but inexperienced and I've been thinking that a project like this would be good for my resume and would sharpen my skills.

                I understand the resistance to Java by other developers. My own opinion of Java was poor back when I was purely C/C++, but since learning the language I have come to appreciate how it simplifies a lot of what can make C and C++ programming frustrating. It is just a nice language to work with, and the performance of the JVM has improved greatly since Java's early days.

                If I was going to do a Java Angband though, I'd change certain things. For one, I'd move as much to the edit files as possible, even things like resistances, monster types, and spells. The edit files themselves could also be converted to XML format, to simplify the code needed for edit file read/writing. I'd also change the UI so it is better suited for modern screens. Basically, there are a lot of things about Angband that could be made modifiable without recompilation, that currently require source code changes. Let me say, however, that Angband is hands-down one of the BEST designed pieces of software I have ever seen. I really have to congratulate Ben Harrison and Robert Ruehlmann for their amazingly well polished code, and I am sure that Andrew has and is continuing their quality work.

                This would be a long project, and I'm not sure if I can commit to the kind of time that would be required for it. But since you're asking to see if there's interest, yes, there's definitely interest.
                Zero, it sounds like we think along similar lines. The project is actually something of a resume/experience builder for myself as well, in addition to the fact that I've always wanted to get into game programming.

                Changing the edit files to a more human-readable code is something I had in mind, and parsing in Java is relatively painless (in fact, writing an auto-converter would not be difficult). When I mentioned not changing much, I was really referring to game play features - I'm not really setting out to make an Angband variant per se.

                To address comment by previous poster - By no means did I intend to malign the existing code base; after looking through it, I can certainly appreciate the effort that has gone into (and it's especially nice to see the C code well documented - I intend to use that code extensively as a reference). But having moved from C to C++ to Java myself, I'm a big proponent of the language. Just as an e.g. - I haven't been able to get the graphical version running on my Linux box; that wouldn't be an issue with Java.

                Additionally, I'll be doing a fair bit of the coding on a Linux platform anyways, so there should be a pretty good chance that incompatibilities are minimized (though I have yet to encounter any issues myself).

                I did notice that at least one Java port has been attempted (see JAngband) and petered out. I think part of the problem is that the developer tried to tackle too much at once (in addition to real life butting in, I'm sure). I think the project can be broken down into reasonable bite size pieces and incrementally chipped away it. For version 0.0.1, for example, I have in mind a canvas displaying a single room (with graphics from the Gervais tile set), in which the player moves around.

                In any case, I'm starting the project, and will try to get a foundation code base - or at least s/w spec - posted into the sourceforge project in the near future (one to two weeks). I welcome any assistance anyone wants to provide. And of course, it will be GPLed.

                Comment

                • takkaria
                  Veteran
                  • Apr 2007
                  • 1951

                  #9
                  Originally posted by strangeintp
                  I haven't been able to get the graphical version running on my Linux box; that wouldn't be an issue with Java.
                  No, the problem would be getting it working at all.

                  In any case, I'm starting the project, and will try to get a foundation code base - or at least s/w spec - posted into the sourceforge project in the near future (one to two weeks). I welcome any assistance anyone wants to provide. And of course, it will be GPLed.
                  I would note that it pretty much has to be GPL'd if you're using the current code as a reference, in the same way that Angband retained the original Moria licence having being ported from VMS Pascal.
                  takkaria whispers something about options. -more-

                  Comment

                  • takkaria
                    Veteran
                    • Apr 2007
                    • 1951

                    #10
                    Originally posted by Zero
                    I understand the resistance to Java by other developers. My own opinion of Java was poor back when I was purely C/C++, but since learning the language I have come to appreciate how it simplifies a lot of what can make C and C++ programming frustrating. It is just a nice language to work with, and the performance of the JVM has improved greatly since Java's early days.
                    My opinion of Java is completely unrelated to whether I think it's a good idea to port the game to it -- I don't think it's a good idea to port Angband to python, or Lua, either, and I really really like Lua. It's just that it seems you gain no real advantage in doing so. If you're not changing the gameplay at all, then no-one will be particularly interested in playing it over the C version, and if you do change the gameplay, you might as well write a roguelike from scratch, simply because that would be a much better learning experience.

                    (I might seem to contradict myself at a later date if I claim that I want to put large chunks of my Angband variant into Lua and try and keep the amount of new C code to a minimum, but that's different-- that's replacing chunks of the game at a time with better code as necessary to achieve my ends.)

                    If I was going to do a Java Angband though, I'd change certain things. For one, I'd move as much to the edit files as possible, even things like resistances, monster types, and spells.
                    The edit files themselves could also be converted to XML format, to simplify the code needed for edit file read/writing.
                    Some years ago my brother Antony wrote a slimline XML parser for Angband, and we experimented with putting the edit files in XML. The problem then became not not knowing what all the values meant, but rather being able to fit more than one entry on the screen at any given time. Leading me to believe that one would seriously need a dedicated editor to edit such XML files. At that point, I gave up on the idea... given the choice between editing a compact format with a text editor, being able to use sed and grep and all the other unix tools that I do, or using an editor I have to write myself and keep up-to-date that doesn't allow me to use grep &c., I'll take the compact text format anyday.

                    There are plans afoot to change the format during the 3.1.x release cycle to something ever-so-slightly more verbose but still proprietary... but I'm still not sure if it's worth it.

                    I'd also change the UI so it is better suited for modern screens,
                    That's one of my goals with the main Angband branch, though nothing much is happening in that area for a while.

                    Basically, there are a lot of things about Angband that could be made modifiable without recompilation, that currently require source code changes.
                    You might want to take a look at what Andrew Doull's done in UnAngband wrt spell effects, and putting those into edit files. Though the implementation is in C, the ideas are still well worth looking at.
                    takkaria whispers something about options. -more-

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9647

                      #11
                      Originally posted by takkaria
                      No, the problem would be getting it working at all.
                      Rewriting Angband in a different language is kind of like entering the Paths of the Dead - you'll be constantly stepping over the skeletons of those who went before you. Or the Fire Swamp. It's not that you can't get through, it's just that no-one ever has.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • strangeintp
                        Rookie
                        • Jan 2008
                        • 13

                        #12
                        hm, I'll ignore fatuous comments and naysayers for now, and give it a shot. Better to have tried and failed, etc.

                        Wrt game play features - I fully expect that once the basic port is done (w/o game play variance), game play feature improvement/creep can occur. In fact, that would be a major advantage in going to Java - those features can be added with greater ease. Not that it can't be done in C, it's just easier in Java (without getting into a debate about the relative merits of various programming languages, I'll just make that statement as fact), especially if the code base is designed and documented comparable to what I've seen in Angband.

                        The point behind doing a straight port w/o gameplay feature additions/changes is because it's much easier to start from a known baseline, without having to worry about designing balanced game play. And of course, it keeps down the potentially endless do-loop of feature creep before getting a working product out the door.

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9647

                          #13
                          Fatuous? I thought it was ... deep ... *snif*

                          Also, to have the best shot at success (and don't get me wrong, I'd love to see you succeed), it seems like a good idea to go in with your eyes open. There is only one comparable project that I know of, although there have been a number of "I'm going to rewrite Angband in language x" posts to the newsgroup. This is probably because it's a sizable amount of effort to provide similar to existing functionality. In the end, you need to have a good enough reason to complete such a thing; my advice is to try and work out now whether you have a good enough reason.

                          Good luck
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • strangeintp
                            Rookie
                            • Jan 2008
                            • 13

                            #14
                            Originally posted by Nick
                            Fatuous? I thought it was ... deep ... *snif*

                            Also, to have the best shot at success (and don't get me wrong, I'd love to see you succeed), it seems like a good idea to go in with your eyes open. There is only one comparable project that I know of, although there have been a number of "I'm going to rewrite Angband in language x" posts to the newsgroup. This is probably because it's a sizable amount of effort to provide similar to existing functionality. In the end, you need to have a good enough reason to complete such a thing; my advice is to try and work out now whether you have a good enough reason.

                            Good luck
                            I wasn't referring to your comment as the fatuous one, Nick (yours was more amongst the naysayers hehe). But you're right, going in with eyes open is always a good idea. As for reasons, I think I've already got quite a few good ones:

                            - Learn Java more better, especially as regards to larger projects
                            - Produce something for once (I have yet to produce a working product - I usually get stuck in the design stage)
                            - Provide a port of Angband that's more easily expandable and much easier to port across platforms.

                            And if that wasn't enough, you guys have now given me a challenge, and I don't back down from one (especially when I'm convinced it's achievable)!!

                            Thanks for the tip on langband, I'll check it out.

                            Comment

                            • Zero
                              Apprentice
                              • Jan 2008
                              • 83

                              #15
                              I definitely understand what you're saying about not changing the gameplay until you get something out the door that works. But, I really hope you're not thinking of line-by-line translating the existing C code.

                              Having overall _gameplay_ that is the same as Angband or very close to it would be ideal, but I'd suggest designing the program from scratch. Come up with a list of classes, and describe in English what each of their members and methods would do. I wouldn't even write a single line of code until the design is finished.

                              Cross-platform, expandability and maintainability are all things we currently have.
                              For a C program, yes. Writing the game in Java would improve these tremendously, though. I still haven't been able to get Angband to compile, even following the detailed list of instructions Doull provided. But I can take Java code from anywhere and get it to run easily.

                              The easier it is to modify Angband, the more interest people will have in doing so.

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎