This is the first essay series for Signals and Light, and it provides an overview of enemy combat design in action games. It is written from the perspective of a AAA game designer who works with enemies in action games and aims to pay it forward with what he’s learned.
The second part of this series breaks down some key concepts to help build a foundation for explaining enemy combat design in action games.
How enemy attack phases break down and the terms used to describe them.
What "attack tickets" are and how they're used to manage enemy attack pacing.
How "encounter design" is differentiated from level design and more hands-on combat design.
Of course, Part 1 presented a bold new term: ENEMY ATTACK CADENCE! Before analyzing that, first it is necessary to define some terms and clarify what types of games are relevant when breaking this topic down.
II-A - what is an enemy attack?
This might sound silly to define, but it’s important to understand because it’s more complicated than it might sound. Enemy attacks can come in many forms, but from the simplest to the most complex, they basically break down into this diagram.
Perception of Target - First, the enemy acquires a target to attack.
Assignment of Attacker Role - Next, the enemy is allowed to attack. In more complex action games, this might be gated by higher-level attacker systems, which will be expanded upon in later parts of this essay.
Direction of Attacker - Where is the enemy relative to the player? Can the player see the enemy? In some games, the answers to these questions determine whether the enemy can attack or which attacks they're allowed to do.
Selection of Action - Now that the attacker can attack, if they have multiple possible actions, they first have to select one. This could be random, or it could involve priorities and rules based on things like angle and distance or other specific states.
Preparation for Action - Now that the attacker has selected an attack, they might have to prepare to perform the attack. At the minimum, this means moving towards the target to get into range so that the attack will have a chance to hit the target. There may be other steps here for special attacks, like maybe they need to switch from a melee weapon to a ranged weapon.
Anticipation Frames - Now that the enemy is prepared to attack, the attack animation actually activates. This often starts with some sort of build up that the player can read in order to visually anticipate that an attack has begun and is an active threat. During this period and every subsequent period until the attack is done, the attacker may be moving and/or rotating towards the target, and more details about how this works will be explained later in the essay during the discussion of PROXIMITY.
Hit Frames - After the anticipation completes, the actual hit activates as the enemy unleashes its might upon the player. This could be a melee attack smashing the player with a club, it could be a gun unloading its projectiles, or it could be a powerful spell shooting a beam in the player’s direction.
Inter-Hit Frames - In the case of a multi-hit combo, there are inter-hit windows that might include more anticipation poses or might be so quick that the player won’t have much time to react to an upcoming hit in the chain.
Resolution Frames - Once all the hits have completed, the enemy has to recover back to idle. Sometimes this is a quick and fluid movement if the attack was fast or the enemy is particularly graceful, and other times it’s a long and bumbling moment as the enemy restores their balance after some ridiculously powerful maneuver.
Return to Idle - Lastly, the enemy returns to idle from their attack animation and flows back into non-attack combat behavior.
Later sections of the essay will refer back to this diagram for context where appropriate, as of course much of the discussion of enemy attack cadence is also a discussion of the nature and design of enemy attacks.
II-B - what are attack tickets?
“Attack ticketing” is a catch-all term used for AI systems designed to manage the timing and concurrency of enemy attacks in group encounter games. Developers actually have a lot of different words for these, including: attack cookies, attack slots, or attack costs. Regardless of terminology and implementation, attack tickets exist at a high level to make it so that enemies have to take turns in attacking their targets.
Each target of an enemy will have a number of open reservations, and when an enemy goes to activate an attack against the target, they first have to turn in a number of tickets for the attack that can fit into an equal number of open reservations.
Once the attacker turns the tickets in, they claim the reservations, and no other enemy can turn tickets in for those reservations. This means that a player with five reservations could be attacked by five separate enemies with 1-ticket attacks, or they could be attacked by one enemy with a 5-ticket attack.
Enemies usually turn in attack tickets for reservations at the moment they choose to attack, even if they may still have to run into range before the attack activates. They revoke the reservations once they complete their attack or something else interrupts them. All enemies will periodically query their ability to attack the target until they’re able to claim reservations with one of their attacks, typically idling or repositioning until it’s their turn. Sometimes special enemies might be able to steal reservations from other enemies whose attacks haven’t actually started yet, or there may be special attacks that enemies can start without requiring any reservations at all.
Attack ticket systems mainly tie into TIMING and CONCURRENCY, but they can also tie into PROXIMITY and DIRECTION as well, depending on how the developers make their systems. For instance, an attack might cost more tickets to activate when an enemy is behind the player versus in front of them, or an attack ticket cost might fluctuate based on the distance between the attacker and the target. Later parts of the essay will refer to attack tickets often.
II-C - what is encounter design?
A term often mentioned in this essay is “enemy encounter.” This is a group of enemies within a single area that the player can engage in combat. Encounters come in many forms, and there are many different types of development tools used to create them. Some games have randomized encounters, some encounters have reinforcements, and some encounters are entirely hand-placed and never change.
Encounters are often created by encounter designers. This is a sub-field of both combat design and level design that combines the two. Encounter designers are responsible for determining the spawn locations, spawn rates, spawn counts, and group makeups of enemy encounters. In games that have dynamic spawning systems, these designers tune the likelihood of different types of enemies to spawn together and how many enemies spawn (and sometimes the game ties these to difficulty or other emergent systems as well). They may also place spawn points and determine which enemies can use them (such as snipers in a tower). In games that have tightly designed encounter placements, like stealth games, the level designer is often ALSO the encounter designer, as the placement of enemies directly relates to the layout of the level.
Encounter design is the primary axis at which level and combat design meet, and a game’s approach to enemy attack cadence has major interactions with both encounter and level design. In fact, some approaches to attack cadence literally define the high-level constraints of encounter design and combat arena design, as will be discussed later on.
II-D - topics not covered by this essay
While this essay will discuss many of the development tools used to make enemy attack cadence possible, it will NOT define those tools or systems in great technical depth or detail. That is because these development tools change RADICALLY depending on the development team in question.
The essay also does not present a full analysis of AI behavior systems, such as behavior trees versus state machines or how AI perception works. There are already some great sources to learn more about those topics, such as the YouTube channel “AI and Games.” There will be some references to GDC talks, some of which are publicly available for further investigation by curious minds who want to find more technical details about how game developers solve some of these problems.
Next, this essay discusses “action games,” but exactly defining “action game” is a pretty fruitless discussion of semantics. Instead, here’s a quick list of the types of games that are not up for discussion in this analysis.
While enemy attack cadence is universally relevant to games with any form of combat, these are genres that present such completely different forms of combat and AI that they require different language from that used here. All other games that have even an approximation of combat remain on the table.
II-E - the final caveat
Finally, before going through the pillars individually, it is imperative to acknowledge a fundamental issue in breaking attack cadence down into its constituent parts.
As posed at the beginning, the confluence of these pieces of enemy attack cadence creates what this essay calls a TEXTURE to the game experience. What this means is that all of these rules and systems interplay so dynamically and fluidly across the spectra of game time and game space such that the player rarely ever perceives a single rule or system in isolation. When five enemies are running independent AI brains, and the player is moving around taking actions in a variety of complex and difficult-to-predict ways, there is such a large conflux of data, systems, and chaos that it is difficult to observe it in a data-driven, objective, or structural way. It can be hard to understand these pieces in concert from both the perspective of a game designer who literally created them as well as from the perspective of a player.
Some games make this texture easy to break down, and some make it hard. In terms of easy-to-understand attack cadence, there are games where literally only one enemy can attack the player at a time, as well as games where enemies have such lock-step fixed behaviors that the player drives enemy actions more than enemies make decisions. More complex games have so many AI agents and ways that those agents can act that it's impossible to ever really say exactly what’s going to happen at any given second. When these more chaotic games are well-designed, the player can make good guesses as to what will happen next, but the rules that developers make are so hidden that they require a bunch of complicated debug overlays and tools to even begin to understand what’s happening and why.
The more complex a game, the harder it can be to balance all of these factors amongst each other. Complexity introduces more data or more noise to the game state, making it harder to point to a single thing that might elevate or detract from the game design. This means a player sometimes might have a bad time playing a game because of how attack cadence was implemented, but the player won't necessarily understand why because there was too much information to parse which aspects felt good and which ones felt bad.
Basically, it’s a complex topic, but it remains essential to talk about it one piece at a time, and hopefully, this essay will make it easier to understand.
In strategy games, the player typically controls a large number of units, either in real-time or in turn-based time. Because combat is distributed across such a large scale, the action space of individual enemies becomes closer to, or possibly even exactly the same as, the playable characters. The cadence of individual enemies or groups of enemies ceases to operate under rules that apply to other types of action games, requiring a different lens to analyze them and having different implications for the player experience.
Most turn-based games, as the name suggests, provide an equal number of player and enemy turns, so, with some exceptions, the cadence is often basically the same, even across genres. These games operate under a different paradigm from real-time games, and their rules are incredibly rigid. Every element of those rules is painstakingly clear to the player (even if they sometimes hide information from the player), and the concept of "attack cadence" arguably doesn't exist, or if it does, it's of such a different nature that it's not productive to discuss.
Games that have purely narrative systems only have a simulacrum of combat represented by contextual scenes rather than actual combat gameplay loops. For any exception where combat is present, all of the topics in this video remain relevant, though none such games will be used as citable examples due to being less relevant examples than those used here.
Fighting game attack cadence is usually meant to approximate playing against a human opponent. The AI is often either an afterthought or one of the most complex things imaginable and is designed to reproduce all of the things that a player can do within the game's framework in as enjoyable a way as possible (within difficulty tiers). Rarely is the opponent AI designed with intentionality regarding providing a player-versus-enemy experience that was made to exist in and of its own right. There are some major exceptions to this rule, one of the most well-known being "Super Smash Brothers," but they’re not important to this analysis.