Skip to main content
GameDev.net gamedev.net
🔒 Locked

Get previous random numbers

Started by griffenjam Oct 24, 2001 at 4:12 PM 0 replies 250+ views
Original Post
griffenjam
griffenjam
Is is possiable to work backwards through previous random numbers? For example lets say you want to create a time reverse effect on random events. Do I have to use a FILO buffer to save all my random numbers, or can I use the current seed to figure out the last random number and so on...? Jason Mickela ICQ : 873518 E-Mail: jmickela@sbcglobal.net ------------------------------ "Evil attacks from all sides but the greatest evil attacks from within." Me ------------------------------
Oluseyi
Oluseyi
If you reimplement the rand() function, yes. By default, though, there''s no going back. The source for both GCC and MSVC rand() functions was posted recently.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.