AetherCombat · built on Aether Engine

Combat
Systems

Physics-driven melee, run as a batch ECS simulation. Coordinated, readable, deliberately fair — the AI wins on decisions, never on information it shouldn't have. The combat brain behind Masuki Quest.

Arch ECSJolt Physicsno wallhacksMasuki Quest
scroll
5
core systems
14+
agents / fight
0
wallhacks
per‑bone
hit detection
SEC.01 — Architecture

One frame, five systems

Logic lives in stateless systems, presentation in Godot nodes. Order is load-bearing — each stage consumes what the last produced.

Perception
Squad
AI
Locomotion
Combat

The fight is an Arch ECS simulation: thousands of small components, a handful of systems that sweep them in a fixed order every physics tick. A CombatCharacter node is only a body — the decisions happen in data. That keeps 14+ agents cheap, deterministic, and debuggable: you can log any component and replay a frame.

Crucially, perception runs first and everything downstream trusts only its output. No system peeks at the raw scene to find an enemy behind a wall — if perception didn't see it, the AI doesn't know it. That single rule is what makes the fights feel fair.

Perception & awareness

Fighters know only what they can see. A spatial grid finds candidates; capped raycasts confirm them. Three rules turn raw sightings into something that feels intelligent:

  • Commitment — hold the current target while it stays visible instead of re-picking the nearest every frame, so fighters don't dither between two foes.
  • Memory — when a target ducks behind cover, chase its last-known position for 8s before giving up.
  • Threat priority — wheel to meet whoever is about to hit you, not merely the closest body.
threat = −distance (+6 mid-swing, +2 recover)
commit → keep target < margin
memory → last-known 8.0s
perception == the player's. no cheating.

Squad coordination

The "movie fight" layer. Allies converging on one target take turns: only the nearest few hold an attack permit; the rest flank to slots around the target.

Ranks recompute every frame, so turn-taking emerges instead of being scripted — as the front fighter recovers, the next in line is promoted into the opening. Nobody piles in at once, and nobody stands idle.

attacker — permit flank ↖ flank ↗ flank ↘ wait ↙

Morale

Confidence, seeded from personality and moved by events. It multiplies aggression and adds evasiveness — rattled fighters turn timid, bold ones press the advantage.

Because morale feeds back into the AI's action weights, a fight has a psychological arc: land a couple of clean hits and the line wavers; lose an ally and the whole squad pulls back.

land hit
+.06
take hit
−.10
score kill
+.25
ally dies
−.20

Contact hit detection

Query-driven, not resident. Capsules on labelled bones (head ×2, torso ×1, limbs ×0.7) cost nothing until a swing's contact frame sweeps the blade against them — returning the struck bone, the point, and the multiplier.

Miss the geometry and you miss for real: there is no aim-assist, no "close enough." Aiming the swing is the skill.

head ×2.0 torso ×1.0 arm ×0.7 leg ×0.8

Reactions & committed attacks

Struck fighters flinch from the real contact point — a procedural bone kick for everyone (Tier A), a partial ragdoll up close (Tier B). Nothing snaps to a canned "hit" clip.

Attacks are full-body committed: the swing owns the body until it finishes and can't be cancelled back into a walk mid-strike, so whiffing has weight and punishing an over-commit is real.

Tier A procedural flinch — all agents
Tier B partial ragdoll — near camera
attack holds Duration — full body

Weapon cadence & finishing the kill

Every weapon carries its own attack-speed multiplier, so one move-set reads differently in different hands — a sword snaps at ×1.3, a war‑hammer lands heavy at ×0.9. Reach, knockback and cooldown ride along on the same weapon definition.

When a foe finally drops, fighters don't blink back to calm. A tunable corpse-aggro window lets them keep swinging at the body — 0 disengages instantly, a few seconds means "make sure", and -1 never lets up — then they fall back to their guard post or patrol.

sword ×1.3 hammer ×0.9 corpse‑aggro 0 / N / −1s then → guard
SEC.02 — Doctrine

Personality is the balance sheet

Behaviour derives from Pathfinder abilities + OCEAN traits — not hand-authored trees. Tune the stats, get a fighter.

💪

Strength

Damage, knockback, desperation when wounded.

🏃

Dexterity

Move speed, dodge, evasion window.

🛡

Constitution

Max HP and poise — resists stagger.

🔥

Extraversion

Assertiveness — presses the attack.

🧠

Int + Openness

Tactical variety — longer, less predictable combos.

😨

Neuroticism

Fear — evades and flees when hurt.

SEC.03 — Under the hood

Animation, motion & ragdoll

Motion-matched locomotion

Movement blends a walk/run space by speed, with an upper-body mask layering a weapon-ready pose over the arms. Reactions and attacks travel a state machine (Movement ↔ Attack1..5 / Block / Hit1..3 / Dodge*), so the same rig serves the whole move-set without bespoke transitions.

Two-tier ragdoll

Everyone gets the cheap procedural flinch. Near the camera — where it reads — a PhysicalBoneSimulator3D takes over the struck limbs for a partial ragdoll, then blends back to animation. Lethal hits hand the whole body to physics with the killing impulse.

Why ECS here and nodes in the sim? Combat is a tight, performance-critical loop over many identical agents — perfect for data-oriented systems. The life sim is a handful of authorable, one-off characters where per-character nodes and components read more clearly. Right tool, right layer.
Beyond the duel

More ways to fight

The same faction, perception and morale foundations drive new combat surfaces.

AI vehicles & crews

Self-driving CombatVehicles hunt hostiles, circle to keep guns on target, and fire leading shells — and they sense edges and danger zones, steering around ledges and hazards instead of driving off. A crew AI walks up, boards, and the tank fights under its faction; it ejects when the wreck dies.

drive AIturret + shells edge / hazard sensingcrew boards & drives

VR melee — read the swing

A motion-tracked weapon judges strikes by real movement: block by putting the weapon in the attack's path (it costs stamina), parry by striking the incoming blade just before it lands, and heavy attacks gated on a genuine swing arc and grip travel — a wrist-flick never counts. Each weapon type maps horizontal/vertical/thrust arcs to its own heavy.

weapon in pathBLOCK (stamina)
hit blade, timedPARRY
full arc + travelCleave / Impale

Freeze and corpses

Freeze all combat with one call — everyone holds mid-frame, then resumes exactly where they left off. Fighters keep hacking a downed foe for a tunable window (per-enemy, -1 = forever) before returning to guard.

freeze / resumecorpse aggro (-1 = forever)