A requirement for our sixth game project at The Game Assembly was to implement nodescripting in our custom engine. I saw an opportunity to create an Enemy Spawn tool for our Level Designers. The concept was to combine nodescripting with trigger spheres to create a dynamic Enemy Spawn System.
At the start of the project I sat down with our Level Designers and discussed what function nodescripting would have in our game. Since our game is a First-Person Shooter based on Call of Duty Zombies — our enemies spawn in waves and become progressively more difficult to defeat — it was a natural choice to create nodes that influenced enemies. Together we discussed and sketched out a plan for how this process could be customized through visual scripting. Initially the plan involved more nodes, where every node handled its own enemy stat.
However, as I started to write the first node I realized it would be efficient to combine all the enemy stats into a singular WaveConfiguration node. The script would be less cluttered, and the experience would be streamlined for the Level Designers to easily tweak the values in a single place.
When I presented the nodescripting for the other programmers in my group it was easy and straightforward to explain because every customizable enemy stat was gathered in one place:
The Trigger Spheres are instance editable and have a vector with IDs consisting of integers. Every Enemy Spawner has a unique ID. A Trigger Sphere can be connected to multiple Enemy Spawners.
When the player enters a Trigger Sphere the active spawn points are changed to the Enemy Spawners with the corresponding IDs. As the player progresses through the game they will collide with these Trigger Spheres and the enemies will spawn dynamically depending on the player's location.