Guide

Game area of effect (AoE) systems explained

Harbor Ruins' archmage boss was tuned around “positional mastery”: three expanding rings, a rotating flame cone, and a delayed meteor at the arena center. Playtesters called it cheap — not because damage was high, but because the flame cone's hurtbox extended 0.4 meters past the ground decal, ring hits registered through pillars, and the meteor telegraph appeared only 0.6 seconds before impact. The refactor did not nerf any ability. It aligned decals to query shapes, added 1.2-second windups with audio cues, and capped simultaneous AoE queries per frame. Wipe rate on the encounter fell 38%; “unfair AoE” survey tags dropped 71%.

Area of effect (AoE) attacks damage or modify every valid target inside a spatial region — circles, cones, lines, rings, chains, and persistent ground zones. They power mage novas, boss breath weapons, grenade blasts, and cleave melee swings. This guide covers shape taxonomy, hit-detection models, targeting and falloff rules, telegraph readability, performance budgets, multiplayer authority, the Harbor Ruins refactor, a technique decision table, pitfalls, and a production checklist. For ballistic travel and pierce, see projectile systems; for typing and resistance, see elemental damage.

AoE shape taxonomy

Designers often describe abilities as “an AoE” without specifying geometry. Production code should tag every ability with a shape class and parameters:

Shape Parameters Typical use Readability note
Circle / sphere Center, radius Nova, grenade, heal pulse Ground decal + height cap for jumps
Cone / wedge Origin, direction, angle, length Breath, shotgun, frontal cleave Edge lines must match hurtbox exactly
Line / beam Start, end, width Laser sweep, shockwave lane Width often underestimated in 3D
Ring / annulus Center, inner R, outer R Expanding shockwave, safe center Inner safe zone must be obvious
Chain / jump Max hops, range, decay Lightning, ricochet heal Show hop path in tooltip
Ground zone Polygon or circle, duration Fire pool, capture point Enter/exit events, not just tick
Arc sweep Origin, radius, start angle, sweep Spin attack, boss tail swipe Rotate telegraph with animation

Melee cleave is often a short cone or arc in front of the attacker, not a true radius circle. Document whether height (Y axis) is ignored, clamped, or fully 3D — players learn jump-timing around 2.5D circles that do not match vertical cylinders.

Hit detection: overlap, sweep, and fan

Three production patterns cover most AoE:

  • Instant overlap query — on impact frame, query physics or spatial hash for colliders inside the shape. Cheap for novas and detonations. Risk: tunneling if the shape spawns inside geometry.
  • Swept shape — cast the volume along motion (boss tail, rotating beam). Prevents “it hit me through the wall” when the sweep respects line-of-sight layers.
  • Ray fan / multi-ray — approximate cones with N rays; fast but jagged at low N. Use 12+ rays or analytic cone tests for competitive PvP.

Always filter candidates with: team mask (friend/foe/neutral), line-of-sight channel, invulnerability tags, and CanBeHitByAoE flags (pets, destructibles, shields). Sort by distance for max-target caps — “hits 5 nearest enemies” needs deterministic tie-break (entity ID) in multiplayer.

Damage application rules

AoE is not only “apply damage once.” Specify per ability:

Rule Options Design impact
Hit count Once per cast vs multi-tick zone Zones pair with DoT; see status-effect containers
Re-hit policy Immunity window, per-cast ID Prevents machine-gun nova exploits
Falloff Flat, linear, quadratic by distance Rewards positioning without binary dodge
Friendly fire Off, reduced, full Co-op griefing vs tactical depth
Self-damage Include caster, exclude, half Rocket-jump skills need explicit policy
Pierce Ignore shields, stop at first Must match projectile pierce for consistency

Falloff curves should appear in tooltips: “100% at center, 50% at edge.” Hidden falloff feels like random crits. For elemental typing and resistance per target, reuse the pipeline from elemental damage so novas and bolts share one mitigation path.

Telegraphs, timing, and fairness

AoE fairness is mostly telegraph quality, not DPS numbers. Minimum viable package:

  1. Windup phase — animation + ground decal before damage frame. Boss AoE: 1.0–2.5 s for mechanics players must learn; trash mobs: 0.4–0.8 s.
  2. Audio cue — distinct sound per shape (cone vs ring); stereo pan toward origin.
  3. Decal fidelity — VFX mesh matches query math within one player capsule radius. QA with debug draw overlay.
  4. Safe zones — ring attacks need a visibly empty center; color-blind patterns, not red-only.
  5. Recovery window — after damage, 0.3–0.6 s where boss is punishable; pairs with boss phase design.

Delayed detonation (meteor, timed bomb) must show target reticle at cast time and track ground position if the caster moves. Snap-back teleports that move the impact after telegraph placement are a top source of “unfair hit” reports.

