Conquering Ciros Week 5: Enemy Spawn-Rate Tools

Published February 11, 2024
Advertisement

This Week's Work:

Moving on from synergies and other new features, we're going into full balance and polish mode. One of our biggest points of feedback from gameplay testing has been gameplay length and difficulty. After a few minutes, the spawn rates get really overwhelming, and the whole screen will be full of enemies. This could be good in theory, but the enemies are too strong (or our abilities are too weak) to make it fun. A while back, I implemented Block spawning and Line spawning (a la Vampire Survivors), which made the spawning more unpredictable and dynamic, but also increased the overall spawn rate unintentionally. We want designers to be able to tweak the spawn rate of specific types/groups of enemies easily without digging through scripts, so I wanted to make an easy-access tool in the Inspector.

Before
After

Unfortunately, the values for things like Block and Line size are in a separate script from the kill “thresholds”, so I also had to update that script to add the new enemy groups.

Before
After

Most of the code was pretty basic, just changing certain values to Ranges in order to restrict their min/max value (and add the slider to the inspector). However, adding the new buttons to spawn Line, Block, and Circle groups of enemies was a little challenging. The default spawning functions are all tied in with a bunch of other functions, like checking if a boss should spawn, getting number of kills, checking if spawning is available, etc. But I needed to isolate just the parts that would spawn the enemies, so that they would always spawn when you click the button. I did this for Lines, Blocks, and Circles, but I'll just show the Block code as an example:

The main function that spawns Block groups during normal gameplay
The spawning function used by the newly added button
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement