Building an RPG Combat Runtime
12. Complete Runtime
Review the full RPG combat flow as one composed system.
The completed example is in the crate:
cargo run -p flexweave --example rpg_combatThe flow proves the full line through the guide:
- Create player and enemy objects.
- Attach profile and faction data.
- Store current health, mana, and base stats.
- Derive max health and attack speed from base stats plus active effects.
- Grant player abilities.
- Gate activation with cooldowns, mana, and target checks.
- Commit abilities into costs, cooldowns, and effects.
- Apply instant damage and duration buffs.
- Tick time, execute Bleed, and expire buffs.
- Publish lifecycle facts and project signals.
- Destroy the enemy and clean object-keyed stores.
The example is not a framework you must copy. It is one ordinary Rust runtime that composes Flexweave primitives at the boundary where application meaning belongs.
Continue with Core Concepts for a slower explanation of each primitive.