Garden 2 March updates


Enemy respawn when resting at a save point

To make enemies respawn when the player rests at a save point, I went back to the enemy spawner and created an event that spawns new enemies in place of defeated ones. It simply goes through an array of killed enemies checking if they should be respawned and then removes the enemy from the array.


The event that respawns enemies.

To prevent duplicate enemies from spawning when resting after loading the level, I created a second event that clears the respawning enemies from the array when the level is loaded.


Clearing respawning enemies from the killed enemies array.


I noticed that removing an item from an array that is being looped through caused the next item's index to drop by one and it would not be included in the loop, always "skipping" the next index after an item is removed. So any changes are made in a temporary copy of the array and after the whole loop is finished the original array is updated with the information from the copy.


Updating the boss with a new AI

In the blog post about the first playtest I mentioned that I wanted to create another boss that would be a more traditional action RPG boss. For that purpose, I changed the enemy behavior tree to have much more control over the boss' actions. While the additional boss was created a while ago, I also wanted to include the first boss in an upcoming playtest, which required adjusting its actions to work with the new behavior tree. It took a few days of adjusting the boss' blueprint and testing it all to have it work as it originally did.


Now with the two bosses, the game has all of its playable content in place and is ready for playtesting. Of course there is plenty of work left after that, but it's mostly related to creating assets and telling the story with dialogue and cutscenes.