Pathfinding Strategies in Dangerous Worlds

How do you get from A to B in a world that has its heart set on your unpleasant demise? That is the challenge that faces travellers on the Spice Road every day whether their journeys be for trade, justice or adventure.

The two major dangers are the environment and other people. Mountains and Deserts have fairly obvious environmental health risks both to men and to their animals, while Forests and distant wildernesses are favourite spots for ambushes by your human opponents. Another factor to consider is the travel speed across different terrain – the longer you have to spend travelling through a region to more risks you are exposed to.

So, to work out the best route we need to compare times and dangers from alternate routes and pick the best comprimise. The usual way to calculate paths in games is the A* (A-Star) algorithm. This is a good method of finding a shortest path – and can be modified to work out the quickest path by modulating the cost of travel between a pair of cells. To work out the safest path the cost between cells can be made more for danger zones – in proportion to the level of risk multiplied by the time spent travelling through.

For the player the task extends to party design too. If you want to travel fast you will need horses to ride over the hills and wilderness, but on occasion a small on-foot troop could make better speed with a shortcut over the mountains. For desert trade routes camels are essential where horses and wagons would simply run to a halt and die.

This all makes for quite a complicated pathfinding process – but to simplify it Spice Road has a simple route optimiser that will get a suitable path for long journeys depending on your party’s design, strength and alliances – as well as avoiding well patrolled areas if you are on a smuggling run. If you want more control you can either make your own route exactly, or set route preferences to tell the pathfinder your priorities over different land types and risks. You can even upgrade your pathfinding with perks to your caravan leader and scout classes.

Comments are closed.