Pathfinding

👍

Reminder - Keep Daily Backups!

When working on a strategy game with a kit as big as the Complete Kit - always keep a working daily backup! Save yourself the trouble of rolling-back changes and losing work.

What type of pathfinding is used?

The City Building Kit uses the A* pathfinder along with the Helios AI. Together, this combination can handle as many units as you put inside with pathfinding and obstacle avoidance. All of this is built into the City Building Kit so you can get started on your game immediately.

800

Pathfinding tracking. Click on image to view larger

800

Example with 100+ units. Click on image to view larger

How would you set units to attack other units instead of buildings?

By default, pathfinding is setup to target and attack buildings. For batting other characters instead of buildings, that would require some changes to the code -- you would first need to alter the Helios.cs battle processor to target other units, instead of just structures. First, understand how Helios.cs works, because once you understand how buildings are attacked, you can attack anything.

The basic information is already in the kit to create proper turrets and shooting characters - as you will become familiar with it, these tasks will become if not trivial, very easy to put into practice. Hopefully we will be able to do this for you - build some examples for each over time as we expand the kit.

Our advice to anyone using the kit - start inserting your own assets and the existing code targeting buildings, putting everything together, and this will give you time to gradually understand the entire system. Usually requests that change the core gameplay are at least a few weeks work and not exactly something we can document in enough detail other than a brief suggestion of starting with the Helios.cs file and understanding how buildings are targeted in it.