# Any ideas for an algorithm for spawning enemies?

I am starting a countdown to spawn enemies for my personal S.I. after 80% of the previous wave's enemies have been defeated. I will have 4 different types of enemies. I need an algorithm to procedural generate which enemies get spawned in which rounds. I am thinking of creating a formula to spawn the enemies (all four types) in this format...

numRounds = batsSpawned (the easiest enemy that only follows the player)

(numRounds - 5)/2= cannonsSpawned (projectile enmies

(numRounds - 5)/3 = plugs (shoot electricity between eachother thus they will be spawned in 2s)

(numRounds - 5)/5 = enemy balls (moves in fast circles)

Any thoughts?

Is there any reason that it is numRounds - 5? You could make final / constant variables within your project that structure different levels of difficulty and when it activates each type of enemy?

Another thing I thought of is using the % operator on the numRounds variable and make it such that every enemy spawns on rounds that have a remainder of 0 when doing numRounds % 7, or have the bats and cannons spawn when numRounds % 5 is 0.

Are you planning on implementing more enemies?