Hmm. I’ve been tackling basically every problem I come up against here by making the generated nav map nicer and more streamlined, and at this point it’s probably about as streamlined as it’s going to get. The nav nodes now check whether the nodes they’re close to belong to a platform, and if so they only track the closest node on that platform. For their own platform, they only remember the nodes immediately to their right and left. At this point, all of the nodes each node sees should be relevant, with every relevant node being seen.
There’s a couple of problems left, though. First, while I think navigation should be pretty straightforward now that I’ve cut down the number of nodes, I don’t KNOW, and that sort of thing has caught me flat footed before. I’ll be testing that out tomorrow. Secondly, and more importantly, the calculations necessary to build the nav map are SLOW. On a moderately large and complex level, the calculations seem to take a solid 5 seconds of number crunching on my machine. This is because it needs to find each node, find all the nodes close to those nodes (within 50 tiles, Manhattan distance), and find which of those nodes belong to the same platform as others. It doesn’t take much to make this calculation balloon out of control.
So, either I need to figure out some serious optimizations, at least enough to get it down to under a half second, or I need to save the level nav map data alongside the other level data, the tile map and the detail list. Dunno! I’ll decide on that one a bit later, probably, once I get the pathfinding itself working.