5 ms·
Maybe I am missing something, but wouldn't a regular random number generator with a defined seed work just as well? If the problem is determinism, then using a
by eerikkivistik 4y ago
Maybe I am missing something, but wouldn't a regular random number generator with a defined seed work just as well? If the problem is determinism, then using a deterministic seed should give the same result.
- thisismyswamp 4y agoIndeed like others mentioned, it's about being able to generate terrain chunks starting from anywhere in the world. A random number generator using the same seed would still have to follow the same steps for all users, meaning generating the world from the origin.
- pcwalton 4y agoCorrect, you can use an RNG. It's no coincidence that many RNGs and hashes (and, for that matter, ciphers) have similar constructions.
- foota 4y agoA desirable property for this is to be able to generate only some part of the terrain, but if you're using a seeded PRNG then you have to generate the same bits at a time. You could solve this with chunking, but it's not trivial.
- Sharlin 4y agoIf all you want to do is to generate a texture by looping over all pixels in sequence, then yes, you can use a RNG. But in many use cases you need to evaluate a noise function at an arbitrary (x, y) position (or (x, y, z) or even higher dimension) which means you need to hash the coordinates to get the pseudorandomness you want.