As an example of what I am talking about, No Man's Sky will give players quests where the objective involves navigating to a specific location within the currently generated solar system.
Obviously the game is not storing the tens (or hundreds) of thousands of structures strewn across a solar system in data, it's locating them and then setting a waypoint, but how?
In my own project I have a 2D overworld. I also have quests, that I would like to point players to specific structure types (house, hotel, store, ruin, etc) when the quest is generated.
Currently I do this by running the terrain generator for X by Y tiles and have it check to see if one of those tiles is the requested structure. This mostly works... for now. The more unique structures I add the less likely this returns the location of a requested structure type.
One way to combat this would be to have a failed check try again by moving X tiles away from the last check in one direction, repeating until it finds what its looking for. This would work, but it could lead to very long loops unless I cap it, and then you just end up with failed checks again.
Any suggestions from anyone with experience in this?