Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Restructure update (http://angband.oook.cz/forum/showthread.php?t=6673)

Nick April 5, 2014 01:14

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.

krazyhades April 5, 2014 03:15

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

Mondkalb April 5, 2014 09:10

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. :D
Thanks to all involved.

AnonymousHero April 10, 2014 15:13

Quote:

Originally Posted by Mondkalb (Post 91167)
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. :D
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

Nick August 6, 2014 02:38

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

debo August 6, 2014 03:53

No rockets? What's even the point

mrrstark August 6, 2014 04:25

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!

Derakon August 6, 2014 05:10

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

buzzkill August 7, 2014 02:04

Neat :).....

Lionmaruu August 7, 2014 04:01

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


All times are GMT +1. The time now is 20:21.

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