Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
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.
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.
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.
Read more about:
BlogsYou May Also Like