Wednesday, July 22, 2015

algorithm - How do I avoid "too" lucky / unlucky streaks in random number generation?


I'm currently dealing with a multiplayer combat system where the damage dealt by the players is always multiplied by a random factor between 0.8 and 1.2.


In theory, a truly random RNG may eventually yield the same number many times (see the Tetris dilemma). This could result in a match where player is always making very high damage while the other always makes very low damage.



What can I do to make sure this doesn't happen? Are some RNGs better than others at avoiding repetition?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...