Combat

Centered on trading and countering with opponents and skills; the core revolves around windows, resources, and reading moves.

What is it

Trade blows with an opponent up close — when your health bar empties, you lose. Fighting games and action-game boss fights are built on this.

How it plays

You read the opponent’s wind-up, strike into the gap; when stamina runs dry you retreat while gasping — every hit lands with weight, every block is a held breath.

Why learn it

An introductory dissection of "the dueling feel" — once windows, resources, and move-reading click, every confrontation design has its skeleton.

Combat play translates "conflict" into readable exchanges: attacks have wind-ups, defenses have windows, resources have budgets — every strike settles risk against reward on the spot. The hard part is not the move count — it is the explainability of the exchange: unclear wind-ups kill counterplay, too-fast resource regen turns skills into mindless loops, and missing hit-stun robs impacts of weight. Players feel "that was a fair fight" because wins and losses both trace back to specific reads and choices.

Why This Mechanic Matters
For Players

Combat satisfies the deep pleasure of reading an opponent: wind-ups, hit-stun, and resource exchanges turn every victory into intellectual evidence — you know exactly where you won.

For the Ecosystem

Adversarial depth is the root niche of the action category: from side-scrollers to fighting esports, combat systems are the longest-lived content — a great combat system keeps players studying it for years, and that study itself becomes community and traffic.

Transferable Craft

Learn combat and you learn readable-bout design: the window/resource/read triad reappears in different forms across shooters, card games, and auto-battlers.

Play Behavior
Combat
Gameplay Features
Complexity
Advanced
Learning Goals
  • Beginner: understand the attack/defense loop — observe → strike → judge → feedback → resource regen — and reproduce one attack and one block in the demo
  • Intermediate: write the window contract (wind-up / block window / hit-stun) and the resource contract (stamina/cooldown spend and regen)
  • Advanced: design move-counter relationships and counterplay space, and verify balance with exchange ratio, block rate, and mash frequency
Core Patterns

② Instant Playable Demo

Combat Demo
Loading game…
Rule Hints
Rule: Observe opponent → Choose skill → Resolve (hit/block/evade) → Feedback (damage/stagger) → Resource recovery
Lab Guide: treat the demo as an experiment
Resource Exchange Experiment
Do: Spam "Attack (primary)" until stamina bottoms out, watching hits and damage change
Observe: Stamina is the attack budget: once empty, attacks whiff and you are forced into a regen window. The resource constraint forces a fight/rest rhythm — the cost of button mashing made explicit
Block Window Experiment
Do: As the enemy closes in, switch to "Block (secondary)" and watch guard and hp trade off
Observe: Blocking converts damage into guard drain: defense is not immunity but resource substitution. Once guard runs out, further blocks fail — the defensive window has its own budget, capping the turtle strategy
Difficulty Contrast
Do: On easy vs hard, "Advance 1 Step" 10 steps each and compare the hp drain curves
Observe: On hard, enemyHp is thicker and enemy attacks more frequent — same attack loop, completely different hp slope. Difficulty is fundamentally an adjustment of the exchange ratio: each of your hits buys less enemy health

③ Behavior System Breakdown

3.1 Problems Solved
  • Clarify attack/defense windows (wind-up/active/stagger) to reduce 'unfair hits'.
  • Use resources (stamina/cooldown/distance) to constrain skill usage, forcing choices and rhythm.
  • Balance hit weight and risk/reward so that 'attack/evade/block' each carry value.
  • Balance wind‑up length and rhythm: a too‑short wind‑up allows combos but removes counter windows; a too‑long wind‑up is easy to interrupt but allows move reading. Designers must balance combo fluidity with defensive readability.
  • Resource recovery speed versus skill variety: too fast recovery leads to mindless skill loops; too slow limits combo depth, increasing strategic depth.
