To be frank—I’m not entirely certain this is the correct place to post a question like this. Should you (some random moderator) feel this is the wrong place, feel free to move it! :
Let’s say we’re procedurally generating an infinite level as we walk around using the following:
if(perlinNoise.noise2(x / scale, y / scale) > .2)
makeTileSomethingInteresting(x, y);
Based on the Perlin noise, the world will place in interesting tiles for us! In fact, it’s going to generate a world that features certain “chunks”—or regions—that will have that interesting looking tile.
Assume we wanted to procedurally generate in one—and only one—nasty looking tile somewhere inside every single one of the regions generated by the noise. Somehow, we’d need to know what those tiles are on the fly, as the world is infinite. :cranky:
I’ve been messing about with this for a while—and honestly—I have no clue as to how this might be solved without using some sort of flood fill to make sure an area always has the same random seed for the position of the random point.
Perhaps someone can come up with a suggestion?
Should you have a good answer as to how one might achieve this, do leave a post! If your answer is fully functional, you’ll be featured in the credits of my upcoming game! :point: