In arcade, pre-designed levels, or other linear story-based games, it’s pretty common to encounter pre-scripted enemy AI spawning in pre-set paths. This is so the level-design goes hand-in-hand with combat mechanics. However, the team and I at Unidad Moribunda had a vision of creating a linear campaign with open-world mechanics which meant we couldn’t place enemies in a predetermined path; we needed respawning, and unpredictability to vary the player’s reflexes.
To do this, I created two main spawning systems: seamless spawning and triggered spawning. Seamless spawning would spawn enemies in an area in a “seamless” way: meaning they could only be created at a certain distance while the player wasn’t looking. They would be inserted into the game world without the awareness of the player. Triggered spawning, on the other hand, would spawn zombies in a more direct way: when creating waves of them coming for the player, or spawning them in heavy-packed action levels.
The system had a plethora of functions to deal with different scenarios of spawning within those two main “methods.” I had taken a look at the enemy design for Left 4 Dead and had loosely inspired myself in their enemy spawning mechanics. The end result was a flexible all-in-one solution to create anything from wave-based survival games, to open-world stealth, to action-packed levels.