AI Behavior Demo

[AI Behavior Demo]
Genre: 2D Top Down
Platform: PC
Language: C++
Made With: OpenGL


Following Algorithm that allows the Collaborative AI to move behind the target

A project to demonstrate Artificial Intelligence and Collaborative AI.

This is a demo, so its COMPLETELY hands-free.

I’ve spent a good portion of my time on this project, since I’ve implemented alot of background game systems instead of only focusing on the AI.

Excel sheet map loading, Map Scrolling, Map generating, Sprite Animation Manager, Map Collision Detection, Render Engine, IrrKlang Sound Engine are some of the back-end stuff that I’ve implemented in this project.

Despite the initial aim of this project being only to demonstrate an AI Algorithm, I do not regret working on the back-end systems for the entire project as I end up using this as a base framework for most of my future OpenGL games. Needless to say, I’m rather happy with the results.

The AI algorithms themselves are also not easy to implement. Taking the following algorithm for example, I had to know which direction the player is facing and allow the collaborative AI to follow behind in one movement behind the player.

Collaborative patterns was also difficult for the most part since I wanted more than static conditions for the collaborative unit to respond to. In order to do this, I made 3 Finite State Machines to work together to allow the Collaborative partner to be more "intelligent".

Now onto the demo itself. The demo starts by “Player” AI (not controlled by user) following way points and a secondary collaborative AI partner closely behind him.

50 / 50 chance of Player AI winning vs Opponent AIs winning.

Following Algorithm, Message Board System, Finate State Machines are some examples of AI-related algorithms I’ve implemented and demonstrated.


Attacking from opposing AI and “guarding” from player AI


"Covering" collaborative demonstration


Player AI backs away while collaborative partner AI covers


Healing when AI detects partner is low on HP

No comments:

Post a Comment