I have a 2d top-down view tile map game, that generates random color tiles (water colors) as you move the character. I've been positioning elements on screen using the x/y coords (finding a way to generate new tiles as the player moves was no picnic, but I did it).
My problem is that I want to establish an actual map-level coordinate system, so the player knows where they are. I'd prefer to just count a first "spawn" area as
0,0 and then count from there.
How should I handle doing that? The problem with x/y is that it's relative to the window frame. I have code that detects when the character reaches the edge of the window, and it "freezes" the player, and moves the map instead.
Whatever system I use, I'll need to be able to add code that can check for other nearby entities.