Unofficial Sil rewrite

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

    Unofficial Sil rewrite

    As I've mentioned over on the Beleriand thread, I'm doing a rewrite of Sil 1.3 based on modern Angband code. I knew going in that this was quite a task, and assumed it would take me some number of months; I'm currently aiming at six months (so end of June) to have something that compiles and runs, at least.

    Largely for my own future benefit, I'm going to give an outline of what's done and what's to be done at roughly the 4-month mark.

    Done:
    • Data files essentially done (some small tidying up required), along with most of the parsing of them;
    • Projection effects (balls, bolts, breaths etc);
    • Monster movement and AI;
    • Smithing (mostly - this was very difficult code, took over a month by itself, and will need a bunch of checking once I actually have a running game);
    • Songs;
    • Monster spells and other magic (staff effects, etc);
    • Combat, both player and monster.

    Not done:
    • Abilities (some work done on this for smithing);
    • Player calculations (the at-least-once-per-turn checking of all the player's gear, abilities etc to determine things like resistance, stats and skills);
    • Line-of-sight (another section of difficult code);
    • Chests;
    • Object and monster creation and management;
    • Dungeon generation.

    On the whole I'm pretty happy with how it's going. I hope it ends up being worth it
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.
  • Bill Peterson
    Adept
    • Jul 2007
    • 190

    #2
    Originally posted by Nick
    On the whole I'm pretty happy with how it's going. I hope it ends up being worth it
    I'm sure it will be, I'll certainly play it and will look for bugs as best I can. I would hope that you've left as much of the debug code in as you can.

    Have you left the vanilla tile graphics code in? Even though Quirk says it's impossible I'd like to take a stab at making at least the Gervais tiles work.

    After this project is finished are you thinking of being the maintainer for Sil 1.3, making updates and changes?

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9637

      #3
      Originally posted by Bill Peterson
      I'm sure it will be, I'll certainly play it and will look for bugs as best I can. I would hope that you've left as much of the debug code in as you can.

      Have you left the vanilla tile graphics code in? Even though Quirk says it's impossible I'd like to take a stab at making at least the Gervais tiles work.
      I will certainly be leaving debug code in. I'm planning to leave tile code in too, although I probably won't have tiles actually operational at first.

      Originally posted by Bill Peterson
      After this project is finished are you thinking of being the maintainer for Sil 1.3, making updates and changes?
      Hahahahahahaha

      The original reason behind doing this was to import a lot of it (combat and smithing at least) into Beleriand. It's safe to say that my plans for both projects are fluid.

      My initial aim with Sil is to get it running and to be close (but possibly not identical) in gameplay to actual Sil 1.3. I don't actually know the game well enough yet to start changing it in a serious way, but anything is possible.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Quirk
        Swordsman
        • Mar 2016
        • 462

        #4
        Originally posted by Nick
        • Chests;
        • Object and monster creation and management;
        • Dungeon generation.
        I would recommend adopting a different approach than Sil does here, but there will be some consequences which are tricky to predict or debug.

        Sil's object/dungeon generation approach is to throw stuff at the wall and see if it sticks. Probabilistically, eventually it will. See for instance the while(TRUE) loop in generate_cave() in generate.c.

        This is bad; it's an algorithm not guaranteed to terminate. It would be preferable to throw the entire thing away and use a deterministic algorithm.

        For dungeon generation it's unlikely people will notice a difference. With object generation (one infinite loop here being in place_object in object2.c) the critical question has to do with mapping the way rarity works across, so the rarest items don't become significantly more or less rare. Understanding the failure cases from get_obj_num and how they actually impact the rarity calculations will be necessary if approximation of Sil 1.3 behaviour is desired.

        Both of these are pieces of work I have long put off. It's possible they're not as gnarly as they look. From a Beleriand perspective it is probably more important to have comprehensible object generation and rarities that map to real percentages, so it may not be not worth devoting too much effort to replicating 1.3 behaviour unless you anticipate people playing this instead of original 1.3; this is a constraint I have that you possibly don't.

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9637

          #5
          Originally posted by Quirk
          ISil's object/dungeon generation approach is to throw stuff at the wall and see if it sticks. Probabilistically, eventually it will. See for instance the while(TRUE) loop in generate_cave() in generate.c.
          Thanks, that's very useful advice. Angband has done a lot of removing of these non-terminating cases, so I'm likely to be able to just adopt existing code; your point about maintaining the probability distributions is a good one, though.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9637

            #6
            Originally posted by Nick
            I'm currently aiming at six months (so end of June)
            Hahahahahahahahahahahahahahahahahahahaha not even close
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • Nick
              Vanilla maintainer
              • Apr 2007
              • 9637

              #7
              Update on the original post; I have now done:
              • Abilities;
              • Player calculations;
              • Object generation and (mostly) management;
              • Chests.

              So this leaves:
              • Monster creation and management;
              • LoS (*shudder*)
              • Dungeon generation;
              • Character creation and game start (which I forgot about before);
              • Anything else I've forgotten.
              Note that these are the bits I'm aiming to get done before even trying to compile, run and play the game; some things (like the tutorial) I will add later.
              One for the Dark Lord on his dark throne
              In the Land of Mordor where the Shadows lie.

              Comment

              • backwardsEric
                Knight
                • Aug 2019
                • 527

                #8
                Originally posted by Nick
                Note that these are the bits I'm aiming to get done before even trying to compile, run and play the game; some things (like the tutorial) I will add later.
                I have changes for Angband 4.2 to allow for a tutorial mode and have the tutorial layout driven by a data file (rather than a special save file as in Sil). It still needs some tidying and more work on the draft tutorial in the data file. Because it introduces a new object type for the tutorial notes, it also breaks moving save files back and forth from other 4.2 versions. I'm not planning on putting it forward as a pull request until we've started making save file breaking changes for 4.3.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9637

                  #9
                  Originally posted by backwardsEric
                  I have changes for Angband 4.2 to allow for a tutorial mode and have the tutorial layout driven by a data file (rather than a special save file as in Sil). It still needs some tidying and more work on the draft tutorial in the data file. Because it introduces a new object type for the tutorial notes, it also breaks moving save files back and forth from other 4.2 versions. I'm not planning on putting it forward as a pull request until we've started making save file breaking changes for 4.3.
                  That sounds brilliant
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • davidk64
                    Rookie
                    • Jul 2009
                    • 17

                    #10
                    Thanks for the updates Nick (and backwardsEric). I check the forums each day hoping for news of Beleriand. I'm looking forward to seeing it!

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9637

                      #11
                      Another update - I've done the monster creation and management stuff, and dungeon generation. I'm now working on the main game loop, and then will do a big pass through both codebases to see what I've missed and remove unnecessary code. Then I'll try compiling.

                      I'm going to leave LoS until I have an actual running game - it can be part of the process of making sure it plays the same.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • Stokviz
                        Rookie
                        • May 2020
                        • 3

                        #12
                        Just found your thread. I want to let you know that your effort is greatly appreciated and I can't wait to see you finish the project.

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9637

                          #13
                          Originally posted by Stokviz
                          Just found your thread. I want to let you know that your effort is greatly appreciated and I can't wait to see you finish the project.
                          I hope you can wait at least a bit
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • Bill Peterson
                            Adept
                            • Jul 2007
                            • 190

                            #14
                            Originally posted by Nick
                            I hope you can wait at least a bit
                            When you have a build that compiles and runs past character creation, will you be making it available for alpha/beta testing?

                            Comment

                            • Nick
                              Vanilla maintainer
                              • Apr 2007
                              • 9637

                              #15
                              Originally posted by Bill Peterson
                              When you have a build that compiles and runs past character creation, will you be making it available for alpha/beta testing?
                              That's the idea. I'll probably play a little first to iron out the really obvious stuff, but then other people are going to be much better at finding flaws than me.
                              One for the Dark Lord on his dark throne
                              In the Land of Mordor where the Shadows lie.

                              Comment

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