Gearing up for final content push, getting the maps setup. Next couple of days are going to be a panic so I had to get this solid. The idea is that this map I’ve been staring at all week can become a Tile in the larger world. I already spawned a bunch of them but the pathfinding wouldn’t sync up and I wasn’t about to make a colossal A* matrix for whatever map size I decide.

Tile-ification: Marked exits as Doors with their respective direction normals (dx, dy)
This tile already has a method for constructing the A* map, so I wanted a way to allow units to seamlessly travel between any two points on the map. That’s going to be brutal for long distances, and I don’t want to be limited in this regard. Why? Because I guess I just don’t feel like it…and that’s why I don’t finish LD48’s 
Before I could crap all over myself I realized that if I arrange these tiles on a grid of their own like cards on a table, I realized I could use the pathfinder to solve the world path (macro, or inter-tile path as opposed to tile path which is micro, or intra-tile path). So I hacked a fake Ogmo file and modified the loading code to generate tiles.

Rigging the level loader and pathfinder to build worlds from building blocks is the smartest wheel-reinvention I’ve yet to perform.
Since A* assumes adjacency means walkability, this system would allow world pathing across adjacent tiles even if there was no door. Sticking this limitation on the designer is not the end of the world, and the pathfinder could be subclassed to be door-aware.
So here’s where the recursion comes in: why don’t I just screengrab each of the tiles and allow myself to build world maps in Ogmo?

Since the world map tiles are image captures, they’ll need to be updated if the referred tile gets changed. Otherwise, I’m ready to rock.
I could essentially build a GTA-sized map with layers upon layers of these things. I got no sleep.
Finally there’s the pathfinding. What’s great about using these pre-baked tiles is the A* map doesn’t change. And the paths between doors can be pre-computed, meaning the traveller is doing no A* work except at the start and end tile destinations. Booya.

The units know which tile they want to get to, but they have to ask for directions at each purple square. The directions are accurate…occasionally.
I thought I was a genius, but I cracked open Game Programming Gems and there it is. I will create the patent and sue myself, see you later suckers I’m rich.
Say goodbye to the beanie babies, I’m piling Oryx art in now that I can create some interesting roguelike levels.
Gratulations on finishing! If something like that exists.