top of page
Search
Writer's pictureDan Hartman

Using Influence Maps for an escort AI

The primary usage of influence maps is to provide AI characters with information about their surroundings. For this implementation of influence maps, I decided to create an escort mission game where the objective is to keep your units alive by blocking bullets. My goal for creating this game was to use influence maps to create an AI behavior that used its knowledge of its surroundings to find the safest spot around the player character to hide behind.

I built off my previous AI framework to implement an influence map. This was actually the easiest part by far, since my flow field project laid most of the ground work I needed for a functional grid and boids that could interpret data from said grid. Here's an early version of the code in action:

Green circle = Player, Black circle = Enemy, Red space = negative influence, green space = positive influence.

The boids scan the area around them for the cell with the highest influence, then move towards that point.


When everything comes together, the boids are very good at letting the player character block bullets for them.


Here's a full video of it in action:

9 views0 comments

Comments


Post: Blog2_Post
bottom of page