It looks ridiculous when all enemies attack the player at once. And it’s frustrating. We need to globally throttle the attack rate.
Inspired by this fascinating Doom talk, I implemented a token system. Before each attack, enemies must acquire a token for it. After the attack and some cooldown period, the token goes back into the “free” pool.
Changing the number of available tokens for each attack type and tweaking the cooldown periods are an easy way to adjust overall difficulty.
The state of the token queue can be used to determine pressure on the player. This will be a useful input for the dynamic sountrack…