I did a lot of stuff today, and I hit another milestone: The AI can consistently beat me in a dogfight.
I know that this is typically a bad thing when programming AI, because having an invincible opponent is really boring, but the hard part was getting the AI to this level, now all I have to do is scale stuff back, and I have a good balanced dogfighting AI.
I think today I am going to talk about the process I went through when programming the MIG AI.
Step 1: Analyze what I do when playing
The first thing I did was to think about how I played the game, and I tried to model the AI after my style of gameplay because.... well.... I was the best subject at the time.
Step 2: Make the AI work (a little)
Next, I made the AI so that it would do little more that try and point towards me, and shoot when it did, simple, but a good base point.
Step 3: Play the game until the AI made a mistake
After the AI makes a mistake, I would quit the game, and then write some code to stop it from making that mistake again.
Step 4: Repeat Step 3 for a loooooooooong time
I repeated this for a long time, until the AI made very little obvious mistakes.
Step 5: Add some uncertainty
Next I added some randomness to what state the AI was in. For example, if the AI was trying to turn inside you, make it turn the wrong way every once and a while. I found it was at this step that it became fun to fight the MIGs
Anyways, that's just how I did it with Angels 20, but I think that model is a good general guideline to follow.
The high point of my day today was playing the game, dogfighting a MIG while trying to protect my ABL. The MIG climbed and ran away, only to return a couple seconds later behind me, where upon it fired a guided missile at me, turned towards the ABL, and proceeded to shoot it down while I was trying to outmaneuver the missile..... I'm happy.
Anyways, here's a screen of me about to lose a fight with a 4th-tier MIG.
I'll talk to you guys later!
Angels 20 Feature WorkList
-An Actual Front-End Menu
-A Map of the Level on the HUD
-Good MIG AI
-Destructable Tiles
-A checklist of enemies on the level
-Repair Trucks that actually have to stop to repair stuff
-Ground Vehicles that can shoot at you
-More weapons (ie. Napalm, Cluster Bombs, etc)
-Fully Automatic Gun
-Forward Supply Bases
-More mission parameters (ie. timelimits , targets , etc)
-Random HUD Stuff
-Expanded Tileset
-Improved Level Editor
-Gameplay balancing and tweaking
-Cutscene Integration
-New Mission Types
-Integrate Capital Ship Entities
(Almost Done!!!!)
Just curious