Restructure update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    Restructure update

    When I started as maintainer at (roughly) the beginning of the year, I made it fairly clear that the first thing to do was a big restructure of the code. It seems like now might be a good idea to talk a bit about how that's going.

    At the start I had a rough figure of a year to get the restructure done, and I think we're probably about on target. Here's an outline of what everyone's been doing:
    • molybdenum has rewritten a lot of code to clarify it, especially for spellcasting and objects, and added now low-level routines to enable more modularity (moving stuff to edit files, etc).
    • takkaria has completed a large chunk of the rewrite of the command system, and is showing signs of rewriting the event system as well - this is all to separate the game core from the interface.
    • I have clarified some data structures, reorganised dungeon generation and am currently reorganising objects.
    • The rest of the devteam have contributed to these efforts along the way, maintained and improved things like autobuilding of code, cleaned up my mistakes, and let me know when I'm doing something stupid without saying it in those words.
    • All of us have been cleaning out unnecessary garbage from the code whenever we find it.

    This is only a rough outline, and I've probably given people insufficient credit. There has been a lot of work done, and I for one am having a lot of fun with it.

    As an indicator of progress (and it's a pretty vague one), there have been about 350 individual code commits since 3.5 - this compares with on average about 700 between 3.3 and 3.4, and between 3.4 and 3.5.

    For anyone interested in more detail, the restruct branch is here.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.
  • krazyhades
    Swordsman
    • Jun 2013
    • 428

    #2
    Thank you for the news, and to all the developers for the work that goes into making Angband the best it has ever been.

    Comment

    • Mondkalb
      Knight
      • Apr 2007
      • 982

      #3
      It is beyond me how anybody can take on such a Sisyphean task and then call it fun. Still, I hope I will be enjoying the final output.
      Thanks to all involved.
      My Angband winners so far

      My FAangband efforts so far

      Comment

      • AnonymousHero
        Veteran
        • Jun 2007
        • 1393

        #4
        Originally posted by Mondkalb
        It is beyond me how anybody can take on such a Sisyphean task and then call it fun. Still, I hope I will be enjoying the final output.
        Thanks to all involved.
        Believe it or not janitorial/maintenance coding can actually be fun, but perhaps only to the most masochistic of the species known as "programmers". There's nothing quite like deleting 2000 lines of code and having the thing work exactly like it did before (and perhaps even a little faster).

        Anyway... when's the C++/Qt rewrite going to happen? /ducks

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9634

          #5
          OK, 4 months since the last update, here's the highlights since then:
          • Slays, brands, numerical modifiers and element-related properties of objects are moved into their own structures instead of being flags
          • Identify information for objects is based on known properties rather than stages of ID
          • Player equipment slots are now part of a race-dependent body (currently there is only one)
          • All the player gear is now in one big structure, and the inventory, equipment and quiver are determined by analysing that (no more wielding to the quiver)
          • Hard-coding of object tvals and svals is gone, so objects can be safely added and moved around in object.txt
          • Special artifacts are handled straight from artifact.txt; an unrecognised object kind (like Phial) automatically has a new object kind defined for it
          • "Squelching" has been fully renamed to ignoring, and ignoring can now be done by ego type
          • Player spellcasting (which books, what spells are in them, what the spells do) is now fully defined in p_class.txt
          • Artifact activation definitions are now in an edit file
          • Object effects, trap effects and player spell effects now use the same effect code with details defined in edit files
          • Currently monster spells are being moved to an edit file and their effects are being rolled in with the others; the plan is to roll monster blow effects in with this too


          I was aiming for a year - with 4 months of that to go, I think I'll probably fall short. I'd be fairly confident about saying first few months of next year to release version 4.0
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • debo
            Veteran
            • Oct 2011
            • 2402

            #6
            No rockets? What's even the point
            Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'

            Comment

            • mrrstark
              Adept
              • Aug 2013
              • 101

              #7
              Curious: How is the UI -> Command Events -> Game Logic separation going?

              Also, with the player spellcasting changes, are either of these possible / easier to implement? (for a variant...)
              - Bookless caster?
              - Caster who can cast from multiple schools?

              Thanks for the hard work!

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #8
                Impressive work! This all sounds great from a modifiability standpoint. Great job, everyone!

                Comment

                • buzzkill
                  Prophet
                  • May 2008
                  • 2939

                  #9
                  Neat .....
                  www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
                  My banding life on Buzzkill's ladder.

                  Comment

                  • Lionmaruu
                    Scout
                    • Nov 2013
                    • 29

                    #10
                    Man the stuff is looking awesome! great things to come I hope.
                    Thank you for the info and all involved for the hard work!

                    Comment

                    • AnonymousHero
                      Veteran
                      • Jun 2007
                      • 1393

                      #11
                      Just for the stats freaks out there. As of now diffstat between restruct and master says:

                      412 files changed, 85994 insertions(+), 145252 deletions(-)

                      (The insertions/deletions stats are counting lines.)

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9634

                        #12
                        Originally posted by AnonymousHero
                        412 files changed, 85994 insertions(+), 145252 deletions(-)

                        (The insertions/deletions stats are counting lines.)
                        So we're winning by 60000 lines
                        One for the Dark Lord on his dark throne
                        In the Land of Mordor where the Shadows lie.

                        Comment

                        • mrrstark
                          Adept
                          • Aug 2013
                          • 101

                          #13
                          For those curious, is it possible to view the restructure branch?

                          Comment

                          • Nick
                            Vanilla maintainer
                            • Apr 2007
                            • 9634

                            #14
                            Originally posted by mrrstark
                            For those curious, is it possible to view the restructure branch?
                            Link in the first post
                            One for the Dark Lord on his dark throne
                            In the Land of Mordor where the Shadows lie.

                            Comment

                            • takkaria
                              Veteran
                              • Apr 2007
                              • 1951

                              #15
                              Originally posted by mrrstark
                              Curious: How is the UI -> Command Events -> Game Logic separation going?
                              It stopped several months ago because it's thorny and my free time got restricted. I still want to work on it but I'm struggling to find the time because the easiest way to progress would be to start a new frontend (like NPP is doing) and refactor the main code as I go to allow that to work. That's a huge task, though! And I'd need a block of time to work on it solidly to make any real progress, which I don't have.
                              takkaria whispers something about options. -more-

                              Comment

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