Hahaha yeah most definitely! If there's anything I love more than programming path finding algorithms, that has got to be writing about programming path finding algorithms

And on that note -
Update 268Yo dawg, today I put a smaller path finding algorithm in my path finding algorithm... to... Let me explain!
The basis of the rain world path finding method is that as one path is being followed, the next is being calculated. This means that the paths are calculated not within a single frame, but over the course of several, and that the creatures are able to follow moving targets. How it works is pretty simple; the path finding algorithm works its way out from the
goal as a flood fill. When it reaches the creature, the creature starts following the path. Once the creature is following the path, a path to the next goal position (wherever the goal has now moved to) will start to be calculated. It's assumed that the new goal will be somewhat close to the last goal, so the creature will continue to follow the last path as the new is being calculated. The creature will never follow a perfectly updated path, but it will have a reasonably recent one to go by, and it is quite a lot easier on the processor as an entire new path doesn't need to be calculated every time the goal moves.
I think of this as a path finding algorithm that's optimized for having several creatures chasing
moving targets. Contrary to an RTS rain world will have almost only moving targets.
Ok, with this in mind, take a look at this. Notice how each time a path connects with the creature, the next one is started?

This is done pretty simply. Each time the mouse is assigned as destination, but it's actually saved as a "nextDestination" variable. When
the creature is following the most recent path or the
path has exhausted all its options and knows its unable to reach the creature a new path will be initiated, with nextDestination as destination. You following? In the gif above we see a lot of the former and none of the latter.
So, there's a problem with this system. Say that the creature is in a small enclosed room. The path finder is told to find its way to a position somewhere out in the big world outside the room. A new path will be initiated, and the path finder will chug away at the vast sea of tiles in the world, without finding a way into the room.
Now the AI changes its mind, and the path finding goal is put
inside the small room again. Notice the problem? No new path will be initiated inside the room, because the creature isn't following the most recent path, which is still searching all over the world for a way to get to the creature, and the path won't have exhausted every option in a loooong while, as it has to look at every tile in the world first.
So, the solution is to just assign a new path every time the goal moves, right? Nah, that won't work. If the goal moves, as it will when following a creature, there will be a new path each frame, and none of them will have time to reach the pathing creature.
This is where the path finder in the path finder comes into play. It's a super quick little path finder that maps whether one place is close and reachable from another place. So, when assigning a new destination, I check if this new destination is close to the old destination. If so, I simply do as first described, save it as nextDestination. If it is not, however, I scrap the old path and start a new one. The old one probably wasn't going to help either way.
So, in the scenario, this would mean that as the goal is moved into the small room again, it's quickly determined that this area is enclosed from the last destination - and the last path will be discarded and leave way for a new one, inside the small room. The creature will appear as more alert, as it will adapt to the new situation quicker than if it would've had to search the entire world for a path to a place it didn't even want to go anymore first.
Whew. Told you path finding was gonna get crazy!
In other news, I've enabled lizards to enter short cuts, and brought some of the path finding stuff together and had it work simultaneously. So, now we for example have the "pathing through places I know I can't actually go" stuff working simultaneously with all the other stuff, etc. The different elements tend to not get along very well at first when put together, but I think I've made it work. Have some ideas for re-structuring stuff though... we'll see.
Also been developing some ideas about how off screen creatures moving about are going to work. Off screen creatures are probably going to be a little... schrödinger's lizards, in that they'll be in sort of undefined states until they need to be realized... It's going to be interesting!