Final Actions Refactor 🤞

Just completed the second major refactor of the actions system[1]. This time the end goal is being able to query the final game state for a lot of complex result data that I've been needing to display in previews but it's been too much of a pain to aggregate.

  1. Here's talking about the first

Because action lists are arbitrarily complex it's actually very hard to answer some specific questions like “what actors did I damage?” Or “who pushed me?” You want to record some events as you iterate but you don't want to write special event code for every action type which is what I was doing and it scaled horribly.

Anyway the new system feels elegant and just works for all cases including future complex cases in my imagination.

This is the endgame I think of this system, it feels really complete now which is good because it's the primary focus of my demo and I'm tired of hacking at it. I'm honestly really proud of myself for making something that is extremely complex and also straightforward to maintain and upgrade. My code tidiness has really saved me from a lot of headaches.

The main result of this is that turn highlighting telling you what your choices are going to do is finally comprehensive and complete.

The exciting future that this enables, however, is that enemy AI behavior can now know things like “Will using this ability here damage my target” so I can build a system where enemies have behavior goals and can use their abilities and check the results against their goals. If you want to read me ranting about enemy behavior in the complex actions system, you can do so here.

#gamedev #chron4

| 🌐 | 🙋‍ | @britown@blog.brianna.town