Combat effects and moving rigs

This increment is untested until farm checks and native captures run. See Lab/fxpro/README.md.

Frame events: attack@0=anticipation:0.2, attack@0=trail:tip, attack@1=slash:arc_wide, attack@1=fx:heavy_slash. The ribbon follows the posed Paper Forge tip socket, stores at most 24 samples, fades after the swing and breaks on teleports. Missing sockets draw no trail. slash:arc_wide uses 2D/paperforge/arc_wide/arc_wide@2x.png at radius 90 when that authored Paper Forge asset is present. A slash value containing / uses that explicit asset image at radius 62. slash:arc always uses geometry. Without art, the slash follows the sampled sword path at the same radius; fewer than three distinct points use a fixed crescent until a curve is available. Each slash keeps its own swing path when a later trail starts. Fast socket poses retain one motion smear per trail for 1/60 second, so it survives both simulation ticks before a 60 Hz draw. It expires during hit-stop and clears when effects are disabled. Squash changes drawing scale only. impact:invert is a dark silhouette for two 60 Hz frames; impact:white is white. It is not photographic inversion of the background. Accepted hits use action_2d flash duration.

Scripts: self.weaponTrail('tip',0.3,14,{color:[0.2,0.7,1],glow:0.8,fade:0.18}); self.rig.lookAt([x,y]); self.rig.lookAt(null). The optional style sets RGB color, additive glow and each sample's fade in seconds; three-argument calls keep their defaults. Swift weaponTrail accepts color, glow and fade too. game.slowMotion(0.2,0.65) slows simulation while presentation continues. self.hit(boss,{damage:1,key:'finisher',boss_final:1}) starts slow motion only on the hit crossing health zero. action_2d team boss also enables it; an about boss tag alone does not. The session applies this scale to script time and physics; sequence time scale remains separate.

Bones named hair/cape/plume/chain/tail receive spring motion. spring or tag=spring opts other bones in; spring=false opts out. Tune spring_frequency, spring_damping and spring_limit per bone. Only existing rig parts can move: a plume painted into a head needs separate art and a bone. Crossfades use blend; run lean and named leg/foot IK use motion and floor queries. Explicit script IK targets win. Springs hold during hit-stop.

See 2d-fxpro-recipes.md for JSON recipes and game.effectRecipe registration. Particle hits are presentation only. Ground stains remain world-fixed for 30 seconds and draw at layer 1; they do not follow platforms. Heavy recipes pulse chromatic separation and radial blur in Metal and GL. These are screen-centered, whole-canvas effects and currently affect HUD pixels in the canvas too.

game.feel() includes combat particle/sprite/decal counts, dropped effects, weapon trails, simulation scale and fx_cpu_ms. That metric covers effect simulation, collision queries and primitive creation, excluding rig animation, scene batching, uploads and GPU work. Microbenchmarks also exclude real scene collision lookup. None alone proves the requested full effects frame cost.

Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free