Hacker News new | ask | show | jobs
by doophus 897 days ago
> 2. Store metadata about the current a* search in the graph nodes themselves so you don't have to maintain in a separate associative array.

This might be suitable in some circumstances, but it mixes your hot & cold data, prevents concurrent searches from being performed. Personally I'd steer away from this without an extremely good reason.

1 comments

Correct, but it was still way faster that way. Pathfinding was already asynchronous (queries happened on another thread so they didn't block any game update loops) and queries were infrequent enough that doing one at a time was fine.
Oh that would be unpleasant if you wanted deterministic behaviour - for example multiplayer RTS.