Good evening,
This is a great game and I am already greatly enjoying it, however as many others have noted boosting the AI would be a great improvement to the experience.
Some suggestions from my experience so far…
Disclaimer – I have not yet cracked open the C code. I wanted to give it a top down look without assumptions about what is there. That may mean some of my suggestions do not mesh well with the existent code body. In particular, I am assuming an object-oriented programming structure.
1. Some of my underlying ideas come from a book that discusses how extremely simple processors (like a hunting spider’s tiny brain) parse environmental data to create the appearance of cunning thought.
http://www.amazon.com/Beyond-Brain-Environment-Shape-Animal/dp/06911264452. One could create the illusion of complexity, and even some team effort, if you implemented a “personality object†for each alien. By that I mean a set of flags and weights that influence the rules governing each alien’s basic decisions so that certain types of alien, and even individual aliens exhibit different hunting patterns.
3. Using the spider as a model I can envision a simple process for generating an alien’s turn. Each turn the alien makes three basic choices: destination, path to destination and whether to attack along the way. If I understand the current code correctly, this is already the general structure. It could be as simple as; choose a path toward cover that brings you closer to your target and attack when in range.
4. To add complexity and challenge you could add the concepts of “hunting†and “senses†to the first decision.
a. Hunting – An alien will choose a destination that brings it closer to a target it is aware of. A set of flags determine if an alien hunts for specific prey. Weights determine how aggressively it pursues prey. Flags can be set to lock on a target, once chosen.
b. Senses – Aliens can have awareness of targets beyond line of sight, determined by flags.
5. Examples:
a. Eager – The alien moves in the direction of the most recent hostile gunshot. This could also be extended to include a chance to perceive and move toward those lumbering in heavy armor.
b. Heightened senses – Line of sight is determined only by a distance. Walls and obstructions do not prevent the alien from perceiving the chosen prey. Groups of aliens sharing this flag would appear to swarm on a scout who overextends.
c. Bloodhound – The alien chooses a path to bring it closer to a wounded enemy. If flagged to lock on a target, this gives the illusion of a “pittbull†mindset that chooses a target and tracks its blood-trail. Multiple aliens in close proximity with this flag set give the illusion of working together to concentrate fire. If allowed to track wounded without direct line of sight it gives the illusion of an enemy tracking by scent or blood trail.
d. Kill Stealer – If there is a wounded soldier available the alien piles on, if not the alien moves closer to another alien. Multiple of these quickly give the impression of a formation working together to form up and focus fire, particularly if they fall in to file behind an alien hunting by one of the other senses.
e. Sniper – The alien hunts a target based upon highest (or lowest) rank. Highest rank appears to be an alien coordinating fire to pick off those in command of the unit. Lowest rank appears to be singling out rookies to deliberately target the weakest first. Flagging for this without line of sight would indicate aliens intercepting radio traffic (or even thoughts) to zero in on who does what.
f. Tactical – Alien prefers to hunt for a particular high stat or equipped weapon. This would allow for the creation of an alien squad that focuses fire to eliminate long range snipers or heavy weapons specialists as a first priority.
g. Scalp hunter – The alien hunts the teams best (highest average stats) or most notorious (highest kill count) elite soldier.
h. Territorial – The alien does not hunt, but instead chooses a destination such that it patrols in a tight loop and aggressively defends a small area.
i. Butcher – Prefers to hunt available civilian targets over available soldiers.
j. Randomized – A random personality for each alien would at least give variety in behavior from battle to battle and alien to alien. This would approximate a recently crashed UFO, where the commanding officer of the alien force were killed on impact.
k. Templates – assigning a personality template, perhaps with random variance within a species band, would make Ortnoks feel like Ortnoks and Tamans feel like Tamans. This would approximate a crash with minor damage, allowing the aliens to begin to regroup.
One of the advantages of such a scheme, in my opinion, is the ability to start simply and expand in terms of complexity as the code evolves.