I’m looking for some ideas on how I could build some logic for a project I’m working on.
I’ve got an isometric, map I’m currently generating/rendering. It’s broken down into regions, chunks, and tiles.
One region has 10 chunks, one chunk has 15 tiles. I’m initially only generating one region, but trying to generate more as they’re needed.
I’ve got a map generator that sets tile images based on a noise calculation of altitude (blue tiles for water, tan for beaches, green for grass, etc up to mountains). This noise calculation is based on a seed and the tile’s position.
What I’m trying to figure out now, is how I can figure out when the player is getting close to the end of a region. I can calculate the x/y coordinates of the region’s northern, southern, eastern, and western points, but what kind of logic could I use if the player is walking directly northeast? I would need to generate a new region long before getting to the northern or eastern corners of the region.
Anybody have any ideas/advice on how I would calculate something like this?