Feature #4550

AI support for coop games

Added by TheCaptain about 6 years ago. Updated almost 6 years ago.

Status:Assigned Start date:09/16/2009
Priority:Normal Due date:
Assignee:TheCaptain % Done:


Target version:0.4 Estimated time:6.00 hours
Affected Version:


Add AI support for coop-style games (with no playable slots on one side, for example), so that the AI forces spawn from the force pool and make a rudimentary attempt to capture sectors and guard their own. Ideally, AI will operate in platoons (all members of the platoon trying to accomplish a similar objective). There should be no 'player limit' for the AI (they should not spawn 'as players'), but instead spawn when their 'wave' arrives. This should make the job more challenging for the human players on the other side.

This mode should be more of a hack, and in no way support humans on the same side as the AI. Just put in to make the release.


Updated by TheCaptain almost 6 years ago

If platoons/forces and player slots can both be designated as 'ai', then the 'real' human slots can use the platoons/forces assigned for regular platoons, while the AI player slots are used to fill the AI platoons/forces. This would allow both AI and humans on the same side without needing to allow for humans spawning into ai 'slots' or for AI 'stealing' units that players wished to keep for themselves. If the AI used map-designated 'ai' slots, it would allow the ai to use as much of the human player code as possible.

Updated by TheCaptain almost 6 years ago

  • % Done changed from 0 to 30

Simple 1st implementation:

Ai 'players' (non-playable player slots) spawn as available platoons (entire platoon spawns together), and receive a guard waypoint to a random flag to a sector defined in the platoon definition. Players wait to spawn until there are enough available to fill out a reinforcement platoon completely (this keeps AI units roughly together, otherwise they would be too easy to kill individually).

Future tasks: a strategic AI that assigns sectors to attack or defend, and a tactical AI that commands the platoons to carry out their orders by creating appropriate waypoints (eg: when assigned to a sector some platoon members will try to cap or defend flags).

Also available in: Atom PDF