Enemy & Boss AI Behaviour

Introduction

Today I’ll be going over two games that I’ve developed and how I designed their enemy behaviours to match the game’s core gameplay loops/theme.

Factory Reset

Game Introduction: A steampunk ARPG, hack and slash type game. Play as Rusty, explore the garden, workshop, and make your way through a series of enemies, and test your skills against the final boss, Hammercrank!

Item drops are randomized, you have a chance of getting either a sword or musket, with differing rarities (W,G,B,P,GOLD), as well as a item level that adjusts stat values of that item.

At the workbench, you can recycle weapons to potentially get a stronger weapon, at the risk of getting an item with a lower rarity.

Enemies: Due to the nature of the game-jam, we programmed our AI in Factory Reset to chase the player until the enemies were killed. This isn’t ideal, but given the time constraints and small map size, it was an acceptable design decision. Every enemy attack that dealt damage past a damage threshold puts the player in a small animation lock (ministun). This change disallowed players from trying to round up many mobs and do splash damage, because the player would quickly be overrun with monsters. However, some players found out that they could mob monsters and lead them into environmental dangers like the saw-blades and farm quickly that way.

Hammercrank!
Hammercrank!

Closing Thoughts:

In Factory Reset enemies were designed without any thought for live services or longevity of the game, so it was a very simple task in terms of game economy and adjusting stats for items/enemies/player. The average playthrough would last around 1-3 hours. In Windwalker, we are building with a live-services system in mind which adds a degree of complexity.

Windwalker

Game Introduction: Windwalker is a heavily combat oriented mobile RPG with a unique encounter system. In Windwalker, players create their character and choose from 10+ unique classes. Players acquire items and tame pets to help them progress through the world. Combat is the heart of WW, and is turn-based with up to 6 characters in one fight (3v3).

When dealing with enemies and bosses in WW, we see it from the context of combat. Before we dive deeper, we need to understand the intricacies of WW combat.

Windwalker Combat

Combat in WindWalker is turn based. Combat encounters occur when players initiate battle with monsters on the map screen, as well as any combat related encounter. Players/Enemies/Allies will have a basic attack as well as abilities. There are different damage types like physical and elemental. The different elements will be Water/Fire/Earth/Wind. We have status effects like freeze(similar to stun),burn(dot),stunned, cut/exposed(take more dmg). AI controlled characters will prioritize characters with the highest threat level. Summoned units will be placed at the end of the queue.

Decisions made in combat should feel important, which translates to a higher difficulty than most mobile games. Mistakes will be punishing, and enemies will intelligently make decisions based on player actions. In order to make combat feel great, we need a well-thought out stats system that players, enemies, and items will use (Economy Design). On top of this, we have a extensive class system as well as ~100 unique skills (summons, buffs, debuffs, offensive, defensive, utility, etc)

When battle starts, all characters begin an initiative check. The character with the highest initiative will start the battle, and the rest of the queue will be in order of highest initiative.

After the initialization phase, the attacking character may choose to attack with their primary weapon, or use one of the skills that they will unlock as they level. Battle persists until one party is left.

With this groundwork set, let’s move on to our AI in combat.

AI: We can adjust some of the things listed below to create unique encounters with WW enemies and bosses.

Windwalker Current Combat AI Move Decision Logic as of 3/22/23
Windwalker Current Combat AI Move Decision Logic as of 3/22/23