Geek Out
INSIDE THE GAME

Finding the way: pathfinding

In our interactive pathfinding demo, the player controls a single agent – a vehicle. For Ubisoft’s next major PC release, the developer’s had to meet the challenge of efficiently calculating the paths of thousands of agents on a battlefield measuring hundreds of square kilometres. Senior producer Mathieu Girard explains.

GO Our interactive demo explains the principle of pathfinding logic using the A* algorithm but we appreciate that modern games need to use a more sophisticated approach. What can you tell us about how pathfinding works in R.U.S.E.?

MG Most classical RTS [games] use a terrain of reasonable size, which allows them to use a grid system to implement classical A* pathfinding. Even though R.U.S.E. uses the same type of A* algorithm, the terrain itself is far more complex in size. We speak of maps of hundreds of kilometres wide, and a rectangular grid no longer works. As with many systems of the game, we therefore had to reinvent a way for pathfinding to work on such massive battlefields. The solution we used is based on a network of interconnected spheres of various sizes, broken down by the intersection of terrain features and blocking objects.

GO In a typical R.U.S.E. battle, how many agents are moving around the map? What sort of load is the CPU dealing with?

MG If you think of a 4v4 match, we can get close to a thousand of different agents moving on the map, some of them subdivided into subagents (the individual soldier of an infantry squad, for example). The workload of AI was heavily optimised, so that the frame rate would not be too impacted by such a number of units, since the terrain itself can take the most of the CPU workload.

GO How is pathfinding in R.U.S.E. handled in relation to multi-threading?

MG Our pathfinding uses the same kind of micro-jobs as the rendering engine, subdividing computation tasks on the available cores of your system.

GO How does the make-up of a unit (infantry or heavy armour, for example) affect its pathfinding decisions?

MG One of the innovations of RUSE is the way it uses roads, which all wheeled units prefer to use for faster travel. Logistics units, such as supply trucks, have to use the roads, so you can ambush them by controlling the roads. Tracked units, such as tanks, can move where they want on the battlefield. Forests provide disguise and ambush bonuses to light units (infantry, AT guns), while tracked units cannot enter them.

GO From the demos we’ve seen, several cities are depicted in n R.U.S.E. right down to street level? Does this give rise to particular pathfinding concerns?

MG In R.U.S.E., city blocks provide cover from enemy direct fire, and they also make movement in streets mandatory for units willing to cross the city. Furthermore, supply lines very often pass through cities, so you better send some infantry to secure them. The cities are part of the same computation, so there was no critical challenge in computing pathfinding in cities.

Still, applying destruction to the city blocks was another concern…

GO How do R.U.S.E. cards affect pathfinding?

MG R.U.S.E. cards will not affect directly the pathfinding, but some of them (like Blitz) can speed up the motion of units in a specific sector and for a limited time.

GO Where has R.U.S.E. pushed the boundaries of how pathfinding is used in games?

MG I think there are several reasons why R.U.S.E. is a breakthrough in pathfinding: large distances, instant response time, and finally a very clear display of where your unit is heading with a macro-arrow display, which is also used to display stolen enemy orders.

GO Can the player expect to notice a difference running the game on an Intel® Core™ i7?

MG In terms of pathfinding, the difference will be subtle. But for the visuals, the framerate and graphical streaming will be perfect!

GO Thank you for talking to Intel Game On.

In Operation Flashpoint: Dragon Rising particle systems are best viewed from a safe distance.

 
< Back
 
 
Rate this article:
StumbleUpondel.icio.usFacebookredditdigg