Skip to content

Wardergrip/ZombieSurvivalGameAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zombie Survival Game: AI

This was an exam for Gameplay Programming. The task was to make an AI for the human agent. You have to take care of energy, health, stamina, exploration, inventory management and danger avoidance.

zombieSurvivalGameAIfootage.mp4

I opted for a behavior tree over a FSM since I find it easier to grasp and is more readable to me. On top of that, it is easier to iterate on the decision making since you can easily move blocks around. The biggest downside of a behavior tree is the amount of memory it takes and the fact that it doesn't really remember where it was. image2

For those that are not familiar with behavior trees, you start at the root node and execute each node under it starting from the left. A selector node will execute all it's child nodes until one returns success. A sequence node will execute all it's child nodes until one returns failure. A group node is a node I came up with to seperate inventory management and world interraction inside my tree. The group node will execute all nodes under itself regardless of outcome.

The part I did best is inventory management. It's code is very readable, uses std and stl as much as possible. Next to that, I am very glad my agent has 100% shooting accuracy and is quite good at handling enemies (as long as it has a weapon).

In hindsight, I should've spent more time on exploration, danger handling and searching and less on inventory management. All in all, I feel very satisfied with the outcome considering this is my first experience with making a game AI.

About

Exam about writing an AI for an agent surviving in a zombie survival game.

Topics

Resources

Stars

Watchers

Forks

Languages