/dm-game:encounter-designfrom dm-game
Designs encounters as the intersection of space, adversaries, and resources across game genres. Covers enemy archetypes, AI architecture, telegraph timing, wave pacing, boss phases, and environmental flow.
Ships in dm-game. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Purpose: Tools for designing how players experience space and adversaries. An encounter is not a stat block dropped into a room — it is the intersection of spatial geometry, enemy behavior, and player resources that produces a tactical experience. This skill covers the full chain from world structure down to individual enemy placement.
Core insight: The same enemies in a different space feel completely different. The same space with different resources creates different strategies. Encounter design is combinatorial — small changes to any axis reshape the entire experience.
Sources: The four-beat teaching structure is Koichi Hayashida's, developed on the Super Mario Galaxy / 3D World team. Landmark and wayfinding principles derive from Kevin Lynch, The Image of the City (MIT Press, 1960) — legibility, landmarks, paths and nodes are his. Environmental storytelling follows Don Carson, "Environmental Storytelling" (Gamasutra, 2000) and Harvey Smith & Matthias Worch, "What Happened Here?" (GDC 2010). Reaction-time floors derive from standard psychophysics (simple vs. choice reaction time; Hick's law, 1952). Enemy archetype names are common industry vocabulary with no single origin. The Encounter Triangle is this plugin's own framing.
Every encounter is shaped by three forces. The experience emerges from their intersection, not from any single axis.
Space
(WHERE it happens)
/ \
/ \
/ encounter \
/ experience \
/ \
Adversaries ———————— Resources
(WHO they face) (WHAT they have)
| Axis | What It Controls | Design Levers |
|---|---|---|
| Space | Geometry, cover, elevation, sight lines, movement options | Room shape, verticality, choke points, flanking routes, hazards |
| Adversaries | Enemy types, behaviors, group composition, timing | Archetypes, AI complexity, wave structure, spawn placement |
| Resources | Health, ammo, abilities, environmental tools, information | Scarcity, placement, risk/reward of acquisition |
Most of this skill's vocabulary — cover, sight lines, flanking routes — comes from third-person action games and reads as inapplicable everywhere else. It isn't. Space is whatever constrains reachability. Resources are whatever the player spends and cannot instantly replace. Translate the three axes into your game's terms first, one line each, then use the rest of the skill.
| Genre | Space is… | Adversaries are… | Resources are… |
|---|---|---|---|
| Horde survival | Density gradients and escape lanes; the safe pocket that keeps shrinking | Spawn composition and pressure rate | Cooldowns, position, the level-up pause |
| Isometric ARPG | Pack spacing and door-to-door pathing | Pack composition, affix rolls | Potions, cooldowns, gear state |
| RTS | Map control, chokes, expansion distance | Enemy composition and timing pushes | Supply, build time, unit count, player attention |
| Turn-based / card | Board state and reachable positions | The threat clock and the enemy's hand | Actions, cards, health spent as currency |
| CYOA / narrative | Which options exist at this node | The pressure the fiction applies | Time, standing, irreversible commitments |
| Autonomous sim | Adjacency in the world graph | Faction posture and escalation state | Whatever the agents spend — see simulation-first-design |
Test: write your three lines. If the Resources line comes out empty — nothing is spent, nothing is scarce — you do not have an encounter, you have an event. That is a legitimate thing to have, and nothing below will improve it.
The combination is the design. Changing one axis changes the experience:
| Same Enemies, Different Space | Same Space, Different Resources |
|---|---|
| Open arena → skill-based dodging | Full ammo → aggressive push |
| Tight corridor → claustrophobic pressure | Scarce ammo → cautious resource management |
| Elevated platforms → vertical tactics | New ability just unlocked → mastery testing |
| Multiple entrances → flanking anxiety | Environmental tools available → creative solutions |
Diagnostic: When an encounter feels wrong, identify which axis is underdesigned. Most "boring" encounters have interesting enemies in uninteresting space, or interesting space with no resource tension.
Space is not a container for combat — it is a participant. Every spatial element shapes player behavior.
| Element | Behavior It Creates | Design Consideration |
|---|---|---|
| Cover | Approach decisions, safety management | Must be destructible or flanakable to prevent camping |
| Sight lines | Long = ranged advantage; short = close-quarters tension | Mix lengths to reward weapon/ability switching |
| Elevation | High ground advantage, verticality adds decision layers | Ensure both high and low positions have trade-offs |
| Choke points | Force commitment, create risk/reward | Powerful but can feel unfair if enemies use them without counter |
| Flanking routes | Reward spatial awareness, punish tunnel vision | Must be readable — players need to know routes exist |
| Environmental hazards | Add urgency, create area denial | Should be readable before they activate; punish carelessness, not ignorance |
| Interactables | Creative problem-solving, environmental mastery | Explosive barrels, bridges, switches — reward observation |
Different room shapes produce fundamentally different encounters:
| Space Type | Geometry | Behavior It Encourages | Best For |
|---|---|---|---|
| Arena | Open, symmetric, few obstacles | Skill-based movement, dodging, spacing | Boss fights, duels, skill tests |
| Corridor | Long and narrow, limited lateral movement | Funneled intensity, resource attrition | Building tension, gauntlets |
| Hub | Central area with multiple exits/entrances | Multi-directional awareness, choice of engagement | Exploration pivots, ambush setups |
| Gauntlet | Linear with sequential challenges | Sustained pressure, endurance testing | Climactic sequences, escape scenes |
| Balcony | Split-level with overlook positions | Ranged/melee asymmetry, vertical tactics | Mixed-range encounters |
| Labyrinth | Interconnected paths, limited visibility | Paranoia, ambush potential, navigation challenge | Horror, stealth, cat-and-mouse |
| Killzone | Inescapable area with escalating threat | Survival pressure, crowd management | Wave defense, holdout scenarios |
Design rule: Vary space types across a level. Three arenas in a row feel repetitive regardless of enemy variation. Alternate space vocabulary to keep encounters feeling fresh.
Enemies are behavior systems, not stat blocks. A slow enemy that blocks a doorway is more interesting than a fast enemy with more HP, because the first one changes what the player does.
| Archetype | Role | Player Response It Forces |
|---|---|---|
| Aggressor | Closes distance, applies pressure | Reactive play, retreat decisions, priority targeting |
| Defender | Holds position, blocks progress | Approach planning, finding weak points, patience |
| Supporter | Buffs or heals other enemies | Target prioritization, "kill the healer" decisions |
| Disruptor | Breaks player patterns, denies abilities | Adaptation under pressure, fallback strategies |
| Artillery | Ranged area denial, long-range threat | Positioning awareness, closing distance under fire |
| Swarm | Overwhelms with individually-weak numbers | Crowd management, area-of-effect decisions |
| Elite/Boss | Multi-phase, tests multiple skills | Full mastery demonstration, pattern recognition |
Encounters become interesting through archetype combinations, not individual enemies:
Minimum viable encounter: Two archetypes that create a tension the player must resolve. A single archetype is a puzzle with one answer; two archetypes create a dilemma.
Players must identify enemy type and predict behavior from visual design alone.
Design rule: If the player dies to an enemy they couldn't read, that is a design failure, not a skill failure.
A telegraph the player cannot physically react to is decoration. Human simple reaction time to a visual stimulus is roughly 200–250 ms; a choice reaction — see the tell, pick between dodge and block — runs 400 ms and up, and rises further with the number of options (Hick's law). Add the animation time of the player's own response before the window closes.
| Response required | Practical telegraph floor |
|---|---|
| React at all (any input) | ~250 ms |
| Choose between 2–3 responses | ~450 ms |
| Choose and reposition | ~600 ms + traversal time |
These are floors, not targets. An attack telegraphed at exactly the floor is unblockable in practice, because the player is also tracking other things. Sourced for the underlying reaction times only; the per-row totals are working values — measure yours with the Numbers Policy test-plan format.
The exception that proves it: telegraphs below the floor are a legitimate design choice when the intended counter is prediction rather than reaction — learn the pattern, act before the tell. Fighting games and soulslikes do this deliberately. It only works if the pattern is learnable and consistent, and if the first several encounters are survivable while learning.
Koichi Hayashida's four-step structure, developed on the Super Mario Galaxy / 3D World team and widely adopted since, is the most reliable pattern for introducing anything new — an enemy, a hazard, a mechanic:
Test: for each enemy or hazard in the game, find its four beats. If an element's first appearance is already step 3, players will experience it as unfair rather than difficult — and will report it as a difficulty problem, which sends you tuning numbers that were never the cause.
The readability rule above, enforced by the sim instead of by art. From ice-pirates
(2026-10-12, src/sim/systems/ai.ts: sightings, seenBy); its numbers are corpus
values, posture B for your game.
{x, y, hw, hh} in world units,
from the camera's view()), so the rule is deterministic and replays exactly. A
rotating camera adds angle, and the test rotates the point; a box around the
rotated screen would count off-screen ships as seen (camera-control rule 6).fairViewMargin); past that margin it's
forgotten and must be seen again.hw: 0 is immune to AI fire.Enemy AI architecture determines what behaviors are possible. Choose the simplest architecture that supports the design intent.
| Architecture | Behavior Quality | Design Control | Best For |
|---|---|---|---|
| State Machine | Predictable, readable | High — every transition is explicit | Basic enemies, tutorial enemies, bosses with clear phases |
| Behavior Tree | Flexible, modular | Medium — composable but designable | Mid-complexity enemies, group behaviors, enemies that adapt to context |
| Utility AI | Context-sensitive, emergent | Lower — harder to predict exact behavior | Complex enemies, allies, sandbox/simulation behaviors |
| GOAP | Plans multi-step actions, strategic | Lowest — emergent plans can surprise designers | Strategic enemies, simulation games, enemies that use the environment |
Complexity rule: Start with state machines. Only add architectural complexity when the design requires behaviors that simpler systems cannot express. A state machine with 5 states is easier to tune, debug, and balance than a behavior tree with 30 nodes that produces the same behavior.
Good difficulty scaling changes what enemies do, not just their stats.
| Lazy Difficulty (avoid) | Behavioral Difficulty (prefer) |
|---|---|
| More HP | More aggressive — shorter hesitation before attacking |
| More damage | Better coordination — enemies flank, cover each other |
| Faster movement | Smarter target selection — prioritize vulnerable player states |
| More enemies (only) | More varied tactics — use cover, retreat when low, call reinforcements |
| Reduced player resources (only) | Faster adaptation — enemies change strategy when their approach fails |
Stat scaling is sometimes necessary, but it should never be the only difficulty lever. When the player's experience of an encounter doesn't change between easy and hard mode, difficulty is being faked.
An encounter is not a single moment — it has internal rhythm.
How enemies arrive shapes the encounter's emotional arc:
Intensity
| ___
| / \ ___
| / \ / \
| ___/ \_/ \___
| / \___
+--------------------------------→ Time
Intro Escalate Climax Breathe
Design rule: Every encounter needs a readable beginning and end. If the player cannot tell when an encounter starts or when it is over, the pacing is broken.
Rest is not absence of content. Rest is a different type of content:
Cognitive recovery is real. After high-intensity encounters, players need time to encode what they learned. Skip this and they feel exhausted without feeling accomplished. The relationship between encounter pacing and session pacing is covered in experience-design.
Bosses are multi-phase encounters that test accumulated mastery:
How players move through space without explicit markers. The environment itself should communicate where to go and what matters.
| Tool | How It Works | When to Use |
|---|---|---|
| Light | Players move toward light, especially in dark environments | Guiding through caves, corridors, ambiguous paths |
| Color contrast | Warm colors attract, cool colors recede; high contrast draws the eye | Highlighting interactables, goals, important paths |
| Geometry | Wide paths invite, narrow paths signal danger or importance | Controlling pace, signaling transitions |
| Motion | Anything moving draws attention over static elements | Drawing the eye to important elements in busy scenes |
| Audio | Sound sources guide exploration; volume implies proximity | Guiding when visuals are obscured or ambiguous |
| Vista/reward | Visible goals in the distance pull players forward | Motivating traversal, communicating progress |
Players build mental maps using distinctive landmarks. Effective landmarks:
Design rule: If players need a minimap to navigate, the environment is not communicating well enough. Minimaps are a crutch for spaces that fail to self-document. Sometimes that crutch is necessary (open worlds, complex interiors), but the goal is environments that are navigable on their own.
How the overall game world is organized affects encounter pacing, player agency, and narrative delivery.
| Pattern | Structure | Pacing Implication | Best For |
|---|---|---|---|
| Linear | A to B to C, one path forward | Tight authorial control, curated experience | Story-driven games, cinematic set pieces |
| Hub-and-spoke | Central area with branching paths | Player-directed pacing, return-to-safety rhythm | Adventure games, RPGs with a home base |
| Metroidvania | Interconnected, gated by abilities | Mastery-gated exploration, revisitation rewards | Progression-focused, ability-unlock games |
| Open world | Free traversal, distributed content | Player-paced, risk of aimlessness and content drought | Sandbox, exploration-driven experiences |
| Roguelike/procedural | Generated layouts per run | High variety, low per-room handcraft | Replayability-focused, emergent narrative |
Most shipped games combine patterns:
Design rule: Choose the structure that serves your encounter pacing. If encounters need careful tuning, linear gives you control. If encounters need variety, procedural gives you breadth. The structure is not the game — it is the delivery mechanism for encounters.
Space tells story without dialogue. The environment is a narrative medium.
| Technique | How It Works | Example |
|---|---|---|
| Found objects | Items in context tell a story | A campsite with scattered belongings suggests hasty departure |
| Environmental details | Wear, damage, decoration reveal history | Claw marks on walls, faded posters, overgrown paths |
| Spatial narrative | The journey through a space IS the story | Ascending a tower shows civilization giving way to decay |
| Contrast | Juxtaposition creates meaning | A child's toy in a battlefield; a garden in a fortress |
| Absence | What's missing tells a story | Empty shelves, missing portraits, abandoned defenses |
For deeper narrative structure (quest design, branching dialogue, story arcs), see narrative-design.
Evaluate every encounter before shipping:
| Anti-Pattern | Why It Fails | Fix Direction |
|---|---|---|
| Stat-sponge enemies | HP as difficulty doesn't change player behavior — same fight, longer | Difficulty through behavior changes, not stat scaling |
| Empty arenas | Open space with no tactical features reduces combat to stat checks | Add cover, elevation, hazards, interactables |
| Spawn closets | Enemies appearing from nowhere breaks spatial reasoning | Enemies should be visible or their arrival should be telegraphed |
| Kill box repetition | Same rectangular room every fight creates encounter fatigue | Vary space vocabulary — alternate arenas, corridors, hubs, balconies |
| Behavior-less enemies | Enemies that just walk toward the player are mobile health bars | Give every enemy at least one behavior that changes what the player does |
| Unfair ambushes | Player punished for information they cannot have | Ambushes must be survivable on first encounter; telegraph before lethal |
| Difficulty cliff | Sudden spike with no ramp or new tools to match | Introduce the challenge element in a safe context before the hard version |
| Single-solution encounters | Only one valid approach kills replayability and expression | Ensure space and enemy composition support at least two viable strategies |
Three tight links. Everything else routes through the map, so adding a skill
touches one file rather than twenty: references/routing-map.md (in
game-design).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
game-design, encounter-design, level-design, boss-design, combat-design
40 skills in this plugin
/accessibility-designUse when designing any player-facing feature, evaluating a game for accessibility, responding to accessibility feedback, designing difficulty or assist options, adding subtitle/caption systems, implementing input remapping, or when a player reports they can't play. Covers the four accessibility pillars (visual, auditory, motor, cognitive), implementation tiers, colorblind design, subtitle standards, input accessibility, and testing methodology. Accessibility is a design discipline, not a post-launch checklist./async-and-socialSocial and competitive design that does not require players to be online together: ghost/replay data, leaderboards, asynchronous PvP, offline vulnerability, and anti-snowball mechanics. Use when adding leaderboards or high-score tables, designing ghost races or replay challenges, letting players attack or compete against absent opponents, deciding what social signal a single-player game should carry, or when matches and runs feel decided in the first minutes. Anti-snowball applies to single-player roguelikes and simulations too, not just PvP. For real-time multiplayer architecture, matchmaking, guilds, and moderation, this skill deliberately does not cover them — those are large specialities and belong in dedicated references./audio-designUse when designing how audio communicates game state, creates emotion, and serves as a feedback system. Activate for sound effect design, adaptive music systems, spatial audio, ambient soundscapes, audio priority and ducking, emotional audio design, and audio accessibility. Also activate when audio feels disconnected from gameplay, when players routinely play on mute (a design failure signal), when evaluating whether the audio stack has appropriate layering and variation, or when planning how music responds to gameplay context. This skill treats audio as a design system — not audio engineering or production, but the intentional design of what players hear, when, and why. Covers the full audio stack from music and ambience through sound effects, UI audio, and voice./camera-controlControlling a 2D or top-down game camera, not juicing it: a pure 'where it wants to be' target kept separate from 'how it gets there'; exponential damping versus a critically damped spring, with halflife as the tuning unit; velocity look-ahead and an aim lead on its own slow clock; zoom as a product of named factors (player base zoom, wheel, screen size, speed); combat framing that zooms out to keep every threat on screen, with a floor; an optional rotate-with-ship (heading-follow) mode and what it does to the HUD; shake applied only at render and never to the aim; one pair of world/screen conversions; and the camera options players expect. Use when building or reviewing a follow camera, adding zoom or a camera options tab, or when players say 'the view jumped when my mouse came back', 'I got shot from off screen', 'I can't see far enough ahead', 'the zoom makes me sick', 'it's too floaty' or 'too stiff', or 'the arrow points the wrong way'. Shake, punch and the trauma budget are game-feel's./cosmic-horror-registerTone, diction, and sensory palette for cosmic-horror game narrative — Lovecraftian, weird-fiction, eldritch, Arkham-adjacent, deep-time or deep-space dread. Use when writing or reviewing in-game text, story bibles, item descriptions, or interstitials for a cosmic-horror game; when horror prose reads as generic spooky rather than cosmic; when the mystery is being over-explained; or when a draft is leaning on words like eldritch, unspeakable, or indescribable to do the work. Also the worked example of the six-slot register template — read the Register template section to build folk-horror, noir, comic, or any other tonal register the same way. Layers on top of game-narrative-craft, which supplies the structural rules; this skill supplies only tone./data-driven-designTelemetry and analytics for games: event taxonomy and schema, engagement/progression/economy/balance/UX metrics, funnel analysis, A/B testing and when not to, cohort analysis, dashboard design, and the interpretation traps — Goodhart's Law, Simpson's paradox, survivorship bias, over-optimisation. Use when instrumenting a game, deciding what to measure, reading a retention or funnel drop, comparing cohorts, or when a metric moved and you need to know whether it means anything. Data-informed, not data-driven: numbers say what happened, not why. For pre-ship qualitative evidence use playtest-design.npx claudepluginhub rbergman/dark-matter-marketplace --plugin dm-gameOther plugins' skills for the same job