Background
I\'ve had problems for quite a while now with players cheating in my android game. For a strict single-player game this wouldn\'t be a big is
In the Pokemon games, they used DMA. You could get a similar effect by having a timer go off and trigger an update of all values while the game is paused for very short time. The update would add some random amount to all variables (including the one that you subtract from to get individual values). You can also try having values stored in a large array and change the starting position. Instead of an absolute pointer like GameState[121]
, you'd have something like GameState[121+StartingPosition]
and just combine the value-incrementor with a location randomizer. Modular arithmetic is your friend, in both cases. Be wary of overflowing the array and off-by-one bugs. A buffer overrun would not be good. ;)
If this was a Flash or Java app: Sadly, using memory management to quickly remap the position in RAM of values is not as convenient as in a native binary like the Gameboy Advance uses. Copying all variables to a second set, in a random order, then deleting and garbage-collecting the original values would probably make your game run slow as heck.