Expand description
Chaos RPG Animation State Machines, Blend Trees, and IK
Wires the Proof Engine animation infrastructure into the Chaos RPG game loop. Every entity is an amorphous cluster of glyphs — animation here means driving per-glyph transforms (position offsets, scale, rotation, emission) through state machines, blend trees, and simplified inverse kinematics.
Structs§
- Anim
Pose - A snapshot of per-glyph transforms for an entire entity.
- Anim
Transition Def - Defines a transition between two animation states.
- Animation
Manager - Centralized animation manager owning all active controllers.
- Attack
Power Blend - AttackPowerBlend: parameter = force_stat [0, 1], blends light swing into heavy swing.
- Blend
Tree1D - A 1D blend tree: interpolates between poses based on a single float parameter.
- Boss
Anim Controller - Per-boss animation controller wrapping EnemyAnimController with boss-specific logic.
- Cast
Intensity Blend - CastIntensityBlend: parameter = mana_cost_fraction, small cast → large cast.
- Damage
Reaction Blend - DamageReactionBlend: parameter = damage_fraction [0, 1], small → large recoil.
- Enemy
Anim Controller - Simpler animation controller for enemies.
- Glyph
Transform - Transform applied to a single glyph within an entity.
- IKChain
- A simplified 2-bone IK chain operating on glyph positions.
- IKLimb
- Named IK chain for a specific limb/purpose.
- Idle
Walk Blend - IdleWalkBlend: parameter = movement_speed [0, 1], blends idle bob into walk bob.
- Player
Anim Controller - Drives per-glyph transforms for a player entity based on the current state.
Enums§
- Algorithm
Anim State - Algorithm boss: multi-phase encounter with entity reorganization.
- Blend
Curve - Easing function applied during state transitions.
- Boss
State - Unified boss state enum.
- Committee
Anim State - Committee boss: judges that vote on player fate.
- Enemy
Anim State - Base enemy animation states.
- Hydra
Anim State - Hydra boss: can split and reform.
- IKTarget
- What an IK chain is targeting.
- Player
Anim State - All possible player animation states in the Chaos RPG.
Functions§
- build_
transition_ table - Return the full transition table as a Vec (useful for inspection/serialization).
- look_
at_ ik - Create a look-at IK limb for head/eye orientation.
- shield_
ik - Create a shield IK limb that positions between player and threat.
- solve_
two_ bone - Analytical two-bone IK solver.
- staff_
aim_ ik - Create a staff-aim IK limb for mage casting.
- weapon_
arm_ ik - Create a weapon-arm IK limb that aims at the current target enemy.