Performance and spatial indexing

Naive AoE scans every entity in the level. At 200 actors, a boss firing three rings per second will stutter. Standard mitigations:

  • Uniform grid or BVH — broad-phase before precise cone tests.
  • Query budget — cap AoE evaluations per frame; queue overflow to next tick for low-priority environmental zones.
  • Layer masks — only query combat layer, not scenery props.
  • Cached static zones — capture points rebuild membership on enter/exit triggers, not per-frame overlap.
  • LOD for VFX — distant AoE decals become simple quads; hit logic stays full fidelity server-side.

Profile with worst-case horde scenarios: 40 enemies, three players, two persistent pools, one chain-lightning every 2 s. Target sub-2 ms broad-phase per frame on console budgets.

Technique decision table

Goal Prefer Avoid when
Hit clustered adds Circle nova, ground zone Single-target DPS check only
Directional skill expression Cone, arc cleave Camera cannot show floor decal
Long-range threat Projectile with impact AoE Need instant zero-travel punish
Sustained area denial Ground zone + DoT ticks Performance budget is tiny mobile
Boss “everyone must move” Ring with safe center Arena smaller than outer radius
Chain lightning fantasy Jump graph with decay Targets spread beyond hop range

Single-target bolts excel when you want readable counterplay via dodge i-frames. Projectiles excel at travel time and cover. AoE excels at pack control and coordinated movement checks — pick the verb that matches your encounter script.

Harbor Ruins archmage refactor (worked example)

Three abilities shared the “fire” icon but used incompatible geometry: Flame Cone (120° wedge), Shock Rings (dual expanding annuli), and Meteor (delayed circle). Refactor steps:

  1. Introduced AoEShape component: type enum + params serialized per ability.
  2. Debug overlay draws exact query in QA builds; decal scale driven from same params.
  3. Flame Cone: windup 1.0 s, query matches 8 m length / 120°, LoS blocked by pillars.
  4. Shock Rings: inner safe radius 3 m painted white; outer edge damage only; two rings 0.5 s apart.
  5. Meteor: reticle at cast, 1.4 s delay, impact radius 5 m; caster slide does not move reticle.
  6. Falloff: 100% center, 70% mid, 40% edge — stated in ability tooltip.
  7. Server validates shape + timestamp; clients play VFX only.
  8. Capped 24 overlap tests per frame on boss script; pooled query structs.

Outcome: mean attempt time -22 s, healer deaths -31%, no ability damage number changes.

Multiplayer authority

Server (or host) computes overlap on damage frame using authoritative positions. Clients may predict VFX early but never apply HP changes. Serialize: abilityId, shapeParams, origin, direction, castTime, hitList[] with per-target damage after falloff.

Lag compensation: optional rewind for player-origin cones in PvP shooters; for PvE bosses, favor readable telegraphs over sub-frame rewind. Chain lightning must use the same hop order on all clients — sort targets by distance then entity ID. Apply status effects in the same packet as damage to avoid desync ghosts.

Common pitfalls

  • Decal smaller than hurtbox — the classic “I was outside the red.”
  • Vertical mismatch — cylinder hits players on balconies above a flat circle VFX.
  • Wall penetration — overlap query ignores LoS layer.
  • Telegraph after animation start — damage frame before decal visible.
  • Unbounded chain range — lightning crosses the entire arena.
  • Re-hit every frame — standing in pool melts without immunity window.
  • Friendly fire surprise — co-op nova kills allies with no warning icon.
  • O(n) full scans — frame spikes when add count spikes.

Production checklist

  • Tag every AoE ability with shape type, params, and 2D vs 3D height policy.
  • Share one overlap utility; debug-draw matches production math.
  • Define team mask, self-damage, friendly fire, and max-target rules per ability.
  • Document falloff curve; show center vs edge % in tooltip.
  • Ship windup + audio + decal before damage frame; measure telegraph-to-hit ms.
  • Mark safe zones clearly on ring and donut attacks.
  • Specify re-hit immunity window for persistent zones.
  • Broad-phase with spatial hash; cap queries per frame on boss scripts.
  • Server-authorize hit lists; deterministic sort for chains and cleaves.
  • QA: stand at decal edge, behind cover, on elevation, and at max chain range.
  • Telemetry: hits per cast, average targets hit, deaths inside zone %, “unfair AoE” tags.
  • Accessibility: shape outline, non-color telegraphs, screen shake toggle.

Key takeaways

  • AoE fairness is telegraph fidelity, not just damage tuning.
  • Every shape needs explicit params shared by VFX and hit queries.
  • Falloff and friendly-fire rules belong in player-facing tooltips.
  • Spatial indexing is mandatory once adds and zones stack.
  • Pick AoE when the encounter needs movement; pick projectiles when travel time matters.

Related reading