Rewriting Simulation State Transitions


This weekend was weird. My goal was simply to make sure that when the player clicks on a target region to initiate the tribal migration process, a decision would spring up to confirm the choice as shown below:


Which, after the player picked the choice, would apply the effects of the action and then let the simulation continue running... 

Trying that to work was a pain, and I ended up rewriting quite a bit of how the game handles the transition from running simulation to pause simulation and vice-versa. One of the internal changes I made is that now decisions behave a bit more like actions where the effects of a choice are not processed in a single step like before. Rather, the game will go through each effect and make requests from the player as needed (which won't normally happen unless the effect is modded to do so). This change only applies to decisions coming from mods. So to complete the work, I will eventually need to get rid of the last hardcoded decision that is still on the game. But I'll leave that for later.

The new state transition code works seemingly well, so now I'm going to work on making sure that the choices on the decision actually do something beyond just resuming the game. This should be something quite simple, but I'm pretty sure there will be more surprises that will make me scratch my head for a while...

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

This is amazing!!