Okay, so I'm trying to figure out some AI crap for the enemy soldiers... naturally, platform-wise, they're gonna follow the same rules as the player. Jumping, running, etc. HOWEVER, I want them to seem a little bit smart...
* Set up different classes of soldiers (only counting ones on foot)
- rifleman - paired or burst shots and melee
- machine gunner - suppressive fire and melee
- grenadier - grenades, pistol, and melee
- anti-armor - grenades, rocket, and melee
(There will also be "heavy" versions of these guys, but I'm just worried about their thought process for now...)
Note: Typically, this is what a basic fireteam is made up of, a rifleman, autorifleman, grenadier, plus a team leader. The idea is to present an enemy that seems tactically inclined, rather than usual cannon fodder individuals that just run around like chickens and are a mere hinderance to the player's forward progress. Want the player to actually seem threatened by the enemies altogether than just their projectiles.
* ALMOST NEVER spawn one guy by himself
- the only exception would be the machine gunner, due to the high firepower
* GENERAL TACTICS:
- avoid close range
--- if in close range attempt to back out into medium range
--- if too close, initiate melee attack, then back out
- avoid far range
--- if too far out, bring it in a little bit
- avoid being a sitting duck
--- if in the same spot for more than (randomly decided between 0.5 and 1) seconds, move in some direction (preferably away from the closer range)
* RIFLEMAN TACTICS:
- fire three to five shots at the player every two seconds
* MACHINE GUNNER TACTICS:
- fire bursts of 10-15 shots at the player every three seconds
* GRENADIER TACTICS:
- if at close-medium range, fire two shots from pistol every two seconds
- if at far-medium range...
--- see if our grenade arc hits a wall between enemy and player
--- if not, throw grenade
* ANTI-ARMOR TACTICS:
- if at close range, move in (these are the only guys so far that will charge the player at close range)
- if at close-medium range
--- check grenade arc
--- if no wall, throw grenade
- if further out than that
--- launch rocket every four seconds
For now, I can't think of much more for them. Other enemies will be included of course...
- spider gunbots
- spider minebots
- auto turrets
- AA gunners
- spotlight gunners
- tanks
- trucks
- vehicle gunners
- helicopters
- ATVs
Another note, at the same time as wanting a teamwork-based enemy, I also want to occasionally implement some Metal Slug-like behaviors, like catching them off guard while they're in the middle of setting a trap, or standing around talkin', or you blow up a port-o-jon and they run off with their pants around their ankles.
Any other ideas, feel free to comment.