Weekly Sunday Post – March 11

This week was a lot of bug fixing of the movement pathing and Enemy turn AI. I had left it in a only semi-functioning basic state, and there were alot of things to revise. In a previous post I had talked about how that long pathfinding was computationally heavy and would case the frames to lag, my hacky solution was to pre-calculate all possible paths at load time and then select between them, but I knew that would create weird problems in the future, especially when combined with bridge destruction mechanics. Alot of the fixes I implemented was just replacing pathfinding with a coroutine that does the calculation but returns control to the main thread in short enough periods where no frame lag occurs, This will need to be tested with different computers to see how performance might vary. Some of things I added were:
– Smooth camera panning on enemy
– enemies choosing priority targets to generate pathfinding on their turn
– tiles
There are a number of things I still have to implement, like how an enemy behaves if the path to its prioritized target is blocked, it should change targets and re-pathfind.

I also created a draft-sprite for a town, so I can begin some of the programming for how towns behave.

Thanks for reading.

Leave a comment