Is is possible to somehow create a key or seed that you can initialize a random number generator with, and thereby ensuring that all the random numbers using this key will be identical.
Or is there another technique that i can use with similar results?
what i like to be able to do is create a random seed. then use this seed to initialize a random number generator, use this random number generator to build a tilemap or something else that requires alot of random numbers.
Then send the same seed to another client which will be able to generator the excact same map because the random numbers are the same?
Im just curious if something like this is possible, dont really care about platform etc.
As long as the random number generator you are using does nothing you don’t tell it to, this will work. For example, if you seed c’s RNG with a seed of “4”, and then print 10 random numbers 100 times, those same 10 numbers will be printed 100 times. This is because the RNG only works based off of the seed, and does some algorithmic transformation on the seed to produce a set of values. If you give it the same seed each time, the same algorithmic process is repeat each time, leading to the same results.
I highlighted nothing because modern day RNGs may automatically use the time or some random system specs in the generation process without you knowing about it, such that for those whom do not desire the effect you desire do not get it.