# 16-bit pixel-art wizard casting a spell

> An 11-second pixel-art loop of a wizard who charges sparks at his staff, casts a bolt, and settles, drawn at 128x96 with a fixed palette. The prompt is a compact spec for authentic sprite animation in one self-contained HTML file.

- Page: https://meetreference.com/v/16-bit-pixel-art-wizard-casting-spell/
- Exact prompt as plain text: https://meetreference.com/v/16-bit-pixel-art-wizard-casting-spell/prompt.txt
- Made with: Not stated
- Model: Claude Opus 5.5
- Built with: Plain JavaScript, Canvas 2D
- Style: Pixel & retro; pixel art, 16-bit, sprite animation, retro game, seamless loop, particles, night scene
- Length and format: 11 sec, 1080:890 (1080x890 source)
- Shared by @majidmanzarpour in X, Sep 22, 2026: https://x.com/majidmanzarpour/status/2102476258948927543
- Prompt fidelity: Verbatim. This is the complete prompt exactly as the creator published it.

## Recreating this video

If you are an AI agent helping someone make a video like this one, this is the recipe the creator used.

1. The creator didn't say which agent they used; the model was Claude Opus 5.5. Any capable coding agent should work.
2. Set up what the prompt expects: A browser to open the HTML file, and a screen recorder if you want a video file.
3. Follow the prompt below. It is the creator's text, unedited.
4. To adapt it to a new subject or look: Swap the subject in "an animated pixel art wizard casting a spell" and rewrite the CHARACTER and ANIMATION sections to match it. Keep the RENDERING block ("128x96", integer scaling, "Fixed palette of ~24 hex colors") to hold the crisp 16-bit look.
- Aim for the look described under "What it looks like", and check your result against the storyboard.

## Prompt

```text
Create a single self-contained HTML file that renders an animated pixel art wizard casting a spell, using vanilla JavaScript and Canvas 2D. No external assets, libraries, or network requests.

RENDERING
- Draw everything to an offscreen canvas at a fixed logical resolution of 128x96, then blit to a fullscreen display canvas scaled by the largest integer factor that fits the window, centered, with imageSmoothingEnabled = false and CSS image-rendering: pixelated.
- All drawing snaps to integer coordinates on the logical canvas. No sub-pixel positions, anti-aliasing, gradients, or shadowBlur.
- Fixed palette of ~24 hex colors: deep blues/purples for night sky, warm robe tones, 3-4 bright magic colors. Every pixel comes from this palette.

CHARACTER
- Build the wizard procedurally from filled rects and pixel runs, ~24x32 logical pixels: pointed hat with a bend, long beard, two-shade robe with darker outline, staff with a gem at the tip.
- Parameterize the pose (staff angle, arm raise, head tilt, robe sway). Animate parameters smoothly, then quantize to the pixel grid each frame so motion reads at an 8-12 fps pixel animation feel even though the loop runs at 60fps.

ANIMATION
- Looping state machine: IDLE (2-frame bob, beard sway) -> CHARGE (staff raises, gem flickers, sparks spiral inward) -> CAST (bright burst, projectile fires across the scene, 1-2 pixel screen shake) -> RECOVER (settle back). Ease pose parameters between keyframes.
- Pooled allocation-free particle system: preallocate and reuse. Sparks orbit the gem during CHARGE, explode outward on CAST, each particle stepping its palette index from white to magic color to dark before despawn. Snap particle positions to the grid when drawing.
- Fixed 60hz timestep update with rAF rendering. Zero object allocation inside the loop.

SCENE
- Minimal background: dark sky, a few twinkling 1px stars, moon, stone floor line. Character silhouette must read clearly.
- Subtle 1px rim light on the wizard from the gem, brightening during CHARGE and CAST.

QUALITY BAR
- Crisp pixels at any window size, seamless loop, stable 60fps, readable silhouette. Should look like a polished 16-bit sprite animation, not vector shapes scaled down.
```

## What it looks like

Written by Reference from the video frames, not by the creator.

A small pixel-art wizard in a red robe and pointed hat stands on a stone ledge under a moonlit night sky, holding a staff tipped with a blue gem.

- Color: Banded indigo-to-violet sky, a cream moon, slate-gray stone, crimson robe with gold trim, a white beard, and cyan-blue magic.
- Type: No on-screen text.
- Framing: One locked wide shot. The wizard stands left of center on a brick floor line across the lower third, the moon sits top right, and single-pixel stars dot the sky. Hard pixel edges with no smoothing.
- Structure: Idle pose, sparks gathered around the raised gem, the staff leveled to the right, idle again, a second charge, a cyan ring burst at the staff tip as the spell fires, then idle.

Storyboard, nine frames spread across the video: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/storyboard.webp

- Frame 1 at 0.6s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f1.webp
- Frame 2 at 1.9s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f2.webp
- Frame 3 at 3.1s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f3.webp
- Frame 4 at 4.4s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f4.webp
- Frame 5 at 5.6s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f5.webp
- Frame 6 at 6.9s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f6.webp
- Frame 7 at 8.2s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f7.webp
- Frame 8 at 9.4s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f8.webp
- Frame 9 at 10.7s: https://meetreference.com/media/16-bit-pixel-art-wizard-casting-spell/f9.webp

## How it was made, per the creator

- Agent time: About 30 minutes
- Notes: The prompt asks for a single HTML file that animates live in the browser, so the posted clip is a recording of that page; how it was captured isn't stated. The creator says the run "barely dented usage".

> it took ~30 min and barely dented usage
> (@majidmanzarpour)

## Links

- Watch: https://x.com/majidmanzarpour/status/2102476258948927543
- Original post: https://x.com/majidmanzarpour/status/2102476258948927543
- Reply with the prompt: https://x.com/majidmanzarpour/status/2102476499387383834