3.2 Minimal Ruleset
  • Actions: the player may choose to attack, block, or move; attacks require a wind‑up window; movement requires a movement window.
  • Resolution: hit chance is based on accuracy + opponent's evasion; if accuracy > evasion, it's a hit; block chance is based on block rate + opponent's attack power; if block rate > attack power, it's a block.
  • Invincibility check: if a skill's invincibility frames exceed the opponent's action duration, the opponent cannot be hit.
  • Resources: stamina/cooldown; attacks consume stamina/cooldown; movement consumes stamina; blocking consumes stamina.
  • Windows: wind‑up, block window, movement window, stagger window; each window length is configurable.
3.3 System Loop (optional)
Input (skill selection) → Resolve (hit/counter) → Feedback (damage/stagger) → Resource change (cooldown/stamina) → New window → New input
Design Notes
Defense is not immunity — it is resource substitution: blocking converts health loss into guard-resource drain, so the turtle strategy caps itself at the defense budget without any extra ban.
Shorter wind-ups can make the game worse (counterintuitive): faster moves smooth out combos but compress the defender’s read window, degrading the duel into a pure speed contest — pace may only improve if counterplay space survives.
Hit-stun and knockback are the "weight" of a hit: players feel nothing from number decrements — it is the flinch and displacement that say "that landed." Without them, combat becomes two health bars being picked at.

④ Common Combos & Variants

Combat + Match
Use matches to trigger skills and rhythm points
Combat + Choice/Strategy
Add building/selection, allowing mid‑to‑long‑term decisions to influence the confrontation
Combat + Random
Affixes/loot alter responses, boosting replayability
⑤ Advanced Design & Algorithms (collapsed)Click to expand
Design Warnings
  • Unclear wind‑ups render counters ineffective, turning combat into a numbers game.
  • Too fast resource recovery leads to mindless skill loops.
  • Missing stagger/recoil removes weight from hits.
  • Shorter wind‑ups increase overall pace but may shrink defensive space, forcing players into passive attacks and counterintuitively lowering the experience.
Algorithm Examples
  • State Machine: skill states, cancellation, stagger, hit
  • Hit Detection: colliders, invincibility frames, combo windows

⑥ Related Case Articles

Randomized Equipment Affixes: Designing Affix Pools and Preventing Numerical Collapse
This article dissects the grouping strategy for equipment affix pools and the mechanics for controlling multiplicative stacking. It details soft caps and guarantee systems to mitigate exponential growth. By constructing independent affix pools, we avoid attribute conflicts, while using probability decay formulas to curb unchecked scaling. This approach preserves the thrill of randomized gambling without allowing numerical imbalance to break the game economy.
Roguelike Level Design: Random Pool Architecture and Build Power Scaling
A deep dive into constructing random pools and managing build power curves in Roguelikes. This guide details room event pool configuration, weight constraints, and budget-based allocation strategies to prevent power creep. It covers techniques for ensuring key node appearances, implementing soft-correction mechanics for player progression, and designing explainable randomness to deliver a rich yet balanced procedural generation system.
Random Skill Selection: Balancing Weights and New Player Safeguards
A deep dive into Roguelike random skill selection mechanics, detailing skill pool structures and weighting algorithms. Learn how synergistic weighting balances diversity while new player safeguards prevent numerical collapse, effectively resolving choice anxiety and optimizing combat generation.
Talent Trees: False Choices vs. Real Choices, and How to Set Reset Costs
A deep dive into talent tree mechanics, distinguishing the underlying logic between false and real choices. Analyze how branching differences drive strategy and how key nodes impact growth paths. Explore reset cost design strategies that increase choice penalties while ensuring a smooth respec experience through economic loops, effectively alleviating beginner trial-and-error anxiety.
Organizing Combat Unit Behavior with State Machines
This article dissects the state machine pattern for combat units, detailing how to decompose complex logic into independent state nodes. Readers will master constructing state transition tables to eliminate verbose conditional checks, enabling visual debugging and low-cost expansion while effectively resolving multi-behavior coupling challenges.