a3qz / hag

An ncurses procedurally generated roguelike dungeon crawler
Other
20 stars 18 forks source link

The enemy system sucks and should be rewritten #130

Open JohnathonNow opened 4 years ago

JohnathonNow commented 4 years ago

I question a lot of the design decisions here. Why is the enemy rulebook loaded in like it is? And why does enemy_add take in the list of attributes, rather than copying them from the rulebook, and then scaled according to the floor scaling rules? Also a lot of the logic seems scattered about - perhaps some wires should be tugged around.

dnabre commented 4 years ago

Separating the enemy data (along with items) from the code really helps keep things manageable. It also lets people that aren't comfortable working C code be able to contribute game data easily.

Something like a json file with the enemy data entries. Grouped by type, or even each one in separate file (easy to work with, but scaling may be an issue).

Those data files could used as is in the final build, pulled together into a data file, or even converted in automated way to be compiled into the executable.