An analysis of the AI in Hotline Miami

Hotline Miami is fantastic game, I’ve played both and I am still replaying them to date.

The fact is, the core mechanic in the game is the combat against this NPC’s.

While i was playing the 2nd one, I noticed a lot of interesting things about their behaviors, and since I am deeply interested in learning AI I decided to give it a shot.

In this article, I will not go in depth into code, but in how the NPC is designed, and how it can be recreated using the Unity Engine.

The first step in my analysis is the NPC states. I noticed 6 of them: IdleInspectAttackKnocked DownLooking for Weapon and Dead.

In this article I will avoid the Knocked Down and Looking for Weapon behaviors, I may add them in the future.

Judging from this 4 states(IdleInspectAttack, Dead ), I decided to use a State Machine for the NPC, the reason for this its because it has very little number of states, and its easier/faster to implement and will get the job done.

Website

Tags: Hotline Miami