I want to make a 2d top down zombie Apocalypse game with procedural generation in Lua.
Using multiple noise maps, I can easily get a 2d array for a heightmap, moisture map, and temperature map, wich I can use to generate realistic biomes. Thats easy to do, but, to reduce lag, I need to divide the map into chunks, so I only generate chunks once. I can also do that, but what I want is a huge open world, with rivers, trees(more trees in the forests), farms and other special buildings, villages, and cities, roads, ...
My current thought is, to have other smaller 2d arrays for the different structures, and randomly place them with another structure map, but I don't know how to do that, but also then buildings and roads could possibly overlap, which I don't want. And I don't think I can generate a single structure which is within 2 or more chunks (because the schematics would overwrite the map, where the structure is)
So how can I do this, can someone please help? Thank you!