Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CTRL_ALT_DELETE

seeding a random number generator

This topic is 6128 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there realy a need to re-seed a random number generator after a certain number of rand() calls if it is initially seeded with the time? It would seem to me that it should produce psedu random numbers forever, and the only way to duplicate those would be to seed it with the same exact number(the time) again. However, I recently heard that the generator "goes stale" and that it is a good idea to re-seed after a certain number of calls. Any thoughts on this?

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by CTRL_ALT_DELETE
I recently heard that the generator "goes stale" and that it is a good idea to re-seed after a certain number of calls.


If it does, it''s not a very good RNG and the proper cause of action would be to switch to a better generator.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!