Module gameplay

Source
Expand description

Composable game-loop rules. Hosts provide accepted events and simulation time. No renderer, ECS, platform, or external dependencies. See docs/GAMEPLAY_40.md.

Modules§

buffer
One pending command, consumed only when the host can execute it.
charge
Hold/release actions with minimum commitment, capped power and recovery time.
checkpoint
Ordered, authored respawn anchors with rules-checked compact snapshots.
combo
Timed chains reward continued accepted actions. Hosts own event deduplication.
crafting
Recipe preview and execution on a copy, committed only after all costs and outputs fit.
homing
Bounded 2D turning for rockets, enemies and boomerangs. Does not query targets.
interaction
Hold interactions bound to a specific actor/target pair with explicit interruption.
inventory
Fixed-capacity inventories with one bounded stack per item and atomic edits.
loot
Seeded weighted choices with setup-time validation, fixed storage and no floats.
magazine
Ammunition and reload timing. A shot spends one round only on acceptance.
pickup
Pickup attraction toward an authoritative target. Hosts resolve walls before accepting the returned position/collection; attraction grants no collision bypass.
pity
Bound unlucky reward droughts without reroll loops or hidden probability changes.
platforms
Reusable platform mechanisms; hosts provide collision-confirmed contact edges.
progression
Integer experience curves, with at most 1023 promotions per award.
projectile
Per-projectile target deduplication, piercing and ricochet budgets.
shield
Shield absorption and delayed regeneration independent of health/damage types.
skill
Precision-return rewards gated on confirmed gameplay progress between returns. Repeated empty bounces cannot farm points. Host collision supplies -1..1 offset.
spawn
Deterministic safe-spawn selection. Hosts supply authoritative occupancy and line-of-sight eligibility before spending encounter credits.
stagger
Poise accumulation, finite stagger windows and opt-in recovery resistance.
trial
Ordered time-trial splits and authored medal thresholds on simulation time.
upgrades
Capped upgrade ranks and distinct seeded offers. The host defines rank effects.
waves
Authored wave sequencing composed with the shared encounter director.

Enums§

LoopError
Invalid authoring/input, capacity exhaustion, or an unavailable action.