Languages & Coding > Blitz2D, BlitzPlus, Blitz3D

maximum seed

(1/2) > >>

does anyone know what the maximum seed is for the rand/rnd commands  before getting the same results again(or if this is even possible)
For instance if I have an infinite amount of procedurally generated worlds with each worlds ID being the seed(starting from 1 obviously) how many worlds before I find an identical world(Or would I never find an identical world) If there is a limit I know its a big limit Im just worried I crossed that line

That depends on the modulus divisor used in the internal random command.

It could be anything, likely large.  But in blitz3d the biggest it could be would likely be max 32bit integer before it loops or in otherwords several billion.

However no guarantee mark sibly went that high.  Your best method is to look at the blitz3dsdk and check what value he used for the random number generator.

You could multiply ... just use two differend number generators.
Requires the updated brl.mod of NG as "HurryStarfish" added it some weeks ago.

Now you could just have two different seeds and use a RNG for "world" and another RNG for "weather" (or whatever) and this will create more variations.
This would even allow then to have "this world" but "another weather".
Or "this world" and "other creatures".

Think you got what I mean.


Thanks but that appears to be for BlitzMax

Ahhh sorry, totally missed to look at the category of this thread.

Sorry then.



[0] Message Index

[#] Next page

Go to full version