AngbandOS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iggy_hunter
    Adept
    • Sep 2021
    • 106

    AngbandOS

    So I haven't frequented this forum in quite a while. But progress is still being made on the AngbandOS product.

    Home of AngbandOS
    https://angbandos.skarstech.com/


    Let me refresh everyone. AngbandOS is a refactor of Dean Anderson's Cthangband into a 100% object oriented and configurable game.

    The goal is for anyone to be able to create a new game without development experience. Aside from branding issues, games like Star Wars, Harry-Potter, Pokemon, Yugiok, Magic, lego etc should be easy to setup. Ultimately, I'm really hoping to be able to open the game up for anyone with new ideas to be able to contribute to the game without needing to be a developer.

    The github repo is available here:

    It has been 4 years since I started this and I'm still going strong. There are over 3k commits ... for anyone familiar with agile methodology, this is about equivalent to 3000 three to five point stories-which is a massive amount of development work. The game still plays as original Cthangband. Once I'm complete, I will send Dean a "Game-Pack" that represents the Cthangband variant that AngbandOS can play. The game current supports JSON for the configuration or pre-compiled "game-packs". The current implementation saves and restores JSON to a database. The game already has drivers to support text files, MySql and SQL server.

    One of the biggest differences, is that it has a native HTTP Angular 20 front-end. The front-end was also designed to support a 3D canvas. Expanding it with 2D tiles and even 3D models should be quite easy.

    I will also be looking to add AI into the game. There is front-end currently has chat capabilities and I'll add an AI persona to the chat. The AI should be able to interact with the game, given commands from the player.

    There are about 91 configurable objects at this time ... with about 20 more to do, plus scripts (which will introduce many additional objects).

    I'll provide more update soon.
    Iggy Hunter
    Last edited by iggy_hunter; June 8, 2026, 23:02.
  • iggy_hunter
    Adept
    • Sep 2021
    • 106

    #2
    Another key upgrade has been the "Replay" functionality. The game now streams keystrokes with timing data to a persisted storage. This allows us to be able to watch a complete game from the beginning. It also allows us to recreate a game, if something happens to the save file. If the game aborts, the stream is preserved and the game can be fixed and replayed and then continued by the player.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9411

      #3
      Nice, this is something that has been discussed as a possibility before (by Pete Mack, IIRC).
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Dean Anderson
        Adept
        • Nov 2009
        • 200

        #4
        By the way, in case you were wondering why everything's been quiet with the base Cthangband and it's had no commits for a few years, it hasn't been abandoned!

        Firstly, I lost my GitHub access so was unable to continue committing changes (but could still develop locally - and did make a new version that I distributed to my friends).

        Then I had another couple of major projects I was working on that took up most of my spare time for a while, so Cthangband went onto the back burner.

        Then I switched from using Windows to using Linux.

        Then, when I'd finished the other projects and tried to return to Cthangband, I could no longer run or compile it because WPF is Windows-only.

        So, after some looking round for a multi-platform alternative to .NET, I ended up on the Godot engine and, after making a Godot version of ULarn as practice and to learn the environment, I'm currently in the process of porting Cthangband to GDScript.

        Comment

        • iggy_hunter
          Adept
          • Sep 2021
          • 106

          #5
          I plan to add a slider to control the game watch speed. I'm perfecting the replay now.

          Comment

          • iggy_hunter
            Adept
            • Sep 2021
            • 106

            #6
            AngbandOS is vastly separated from the Cthangband source. I invite you to check out the source. I'm keeping the entire source, UI ... everything ... fully open to anyone. Updates occur many times a day. The capabilities in the game have grown vastly to take advantage of the newer technologies. The original code base is incredibly hard to modify, that is why complete new games outside of the Tolkien genre dont really exist. It is near impossible to create completely different character classes and races without simple renames and percentage tweaks. AngbandOS breaks that restriction completely. Now an unlimited number of character classes and races can be built from scratch or copied and modified. The ability to reorganize the screen (which are now all game widgets) is easy. Multiple windows, easy.

            Please check out the code. Your WPF version is still there, just set the startup project to your WPF.

            Comment

            • iggy_hunter
              Adept
              • Sep 2021
              • 106

              #7
              Also a note regarding conversion to a script language. There is a lot of code that was designed for performance. Double buffer screen, array access, etc. I'm skeptical that a scripting language would be able to maintain the frame-rate. AngbandOS took a hit to the frame-rate for HTTP support. I'm restoring some of the frame-rate with object oriented design because most of the switch case statements are gone. The maintainability index of the game went from a 31 to about 90.

              Comment

              • iggy_hunter
                Adept
                • Sep 2021
                • 106

                #8
                And oh, BTW Dean, if I ever forgot to mention it ... your conversion to C# was impeccable and a downright marvel. Thank you.
                Last edited by iggy_hunter; June 10, 2026, 17:16.

                Comment

                • iggy_hunter
                  Adept
                  • Sep 2021
                  • 106

                  #9
                  Also, Dean, if you want the easy route to a Linux Cthangband ... you can add a Linux front-end easily to AngbandOS.

                  1. The AngbandOS.GamePacks.Cthangband project contains your Cthangband variant. It has 7859 objects that compile into a library.
                  2. You can create and add a Linux front-end project to the solution. You only need to create an object that implements the IConsoleAndViewPort interface.
                  3. The AngbandOS.Core is the .NET 6 (Linux compatible) engine. You can call the GameServer object and give it your IConsoleAndViewPort object and your Cthangband variant configuration to run your variant.

                  Like I already mentioned, the WPFNet6 project is still mostly your original WPF version that is already doing steps 1-3 above for a Windows version.

                  It would only take a couple days to create your Linux version fully working with your variant. Also, I keep the projects sync'ed, so my updates can continually update your variant. Your variant is still missing several classes of objects--they are still considered Engine-level or system objects--until I move them into your GamePack.

                  Thanks
                  Iggy Hunter

                  Comment

                  • iggy_hunter
                    Adept
                    • Sep 2021
                    • 106

                    #10
                    On another note, I've been working on the save game functionality. A monstrous feat for such a large game. The game currently uses a .NET binary serializer, which is obsolete and Microsoft has removed it from the .NET. I have completed a phase 1 of a new polymorphic capable game state bag system that preserves the game and keeps the save game size small. Phase 1 has a couple deficiencies with saving the type name into the save file. This is a security vulnerability. Phase 2 removes this requirement. This effort has also brought to light a few defects during testing. To resolve the defects, I am using the replay functionality to repeat the testing. The replay system failed due to random number serialization. .NET does not support the serialization of the Random object. To resolve this chain of issues, I've wrapped the Random functionality into a two-layer generic object setup. The top layer resolves the fixed seed random generation that is used to restore towns (and drive the replay system). The lower layer abstracts the Random functionality, for which I have a Xoshiro256 algorithm ready to replace Microsoft's Random implementation. This helps support the replay and makes serialization easier. The System.Random currently has a workaround for serialization.

                    This opens the path to migrate the last of the objects that are still using the phase 1 version of the save game state bag into the game pack.

                    Once, those are complete, I'll be able to finish Phase 2 of the save game state bag functionality and remove all remnants of the phase 1 save game state bag. The save game state bag, I believe, can then be moved into a separate project--where AngbandOS can import that functionality.

                    Comment

                    • iggy_hunter
                      Adept
                      • Sep 2021
                      • 106

                      #11
                      I believe I found the defect for the replay. Run mode cancel feature is directly checking the key-queue, skipping the replay queue. The fix for this has exposed a deficiency where the thread sleep functionality is the responsibility of the input driver (IConsoleAndViewport). This deficiency allows the driver to control the thread on the server--which is not ideal. So I will update the input driver, by consolidating two methods into one and remove the thread sleep responsibility--which is awesome.

                      Comment

                      • iggy_hunter
                        Adept
                        • Sep 2021
                        • 106

                        #12
                        This brings me back to Deans endeavor for a Linux port. I understand there is a big Linux community for Angband. I will take a side endeavor to generate both a Linux console and Linux host ports. Let me finish perfecting the replay mode.

                        Comment

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