First up, this isn't a random question about seeds (Although don't you just love phrases like that? "Massive Rug Sale" - Who would want a massive rug?)
Anyway. Would it be feasible to use controlled seeds as a way of saving randomly generated levels? I know that Solitaire on Windows uses a method like this in order to replay past games, but I was wondering to what extent it would be advantageous over, say, saving array files. The way I see it, saving a single seed into either an encrypted ini or just writing and reading a single value in an external array would be a hell of a lot faster than looping through an entire array and loading everything like that, but I don't know of any problems that could crop up.
There are 10 types of people in the world: Those who understand binary and those who don't.
Assault Andy Administrator
I make other people create vaporware
13th November, 2009 at 05:31:50 -
Its an interesting idea that I've also thought about using before but I wouldn't rely on it - not using MMF's built in seed anyway. You might accidently use a random number before loading your map in which case the map wouldn't load properly.
If you want to do this I would recommend trying one of the Random Number objects that are available because those will give you better control over the set of random numbers that you have.
If you use LUA you can define a seed which means that all levels will be loaded exactly the same.
I am not aware of a way to do this in MMF, so you would need to use LUA and have that do a lot of you code and simply do calls back to MMF passing whatever values you need.
MMF does have a random seed action. All you have to do is save/load the seed right before you use it to generate the level.
But I'd highly suggest you use one of the random generation extensions, or even generate it in Lua or something. MMF's in-built random function is not at all very random
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.