Improved pathfinding


In my current development version of Settle the World, pathfinding has been reworked at last.

Since I couldn't find any BlitzBasic 2 example code for pathfinding last year, I converted a code example from the PC to the Amiga without understanding exactly what happens there.

Unfortunately, this resulted in units that moved diagonally from bottom left to top right, or from top right to bottom left, only moving "stair-stepped", or taking huge detours.

Now that I have read up on the subject properly, I also understand what happens during pathfinding.
The error has now been corrected and the units now also move diagonally correctly in all directions.
It cost me many hours of time, but it's worth it.

Land units will always try to avoid rough terrain like mountains, swamps and forests.
In doing so, units will always prefer roads, even if it means taking long detours.
This does not matter, however, as the movement of units on roads is three times as fast as on flat terrain.

Another small step on the way to a new version of the game for you ;-)

Get Settle the World (Amiga)

Leave a comment

Log in with itch.io to leave a comment.