04-06-2025, 07:07 PM
It is exactly as @Zoran commented. You should use RANDOMIZE only once in your program.
If you put it at the beginning of your program, since you're using an emulator and RANDOMIZE relies on timer FRAMES counter to initialize the seed, it will initialize always to the same seed, yielding always the same number sequence.
For a truly "random" seeding, you need an external "random" source, such as user input.
If you ask the user to PRESS a KEY to continue (PAUSE 0), or just use RANDOMIZE after the user press KEY to start the game, then it should work. In this case, you will call RANDOMIZE every time the game is about to start, but it's ok: it will be a differen timer count :-)
If you put it at the beginning of your program, since you're using an emulator and RANDOMIZE relies on timer FRAMES counter to initialize the seed, it will initialize always to the same seed, yielding always the same number sequence.
For a truly "random" seeding, you need an external "random" source, such as user input.
If you ask the user to PRESS a KEY to continue (PAUSE 0), or just use RANDOMIZE after the user press KEY to start the game, then it should work. In this case, you will call RANDOMIZE every time the game is about to start, but it's ok: it will be a differen timer count :-)
---
Boriel
Boriel