
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
How does randomnesss work in KaM Remake
We use a pseudo random number generator, which means it starts at a certain seed and then gives out a sequence of "random" numbers (the sequence is about 2 billion numbers long). The seed tells it where to start in the sequence, so with the same seed you'll get the same sequence.
Currently the random seed is always set to the same value at the start of the game, so under the same conditions you will always get exactly the same result. But a small change like adding an extra animal will cause the random numbers to be used differently (even though it's the same sequence) so you will get different results. In KaM there are a LOT of things using random numbers (animals use them every step, fighting/shooting uses them with every strike/shot, etc.) so even a simple change will make the results unpredictable.
In the next release we are going to change this so it starts randomised (which usually means you set it to something unpredictable like the current number of milliseconds on the clock), we originally didn't do this for debugging purposes (it's good to be able to reproduce the same events when debugging) but it's not so good for gameplay or balance testing.
Let me know if you have any questions
