Whack-a-Pigeon

We gave our NPCs melee weapons and the results are terrifying!

Building on what we learned from adding Shooter AI, we expanding the NPC behaviors to include melee attacks. Now your enemies can make it a little more… personal.

Basic Melee AI WIP.gif

First we added some basic, un-armed attacks, like punching and kicking. We can tweak the power of this to allow from little nudges to super hard strikes that instantly KO the pigeon and send it flying. Yikes!

Then we added handheld weapons, like sticks, sledgehammers and, naturally, a giant viking axe. This was trickier than it sounds, because each weapon must deliver accurate-ish physics collisions that can scale with the character. For example, if an enemy is holding a club and then grows 10x its size, it must still be able to use that club in the same manner. This meant simple hit-boxes were out of the question, and instead we rely on the animations and some physics tricks to make it all work together nicely.

Our NPCs seem just a little too eager to smash our poor little pigeon friend with their new weapons.

Once we were happy with our savage new NPC abilities, we decided to stress test things by unleashing them on each other in a massive AI vs AI battle! We built a simple walled off area and spawned in dozens of AI with both Shooter and Melee weaponry, divided them in to factions, and then told them to fight each other—to the DEATH!

Keep in mind that all of the VFX and many of the graphics you see are simply placeholdersor, in the case of hit effects, missing altogether. We’re just focused on the functional aspects of everything right now, and will give all the graphics a nice facelift later.

The results are rather hilarious, and seem to be very performant so far. We’re not done yet though! We’re taking our AI system to the next level to ensure a bountiful amount of emergent gameplay opportunities. More to come on that in the future!