
Hey everyone!
I mentioned last week that I was working on pathfinding and what it will be useful for - today I want to talk about some of the considerations and some issues I’ve been running into.
Let me start with the considerations: in the process of switching our system for pathfinding and navigation, I got to reassess a lot of decisions we made at the start of the game’s development, and with the new system, we also got more options to choose from. One of the most important early decisions is which type of navigation graph to use - essentially, to determine what the map is going to look like for the AI.
I won’t bore you with the details of what each one looks like, but I will mention some of the trade-offs: some graphs would for example allow us to more easily create a penalty for soldiers and pirates to walk through bushes and shrubbery (so they would avoid doing so), others would be more performant in calculating long distance paths, yet others would allow us to get more accurate pathfinding in dense forests - or any number of combinations thereof.
Once I had decided 0n the type of graph to use, creating the graph seemed pretty straightforward - and ended up taking a long time. This is something that happens repeatedly in game (and software) development. Sometimes a task seems fairly easy and ends up taking a long time, sometimes a task that seems incredibly difficult ends up running perfectly after a few hours of setting it up.
So what should have been a simple half hour task turned into a multi-day odyssey, during which I had to use 4 different programs, overcome a whole range of problems, and which is still not done. In good news, however, the approach I have taken also will also have some synergy effects, so once it’s done, it won’t just be navigation that’s improves: we will also have a clearer colour scheme on the strategic map for which areas are walkable and which are not - and we will be able to also cut down on processing time and vulnerability to bugs for operations like wood cutting or gathering of stone.
Until next week!
