Original Post
ok, we all [hopefully] know that computers can only generate psuedo-random numbers, and i am hoping to take advantage of this fact.
i want to use a psuedorandom number generator for the placement of trees, bushes, small stones, et cetera, in my game (tile based). the thing is, when i am createing the maps, i want to see where these "random" shrubs are so i can incorporate them into the map (or give a "lose this hedge" override). so, i need to make sure that the same "random" numbers are generated each time the map is loaded; not only on the same computer, but on all computers on all platforms.
so, does anyone know of the standard c "srand()" & "rand()" will give the same sequence for the same seed on all platforms? i really doubt it, since i think the compiler guys can implement it any way they like as long as they follow certain guidelines. plus, i am not sure how different processors would handle the calculations involved. it''d be sweet if someone said "yes, everything will be just fine," but i''m not holding my breath.
so, does anyone know of an algorithm that will generate psuedorandom numbers based on a seed, that will always give the same sequence regardless of the platform ?
--- krez (krezisback@aol.com)