How would I go about using a random seed to generate a game level? The same seed should always generate the exact same level.
For this example it would be a Worms style level. So each level would have a theme (grasslands, snow etc), base terrain, different objects such as trees.
So where would I start to create this kind of level generator? What would be involved? What concepts does it use?
Bonus points for any any good links (bonus bonus points for anything related to how it was done in worms or similar).
Thanks.
srand(int)
. Subsequent calls torand()
will return sequential values that are always calculated in the same order, based on this seed. You set the seed once in your program. After that, if the algorithm depends only on the results fromrand
, you will get the same result every time. \$\endgroup\$