Skip to main content
added 349 characters in body
Source Link
Theraot
  • 27.5k
  • 4
  • 52
  • 79

You can use a weighted random. That means that you assign a weight to each possibility… Then to compute the probability of one of them, you divide its weight by the sum of all weights.

See How do I create a weighted collection and then pick a random element from it?.

Thus, you would be able to make one possibility (e.g. generating a bomb) more likely by increasing its weight, without reducing the weight of the others. This way their probability would never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.


Addendum: An alternative to increase the difficulty by making bad things more frequent, is to increase the difficulty by making good things less frequent. For example, if you introduce power-ups, you can make them progressively less frequent. Some power-up ideas:

  • Reduce speed
  • Invulnerability from bombs
  • Score multiplier

You can use a weighted random. That means that you assign a weight to each possibility… Then to compute the probability of one of them, you divide its weight by the sum of all weights.

See How do I create a weighted collection and then pick a random element from it?.

Thus, you would be able to make one possibility (e.g. generating a bomb) more likely by increasing its weight, without reducing the weight of the others. This way their probability would never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.

You can use a weighted random. That means that you assign a weight to each possibility… Then to compute the probability of one of them, you divide its weight by the sum of all weights.

See How do I create a weighted collection and then pick a random element from it?.

Thus, you would be able to make one possibility (e.g. generating a bomb) more likely by increasing its weight, without reducing the weight of the others. This way their probability would never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.


Addendum: An alternative to increase the difficulty by making bad things more frequent, is to increase the difficulty by making good things less frequent. For example, if you introduce power-ups, you can make them progressively less frequent. Some power-up ideas:

  • Reduce speed
  • Invulnerability from bombs
  • Score multiplier
added 172 characters in body
Source Link
Theraot
  • 27.5k
  • 4
  • 52
  • 79

If youYou can use a weighted random (see How do I create a weighted collection and then pick a random element from it?). That means that you assign a weight to each possibility… Then to compute the probability of one of them, you candivide its weight by the sum of all weights.

See How do I create a weighted collection and then pick a random element from it?.

Thus, you would be able to make one possibility (e.g. generating a bomb) more likely by increasing its weight on the random, without reducing the weight of the others. This way their chanceprobability would never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.

If you use a weighted random (see How do I create a weighted collection and then pick a random element from it?). Then you can make one possibility (e.g. generating a bomb) more likely by increasing its weight on the random, without reducing the weight of the others. This way their chance never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.

You can use a weighted random. That means that you assign a weight to each possibility… Then to compute the probability of one of them, you divide its weight by the sum of all weights.

See How do I create a weighted collection and then pick a random element from it?.

Thus, you would be able to make one possibility (e.g. generating a bomb) more likely by increasing its weight, without reducing the weight of the others. This way their probability would never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.

Source Link
Theraot
  • 27.5k
  • 4
  • 52
  • 79

If you use a weighted random (see How do I create a weighted collection and then pick a random element from it?). Then you can make one possibility (e.g. generating a bomb) more likely by increasing its weight on the random, without reducing the weight of the others. This way their chance never reaches zero.


By the way, a pretty old trick to increase difficulty is to make the game go faster.