rocky_dirt.png
[Hide] (1MB, 1200x600) >>981
I use perlin to generate gaussian noise, I use my simple random function to get (deterministic) white-noise. I use my lazy function to pick one tile out of 25 almost identical tiles. Perlin outputs similar values, when given similar coordinates. It will always give outputs similar to "1122224455543221". I need deterministic outputs, which are not provided by regular random functions, they just expect seed, and I dont know how fast they are. But, other than the way you get data from them, they do have everything I need. I can do some tricks and pass hash of (seed*coordinates), but I am not sure how fast these are, and how they will work on various systems.
I want to have "endless" maps, which will generate right in front of player, so generation should be fast and deterministic, so I could generate same map each time.
But sooner or later I will need deterministic item generation, and I am afraid that it will fuck things up, since random has a shitload of parameters. As I said, I think I will pre-generate 10k of proper random numbers with standard functions, and use it to generate items. I can make it big enough so it would not "exhaust" itself and start repeating (maybe a couple of safeguards as well). Or just use "random banks" for each map segment, and make them bigger than possible amount of items you can get from a zone... But than I just pre-generating random, which is counter productive, unless I run it from another thread, which would increase complexity for no fucking reason.
And everything is either faulty or increases complexity or both. I read on random generation, and its really fucking annoying, that you can fuck it up, and never learn about it. And I can (probably) simply alter default random code, and instead of it providing a sequence of outputs, I can bind it to a value, but I really dont want to fuck with default code, from standard library or stuff like perlin.