AXEL FRANZÉN

SYSTEMS & ENGINE PROGRAMMER

AI WAVE TOOLS

Our eighth game Pirats is a wave-based action game that required great control of how the enemies behaved, not only on an individual level but also as a group. We wanted to be able to balance how difficult each wave would be as well as controlling where the enemies would initially appear from and where they would run. To allow our level designers to easily tweak these things I made two tools in the Unreal Editor that could export the data we needed when starting the game in our own engine.

path point editor


Since we didn’t want the enemies to just navigate the absolute closest way to run towards their goal we used linked path points that they would try to approximately reach before moving on to the next one. We also wanted the path to be able to branch, letting some enemies take another path than the rest. For this we had a special path point that would be linked to two “output”-points and the enemies would arbitrarily pick one of the branches to go down.

These path points would be exported and loaded in together with the rest of the level where the enemies would discover the first point as they spawned in.

Enemy wave editor


The way the game and the levels are set up is that there are two spawn points for enemies to come from and one wave of enemies can be split between these two spawners. A wave is built up out of groups of enemies that spawn at the same time and each group has a short customizable delay before the next group will spawn. Once all groups have been defeated the wave is over and the players get to breathe out, pick some rewards and place traps around the level.

The tool uses the DataTable asset type in Unreal Engine to store the data which can be exported directly to JSON which the game then reads from on level load.

These two editors were created through Editor Widget Blueprints and as there wasn’t a lot of time to develop this game I had to prioritize the main functionality and usability over the visual design and layout.
My main goal was to make it as pain free as possible to iterate on these wave setups as they were key to balancing the game, and it was important that importing and exporting couldn’t cause any work to be undone.