Increasing difficulty algorithm

Started by
12 comments, last by LorenzoGatti 5 years, 11 months ago

I would separate these into their own algorithm. I would evaluate each variable one at a time and come up with a scale that determines the value for the next wave. numBricks = f(waveNumber).

Type of Bricks would have to be based on a sliding two-point scale where you have min and max values that increase but this would have to be done extremely slowly and there would eventually have to be an upper limit. If that doesn't work, you can base the scale's starting point on the current level of the players power-up. If they do 10 damage then start spawning 10-hit bricks to 50-hit bricks. You can't overpower or under-power so it all has to be relative to the players variables. Just a little stronger than the player's current variables.

The speed of bricks will also eventually reach a limit as they cannot fall faster then the player can see or the height of the screen so I would say the more hits a brick needs, based on player's strength, the slower it falls. That's a simple algorithm.

How often power-up spawn can be the greater the wave the less often the power-ups appear or based on the strength of the player. The stronger they are the less they spawn. Or have it spawn power-ups over random time intervals.

You want to make the game fun not just increase all the variables until they player is overwhelmed. Or maybe you do? I would make all variables relative to the player and the wave level.

Maybe try dividing the players variables by the wave level and using those values as scales?

or try using 1/wave to give you a unit scale to work with. The number gets smaller as the wave increases and this can be multiplied by other numbers to give you your values. Or maybe look into training a genetic-algorithm or neural-net that takes the player's variables and wave number to generate those values for you.

Hope that gives you some ideas.

 

Remelic

Advertisement

Thanks for the ideas. I think this is going to be a big help.

It is a level design problem, but the "level" it applies to, as already noted, is not a single wave of enemies but the actual unit of play: a whole session, from the first wave to losing as the game becomes too difficult.

I think the main question that should guide you is how you want your players to lose. There are good and bad ways to fail.

  • Because a brick appeared and reached the bottom faster than it could be reached and shot? Quite unfair.
  • Because their firepower cannot possibly be enough for very many, very resilient bricks? Rather unfair, because skill should give the player at least a slight hope of progressing further.
  • Because they failed to address some particularly dangerous brick, shooting low priority ones instead? Much better.
  • Because they missed a needed powerup, falling into a firepower problem? Also good.
  • Because they aimed badly and wasted bullets? Another important facet of player skill.
  • Because of many little mistakes with a cumulative effect? Great, provided the player is aware of the mistakes.
  • Because they got tired or their joystick and button fingers began to hurt? Acceptable, provided the game wasn't boring and overly long.

I suggest ensuring that there is a way for a player of perfect skill to beat ANY wave. Not only powerups need to increase proportionally when bricks are more numerous and tougher, there must be an actual way to shoot them all efficiently and not too late. For example, a player ship with slow lateral movement could waste too much time in front of gaps with nothing to shoot at, reducing its effective damage output.

An AI playing the game according to heuristic rules and with perfect aiming could provide a useful benchmark (if it loses, the level has a problem; if it wins, players can win too).

I suggest increasing difficulty in the first part of the game, as a warmup, then varying enemies, formations and powerups without actually increasing difficulty. Sooner or later the player will fail to solve some unexpected efficiency puzzle.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement