Navigation engine for games and simulations