Our basic Gel enemy behavior is now complete! Gels will pursue an enemy player then retreat and split when their health gets low.
Our AI Gel units are now able to detect enemy GuildKnights using line-of-sight!
Next we’ll have them pursue and attack!
In GuildKnights, we want each enemy type to have distinct behavior patterns that will challenge the player in different ways with each new encounter. Our next project goal is creating behavior for our first enemy, the Gel. Its AI is based around overwhelming a single player unit with numbers.
Here’s a rundown if our desired behavior for Gels:
- A group of Gels will idle in the room where they’re spawned until discovered team task management.
- When an enemy player character enters a Gel’s line-of-sight, all of the other units in the Gel’s AI group also become aware of it.
- Gels will attempt to move within melee range of their current target to attack.
- A group of Gels will pursue a single target until it’s dead, then randomly select a new target from any in range.
- A Gel whose HP falls below half will run from any nearby enemies on its next turn.
- On the turn immediately following its retreat, a surviving Gel will split into two Gels with full HP, but each with half the maximum HP of the original.
The goal is for the Gel to be a fun nuisance enemy that has to be dealt with quickly before numbers get out of control. There should be room for GuildKnights with different attack types to have varying degrees of success when dealing with them. Strong single target attacks can quickly eliminate gels before they split, while AoE attacks will be more effective in cleaning up the lower HP Gels that have already multiplied.
Development on this should be interesting because it will get us started on creating our base set of enemy behaviors and prototype GuildKnight Techniques. When the smoke clears, we should have our first set of core player / enemy interactions and our first big steps towards real gameplay!
Time to go to work!
This screenshot shows the generated path from each of the enemies on the map to one of the player characters. We still need to add updates to the path with respect to each unit’s movement capabilities (e.g. not crossing enemy units), but the better part of the work on this is done now.
We’ve finished up all of our basic menu systems for the dungeon game state and it’s currently possible to progress from the top floor of a generated dungeon all the way to the bottom!
We can now recognize when a unit is next to a stairway tile and present the Exit action.
A basic placeholder stage clear menu tracks turn count and surviving party members.
Now we’re ready to start building the foundations for interactions between the player GuildKnights and the monsters that roam the dungeons.
GuildKnights is a turn-based game where each distinct “group” in the current dungeon is allowed to execute all of the actions for its members before the turn shifts over to the next available group. Under normal circumstances, group turns flow in the following order:
- Player Party
- Dungeon Enemy Groups
- Player Ally Groups
AI Units on the dungeon map all belong to special AIGroups. Each AIGroup has a behavior tree that governs turn order and, potentially, specific unit actions for the group’s members. While Enemy AIGroups with active units remain, the Dungeon Manager will randomly select one of the groups to be the acting group during the Dungeon Enemy Groups phase.
An AIGroup behavior serves as the core for cooperative interactions between enemies within the same group. In its simplest form, it will randomly select one of a group’s units and allow it to act on its own. At the highest level, it can facilitate coordinated attacks where units with debilitating techniques can weaken opponents before the high-damage units attack.
Initially, we’ll be focusing on getting the basic AIGroup structure and random action order set up. After that, we’ll be working on a simple AI behavior that will allow an enemy to path-find its way to a nearby player character. Once that’s finished, I’ll be back to go into more detail on individual enemy AI as we dive into work on Idling, Tracking, and Fighting behavior trees.
Here’s wishing everyone a prosperous and productive new year!