Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Sil (http://angband.oook.cz/forum/forumdisplay.php?f=12)
-   -   Unofficial Sil rewrite (http://angband.oook.cz/forum/showthread.php?t=11214)

Nick May 4, 2022 00:09

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 :)

Bill Peterson May 4, 2022 23:42

Quote:

Originally Posted by Nick (Post 158376)
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?

Nick May 5, 2022 08:06

Quote:

Originally Posted by Bill Peterson (Post 158379)
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.

Quote:

Originally Posted by Bill Peterson (Post 158379)
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.

Quirk May 5, 2022 18:56

Quote:

Originally Posted by Nick (Post 158376)
  • 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.

Nick May 5, 2022 23:19

Quote:

Originally Posted by Quirk (Post 158382)
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.

Nick June 26, 2022 01:31

Quote:

Originally Posted by Nick (Post 158376)
I'm currently aiming at six months (so end of June)

Hahahahahahahahahahahahahahahahahahahaha not even close

Nick August 7, 2022 01:10

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.

backwardsEric August 7, 2022 05:23

Quote:

Originally Posted by Nick (Post 159055)
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.

Nick August 7, 2022 13:17

Quote:

Originally Posted by backwardsEric (Post 159059)
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 :)

davidk64 August 8, 2022 01:31

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!


All times are GMT +1. The time now is 08:14.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.