Evolution of the Bounty Hunter AI

May 24th, 2016

bounty-hunter-attack

SmuggleCraft features a few different AI CPUs; Racers, Police, and Bounty Hunters. Here I will discuss how the Bounty Hunters were originally envisioned, how they differ from Police in mechanics, and how they got to where they are in the game today.

Bounty Hunters, like Police, chase the player when in range, and attempt to damage or prevent them in some way from completing their mission. Bounty Hunters travel in “packs” instead of alone, and begin pursuing the player immediately, driving backwards on the track, instead of waiting for the player to pass them like Police. Originally we also wanted them to move in a formation, similar to how pilots might fly together. Each pack had a leader, and depending on the number of Bounty Hunters spawned in a pack, the leader would randomly assign a formation that they all would follow.

The Problem
bounty-hunter-formationsDue to the nature of the AI, and how they were designed to drive, formations were proving very difficult to do, and to makethem look believable. We wanted the AI to feel more human, we want them to make mistakes, take different paths, and drive in real time using their surroundings to dictate actions and speed. Trying to force their “imperfect” driving into perfect formations was a challenge. We were able to achieve the effect through a lot of forced movements, and in doing so the AI were no longer driving themselves, simply being forced into a position dictated by the leader’s driving and assigned formation.

The Solution
After a lot of experimentation, we decided to change the way they work. By giving them a few simple rules to follow, a list of priorities rather, and allow them to drive on their own. To keep the feeling ofthem being in a pack, the top priority was to stay around the average position of the other pack members. If one member was ahead of the pack, it would slow down to allow the others to catch up, if one was behind, it would increase its speed.

bounty hunter logic

Once they were all in this general radius of each other, they would drive at the same speed. Thisallowed them to stay together as a group, but with full control of driving and making their own decisions.

When the pack reaches the player, they start to attack. Instead of them shooting an energy beam like Police, we wanted them to do something different. What if they charged at the player? Made themselves the bullet! This was a cool idea that heavily separated them from Police. The pack members take turns charging at the player. During this attack, they create a shield making them invincible to damage, and when the attack is finished, it tells the next pack member it is their turn to strike. This kind of system makes it feel like they are working together to take the player down.

The Bounty Hunters went through a lot of trial and error to get where they are today, from forced movement in formations, following only the leader of the pack, to self controlled group aware driving. I’m sure they still have more work in store to make them perfect, but I think they are on the right track!25f8d79e40abc6ab16ac8a0805de0c2d


Leave a Reply

 

Our Games


Rampant Deck Builder

SmuggleCraft

Cosmic Kitty Pop!

Strange Donuts Vs. The World

Hero Chomp

The Flip

Something Fragile

Box