Robot War Engine

Progress Update 2017-12-11

This week’s update is a little late as I’ve been quite busy with the holidays coming up (and a little bit ill).

This (or rather, last) week, RWE learnt about pathfinding. When a move order is issued, RWE computes a path for the unit to follow (using A*) and the unit tries its best to follow the path. Paths are queued up to be computed asynchronously, so the game won’t freeze if you issue move orders to lots of units at once. Instead it will exhibit similar behaviour to TA, where some units will wait a bit before moving, as the engine defers computing their paths. The number of paths computed in each frame can of course be easily tweaked.

Both the pathfinding and unit steering behaviour still needs some tweaking. Units never slow down to turn, which can mean that sometimes they drive in circles around their destination instead of reaching it. The pathfinder also doesn’t know that units should prefer straight-line paths to minimise turning. Also, it can happen that a unit gets stuck while trying to follow a path, and they don’t yet know that if they are stuck for a while they should give up and ask the pathfinding system to compute a new path for them to follow. Lastly, the pathfinder doesn’t yet know what to do when there’s no way for a unit to reach its goal (right now it crashes the game ). Of course, what should happen is that the unit tries to get as close as possible before giving up.

In today’s gif, the commander’s new navigation abilities allow him to easily conquer the trees blocking his path. With this technology, an end to the CORE is surely within reach.

Next, I’ll look at ironing out these issues with pathfinding and steering behaviour.

2017-12-11-progress