Posted March 06, 2019 by ibGoge
Rats are Deadly
Getting out numbered can quickly turn for the worse. Rats nests can spawn now, and they spawn rats. They spawn a whole mischief of rats. The new build has 1 rats nest spawning in the courtyard with you, no art yet so its sprite is a 'n'. It will spawn rats at a set delay until its limit is hit. If a rat dies it will spawn the next rat after the delay. The nest itself is also a mcguffin and needs to be destroyed before you can move on to the next castle. So far its more game then the engine has ever been before which I am happy about!
Tech Today
The rats nest entity uses an ai behaviour tree to determine if it should spawn a new rat. When it thinks it should it adds a spawnEntityType action to the Actions system. There was no way to know what the new id of the new entity would be after the action system was done with it next tick, so I had to jury-rig up an event system.
To-Do (in order of progressive delightfulness)