2 min read

Simple RTS AI and Capture Points: Deterrence - Video Devlog 12

The twelfth weekly devlog of Deterrence. This week I make a simple enemy AI, capturable points, and units deal damage to one another.


A tower defense mixed with real-time strategy where you repel attacking sentient AI robots until they give up.

Simple RTS AI

To get enemy units moving, I created a simple enemy controller that acts like a player (aka artificial intelligence). The enemy controller will need to move groups of units all around the map, so a nested group class is needed to give commands to separate groups of units.


In order for the AI to tell these groups of units where to go, points of interest would need to be laid out on the map or defined in some way. Since this is a tower defense game, the enemies need to move towards the objects the player is defending. The enemy movement will use the same pathfinding as player units.


To add depth to how enemies move, the points of interest on the map are connected together in a waypoint system. This way, enemy units can have paths with multiple points of interest or paths that approach a point of interest from another direction (flank). The enemy controller will simply tell each group to move on to the next waypoint once the current waypoint is reached. If the current waypoint is a Landing Zone, then the group will wait until the landing zone is under enemy control before moving on.

Capturable Landing Zones

The landing zones will be a very important part of the game. Landing zones will be where the player gets supplies and calls in more units. The landing zones won't be able to be built by the player nor will enemies be able to destroy them; Instead, they'll be control points. A landing zone can be under player or enemy control, or be neutral.


Control works like most control points in RTS games: Units must be present at the control point to capture it. A landing zone with both enemy and player units on it will be contested and there will be no transfer of control. If units are moved away before the transfer of control is complete, control will return to the current team or fall back to neutral.


In the case that an enemy gains control of a landing zone while a chinook is delivering, I am still contemplating what to do. If you have any ideas, let me know in the comments.

Latest Jobs


Playa Vista, California
Audio Engineer

Digital Extremes

London, Ontario, Canada
Communications Director

High Moon Studios

Carlsbad, California
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
Lead UI Programmer
More Jobs   


Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter


Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Follow us


Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more