Files
wizwar6e/research/fx3d-sprite-spec.md
T
Eric WagonerandClaude Fable 5 e8c6b93c71 Stage three: spells fly through your own eyes
The reel's first-person mode now shows the fight, not just the rooms.
The board flourishes' event map is recast into world space (fx3d):
fireballs, bolts, and thrown things streak caster to target as glowing
billboards; landings swell and fade; blows that land on YOU wash the
screen red and jolt the camera; warp-steps and teleports flash violet;
a hurled body glides fast and straight with its eyes held steady. Nine
paintable conjuration sprites ship at public/fx3d (spec for the artist
in research/), shown in the token workshop beside the masonry.

Three rough edges sharpened along the way: sprites now project through
warp mouths under the same rigid motion the rays use, clipped by the
depth buffer to the opening; fire and warp surfaces pull a different
texture slice per world cell so a long blaze reads as one; and the
replay camera only turns toward an actor its eyes could actually see.

Two more gifts: the reel can record its first-person canvas straight
to a downloadable WebM (⏺ save video), and the About tab now shows
visitors the way into the three workshops.

One buried mine defused: rAF hands frame-start times that can precede
the tween's own clock, and a zero-length turn divided by it — one NaN
facing poisoned every ray black and re-triggered the camera effect
forever. The tween clamps and guards its phases now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 14:51:04 -04:00

50 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# The conjuration sprites — a spec for the artist
The first-person view (`/?fpv`, and the replay's "your eyes" mode) throws
spell moments through the air as **billboard sprites**: flat images that
always face the camera, drawn glowing in mid-air, occluded by walls, and
scaled by distance. Nine sprites cover every spell moment in the game.
Each lives at `packages/web/public/textures/../fx3d/<name>.png` — replace
the file, refresh, done. The current files are placeholder radial glows;
all nine are shown side by side at `/?tokens` under "The conjurations."
## Technical requirements
- **Format:** PNG with a transparent background. The transparent area is
essential — whatever is opaque is what flies.
- **Size:** square, any resolution; 128×128 or 256×256 recommended. The
renderer scales freely and pixelates on magnification (the whole view
is deliberately chunky, like the wall textures).
- **Drawn additively:** sprites are composited in "lighter" (additive)
mode over a dark dungeon, so dark pixels vanish and bright pixels glow.
Paint light-on-transparent; pure black will be invisible. Midtones read
as translucent light.
- **No animation frames.** Each sprite is a single still. Motion comes
from the renderer: projectiles streak across the room, impacts swell
from small to large while fading out. Radially symmetric (or nearly so)
designs work best since the image does not rotate.
- **Fills most of the canvas.** Leave only a small transparent margin;
the renderer sizes the sprite by its canvas, not its painted extent.
## The nine sprites and where they appear
| file | flies as | moment |
| --- | --- | --- |
| `fireball.png` | projectile | Fireball, Sudden Death, Blaster Wand — a ball of fire streaking caster → target |
| `bolt.png` | projectile | Lightning Blast, Power Drain — a crackling bolt |
| `waterbolt.png` | projectile | Waterbolt — a hurled gout of water |
| `spark.png` | projectile | anything else that travels: thrown objects, bodies knocked back, dragged things — a neutral streak of force |
| `burst.png` | impact | a fireball landing; victory fireworks — swells and fades |
| `splash.png` | impact | waterbolt landing, stone turned to water |
| `hit.png` | impact | damage landing on someone you can see; punches, claws |
| `shimmer.png` | impact | teleports, warps, illusions, minds touched — the general "magic happened here" glimmer, violet by tradition |
| `shield.png` | impact | an attack fully stopped; absorbed spells |
Projectiles hold their size in flight (about a third of a wizard's
height). Impacts start small and swell to roughly double while fading —
so an impact painted as a ring or burst reads especially well.
What the sprites do NOT need to carry: screen-wide flashes when YOU are
hit (red), healed (green), or teleported (violet), and the camera shake —
those are renderer effects, not images.