Z
Zvoc47
Guest
Hello.
I saw that on PSX games Driver 1 and Driver 2, there's always the same randomly generated set of cars that spawn as you drive if you press the exact same buttons at the exact same time as before. I think that the buttons actually control the random generator's seed dynamically as the player plays the game. This is made so that the replay manager called Film Director always makes the exact same cars spawn just like when the replay was recorded.
Now, I see that there's only one random function which could be also called by the GUI or something that's not of the game which would cause the replay to get wrongly recorded and thereby collapse during the playback. This is a problem. If you don't understand, let's imagine that the random number generator generated numbers 1, 2, 3, 4, 5. The game calls the random function twice so there's 1 and 2 used. The player pauses the game and the pause menu has a graphical effect that always randomly bounces which calls numbers 3 and 4. Then the player resumes the game and the random function is called. The replay has been recorded with numbers 1, 2 and 5. Now, the player tries to see the replay. The replay calls the random function and the random function gives 1, 2, 3. As it gave number 3, the replay is no longer the same as when it was recorded. See the problem?
I'm thinking that there should be some kind of extension or algorithm to use to create my own random generator which is only affected by the gameplay and not by any pause menus. Does any like that exist?
I saw that on PSX games Driver 1 and Driver 2, there's always the same randomly generated set of cars that spawn as you drive if you press the exact same buttons at the exact same time as before. I think that the buttons actually control the random generator's seed dynamically as the player plays the game. This is made so that the replay manager called Film Director always makes the exact same cars spawn just like when the replay was recorded.
Now, I see that there's only one random function which could be also called by the GUI or something that's not of the game which would cause the replay to get wrongly recorded and thereby collapse during the playback. This is a problem. If you don't understand, let's imagine that the random number generator generated numbers 1, 2, 3, 4, 5. The game calls the random function twice so there's 1 and 2 used. The player pauses the game and the pause menu has a graphical effect that always randomly bounces which calls numbers 3 and 4. Then the player resumes the game and the random function is called. The replay has been recorded with numbers 1, 2 and 5. Now, the player tries to see the replay. The replay calls the random function and the random function gives 1, 2, 3. As it gave number 3, the replay is no longer the same as when it was recorded. See the problem?
I'm thinking that there should be some kind of extension or algorithm to use to create my own random generator which is only affected by the gameplay and not by any pause menus. Does any like that exist?