I use CCRANDOM_0_1(), but how can I seed this?
I want to be able to generate the same random numbers each time, depending on the given seed.
A fast, easy to use, free, and community supported 2D game engine
I use CCRANDOM_0_1(), but how can I seed this?
I want to be able to generate the same random numbers each time, depending on the given seed.
Can you try C function srandom() and post the results?
I use: srand(time(NULL)); //randomize seed
Just change the seed to the same constant number so you'll get the same random number results everytime. Hope this helps! :)
srandom(time(NULL)); did the trick, srand(time(NULL)); did nothing. Thanks!
You must log in to post.