![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Saving game status using primes |
Johan Halmén
Member #1,550
September 2001
|
I don't even remember why I came up with this idea. Probably because of the beauty[1] of the primes. But I guess I thought something like this: Hard code a table with pre-chosen random numbers corresponding to the levels. Use the table when reading the cfg file at start and writing the file at end. To avoid people from figuring out the correlation, add more randomness to the saved number so that each quitting of the game saves a different number, even if player is on same level. References
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
weapon_S
Member #7,859
October 2006
![]() |
Johan Halmén said: add more randomness to the saved number so that each quitting of the game saves a different number, even if player is on same level The opposite seems ideal: don't print out different values, if the state hasn't changed. Or you should encode the names of variables too... Or all saved numbers must share a common extra encoding, that the program checks for (f.i. all saved numbers must have same lowest prime(s)). |
|
1
2
|