Wednesday, December 8, 2010

4th Sprint and AI

Sprint Update
The last sprint was about AI. We used states to define which update function is used for AI ship. Then according the state the function is chosen and it overwrites the movement variables like the velocity and position of the ship. My part was to create explore (roam) state. I just used timer and after certain time the direction vector and thrust scalar are reset to random values. Question is if changing the thrust is necessary, probably exploring in random directions with constant speed may look better. The code was not tested yet.

AI Ideas
Here are some ideas that may make behavior of enemy ships look more realistic or interesting in gameplay:
  • Each enemy has its own scoring system and remembers in which states it got the highest score. This may help implement learning AI.
  • Changing AI state system that allows to apply several states at the same time. This would enable to have enemy for example hiding and chasing the player, or hiding and exploring, all at the same time.
  • Flocking and splitting the enemy and again flocking near the player.
  • Befriending some enemy ships so they work for you.