Random integer number generator works fine for me, and I get the same results on different machines. If you want, you can check my asteroids clone - link in my sig. Basically it can record and play a whole game session. There are 3 sessions already recorded on my pc, and the movement are saved in a plan text file. These sessions play flawlessy on every pc so far.
The asteroids move in a random way, and the seed is picked from the file itself.
I did have difficulty to replay the game in the same way, but that was not due to random number generation.
Instead, if you use sin and cos, then these values can give slight different results on different machines. But what have driven me mad, was that the 2D image command ImageWidth and ImageHeight can also give different result, due to different behaviour of the gfx cards - yes believe me. A difference of 1 pixel makes a big difference when you check for collision. It's something related with colors, I guess.
So my advices are:
1) use a lookup table for sin() and cos()
2) use a pre-calculated value for imagewidth() and imageheight() if you use that.
Sergio.
The asteroids move in a random way, and the seed is picked from the file itself.
I did have difficulty to replay the game in the same way, but that was not due to random number generation.
Instead, if you use sin and cos, then these values can give slight different results on different machines. But what have driven me mad, was that the 2D image command ImageWidth and ImageHeight can also give different result, due to different behaviour of the gfx cards - yes believe me. A difference of 1 pixel makes a big difference when you check for collision. It's something related with colors, I guess.
So my advices are:
1) use a lookup table for sin() and cos()
2) use a pre-calculated value for imagewidth() and imageheight() if you use that.
Sergio.