Buy on itch.io

Pages

Monday, April 15, 2013

Dungeon Colony - Engine Upgrade

This is another development update about the new Engine Upgrade I am currently working on.

Parts of the engine are very old, in fact, the original pathfinder was one of the first algorithms I programmed for the game. But it lacked a lot of features and had some issues. 

Over the weekend I began implementation of the HAA* Pathfinding algorithm. Unfortunately, the path results were sub-optimal given my requirements and that made some paths look unnatural in rare situations. Even smoothing of a calculated path didn't result in the expected path. The algorithm is amazing when it comes to speed. So I will keep the code for future reference, especially since there will be an instance in an upcoming game feature which will require an abstract graph of the map (see paper for more info about that).

Instead I started working on an algorithm somewhat similar to Lifelong Planning A* algorithm. I'm not quite done yet, but the results are already great. I always try to make sure that such algorithms run fast on my crappy hardware under extreme conditions and I was surprised to see it work quite fast on a netbook (1024x600 res, 1.2GHz and 1GB Ram, Windows XP). I had to turn off some features that weren't supported on my netbook, (shaders to name one), but in the end the algorithm performed as expected.

Next, I will implement the new pathfinder into the engine. This will require a lot of cleanup and refactoring, which I am mostly excited about - who doesn't love clean code!

No comments:

Post a Comment