Alle Motions

Pixel-Zauberer

Pixel-Art in 120 × 120: ein Zauber mit Paletten-Licht

Created with AI
  1. 0–3 s Nacht auf der Klippe, der Zauberer atmet, verlagert sein Gewicht und blinzelt, Gras und Bart wehen, Glühwürmchen blinken
  2. 3–7,4 s Er hebt den Stab, der Runenkreis baut sich Glyphe für Glyphe auf, Funken kreisen in den Kristall, die Robe bauscht sich im Aufwind
  3. 7,4–8,6 s Er duckt sich, stößt zu, der Blitz verästelt sich und zieht in den Himmel, Rückstoß, die Kugel schwillt an
  4. 8,6–11 s Einschlag mit Hit-Stop und Screenshake, die Sigille baut sich in fünf Ticks auf, alles leuchtet türkis, sein Schatten fällt auf den Pfeiler
  5. 11–16 s Die Sigille zerfällt in Funken, Glut erlischt auf dem Fels, der Runenkreis geht Glyphe für Glyphe aus, er setzt den Stab wieder auf
  • Pixel-Art
  • 16 s Loop
  • 1080² · 30 fps
  • Canvas 2D
  • 1,2 MB

Prompt

Englisch · für Claude Code, Codex & Co. · 1.285 Wörter
Build a 16-second looping pixel-art scene, 1080×1080: an old wizard on a cliff at night charges and casts a spell that lights up the whole scene, then settles back to idle. Animate it like a pixel artist would, frame by frame: anticipation, follow-through, overlap.

DESIGN
- Real pixel art: draw everything into a 120×120 buffer of palette indices (whole logic pixels only, no anti-aliasing, no alpha, no soft gradients), then scale it up ×9 onto the 1080 canvas with imageSmoothingEnabled = false and image-rendering: pixelated. Lines with Bresenham, ellipses and circles as pixel-perfect loops (no L-shaped double pixels).
- Palette, 24 colours: void #0a0a17 · night #121634 #1b2150 #283070 #3d4a92 · pale blue #6c7cc0 · white #f2f4ff · stone #1a1424 #2e2638 #4a3e52 #6f6276 · wood #2a1c18 #5c3a26 · teal #0e5a66 #1fa3a6 · mint #7ef0d6 · robe #2a1846 #4b2a78 #7d4fae · skin #d79a78 #94563f · beard #c9c6dc · gold #e8b64a · bronze #9a6a2a. Dark teal doubles as moss and grass at night.
- Scene with depth: sky in four night bands with 4-row Bayer-dithered seams; a moon (top right) with a crescent shadow, craters and a four-step dither halo; 48 stars twinkling in white, mint, gold and lilac at whole-number rates per loop; two cloud layers drifting left at different speeds (shaped from ellipses, light top edge, grey-white where they cross the moon); two birds with a 4-frame wing beat; a far ridge with snow-dusted peaks; a mid layer of hills and pines; a valley falling into black with mist in two speeds. Foreground: a rocky ledge (11-row top plane, dark stratified cliff face, moss over the lip, cracks, rocks, 20 grass tufts) and a broken pillar with mortar courses, cracks, moss and three carved runes. Five gold fireflies wander and blink near the ledge. The camera sways on a 16 s sine; the layers shift by 0.6 / 1.4 / 3 px, rounded.
- The wizard faces left, about 36 px tall: a pointed hat bent back with a gold band and wide brim, a face in shadow under the brim, a long white beard, a purple robe (dark front edge, lilac moon rim at the back, fold lines, belt, gold hem), boots. The head is a hand-drawn sprite; the robe is rasterised row by row; the front arm is a bell sleeve with a gold cuff, the fist holds a staff with an upright crystal; the back arm sits behind the body. An automatic 1-px dark outline around the figure, plus inner outlines where arm and staff cross the body.
- Light without gradients: every colour has a ramp of four palette colours (base → lighter own hue → teal → mint/white). Each source (crystal, rune, bolt, orb, burst) gives a level 0–3 from its distance: hard bands on sky, clouds and mountains, a narrow 4×4 Bayer edge on ledge, pillar and wizard. Pixels whose neighbour towards the light lies further back get +1 (rim light) — so the rim on the wizard, the cloud edges and the ridge lines follow the source from the crystal to the orb in the sky. The wizard's body stays purple, only his edge towards the light glows. Crystal, bolt, orb and burst cast shadows by marching rays from ledge and pillar to the light. The moon is never lit or painted over by the spell.

STORYBOARD
0–3 Idle: he breathes (1 px, 2 s cycle), shifts his weight onto the back foot and back (the planted staff tilts with his hand), blinks, hem and beard tip sway out of phase, a glint runs over the crystal, grass sways, fireflies blink.
3–7.4 Wind-up and charge: a dip, then he pulls the staff up, overshoots and settles. A rune circle builds in order: the outer ring is drawn by a white pen head, eight different glyphs pop in one every 2 ticks (white on the first tick), then the inner ring. The rune light grows with every glyph, the crystal light in eight steps. 42 motes spiral into the crystal, a dashed halo tightens around it, light columns rise off the ring, pebbles lift off and hover, grass bends away, the hem billows in two stages and flutters, the carved runes on the pillar light up one after the other, the spell shows as a mint pixel in his eye, his hand trembles.
7.4–8.6 Cast: he ducks 2 px, leans back and pulls the staff behind him; then lunges (2 ticks, overshoot), the back arm flies out as a counterweight. A cross flare and four jagged lightning forks for two ticks; a bolt arcs up and left with a stepped trail and shed sparks; recoil, the back foot steps back, he catches himself. At the target an orb swells in steps while two dotted rings contract into it; the pebbles drop.
8.6–11 Climax: impact with a 3-frame hit-stop — a white eight-ray star, ledge and pillar one light level up — then five ticks of 1-px screen shake. The sigil builds in five ticks (ring 4 → ring 8 → ring 12 + inner ring → half the star → full eight-point star with notches); two shock rings expand and break into gaps. The scene goes teal: ledge, ridge lines, cloud edges, the wizard's front edge, the pillar's top; his shadow lies across the pillar and the ledge behind him; the pillar runes flash white. The blast pushes him back, hat tip, beard and sleeve trail behind. 52 sparks fly out with 2–3 px tails that cool down the ramp (white → mint → teal → dark teal). The teal falls back one step every quarter second.
11–16 Decay: the sigil breaks up in the order it was built and sheds sparks; embers drift down, half of them in front of the ledge, where they land, flare for a tick and cool out; the rune circle goes out glyph by glyph (each flares and leaves a rising spark), then the rings retract. He lowers the staff in two stages, plants it with a dip and a puff of dust, the fireflies come back, he breathes again — exactly as at frame 0.

MOTION
Sprite poses on 12 fps ticks: 15 poses, eased keyframes, positions rounded to whole pixels. Overlap as a pure function of time: hat tip, beard tip and hem take the body's position 2–3 ticks earlier plus 0.6 × its change, clamped to ±2 px. Effects on 30 fps. A seeded PRNG for every random value; every periodic element completes a whole number of cycles in 16 s. Banned: sub-pixel positions, smoothing, alpha blending, soft glows, colours outside the palette.

TECHNIQUE
- One self-contained HTML page plus one JS file (no inline script, no libraries, no network requests). Stage exactly 1080×1080 CSS px, or the size named above (1080×1920 for portrait).
- Expose window.MOTION = { duration, fps: 30, width, height, seek(t) } with the stage size in width and height. seek(t) redraws the frame for time t from scratch: no state between frames, no Math.random (seeded PRNG only), no Date, no CSS transitions, no timers.
- Loop: seek(0) and seek(duration) must look identical.
- With ?render=1 the stage sits unscaled at the top left (for frame capture). Without it, scale the stage to fit the window and loop with requestAnimationFrame.
- prefers-reduced-motion: show one representative still, no loop.

CHECK
Render stills at the listed times, look at every one, fix anything that overlaps, is cut off, aliased or unreadable, then render again. Report only when frame 0 equals the last frame.
Stills: every 0.5 s, plus every sprite tick from 0.5 s before to 0.5 s after each transition (3.0, 7.4–7.6, 8.6, 11, 11.9, the loop point) as 4× crops of the figure and the effects.

So bauen Sie es nach

  1. Prompt in einen Coding-Agenten geben

    Einen leeren Ordner anlegen, den Prompt in Claude Code, Codex oder Cursor einfügen. Der Agent schreibt eine HTML-Seite und ein Script — die Animation läuft danach direkt im Browser.

  2. Standbilder prüfen lassen

    Der Prompt verlangt, dass der Agent Standbilder rendert und selbst ansieht. Schärfen Sie nur nach, was Ihnen am Bild nicht gefällt: „Szene 3 ist zu voll“ wirkt besser als ein neuer Prompt.

  3. Zu MP4 rendern

    Weil jede Animation über window.MOTION.seek(t) jedes Bild exakt zeichnen kann, rendert ein kleines Script sie Bild für Bild — ohne Ruckler, ohne Bildschirmaufnahme. Danach setzt ffmpeg die Bilder zum Clip zusammen.

Befehle zum Rendern render.mjs herunterladen
# 1 · Render every frame (Chrome, Node ≥ 22)
node render.mjs http://localhost:3000/ \
  frames/ frames 30

# 2 · Join the frames into an MP4
ffmpeg -framerate 30 -i frames/%05d.png \
  -c:v libx264 -preset slow -crf 22 \
  -pix_fmt yuv420p -movflags +faststart \
  my-motion.mp4

So entsteht ein Clip mit Claude Code

Hintergrund

Ein alter Zauberer auf einer Klippe bei Nacht hebt den Stab, ein Runenkreis baut sich Glyphe für Glyphe auf, Funken laden den Kristall, dann zerplatzt sein Zauber am Himmel zu einer Sigille und taucht die Szene in Türkis. Echte Pixel-Art: 120 × 120 Logikpixel, 24 Farben, Licht ohne Verlauf, animiert Tick für Tick. 16 Sekunden, als Code gebaut, mit Prompt zum Nachbauen.

Was ich dabei gelernt habe

Licht ist in Pixel-Art kein Verlauf, sondern ein Farbtausch: Jede Farbe hat eine Rampe aus vier Palettenfarben, das Licht wählt nur die Stufe. Lebendig wurde die Figur aber erst durch Verzögerung – Hutspitze, Bart und Saum folgen dem Körper zwei, drei Ticks später und schwingen über.

Inspiration

Ausgangspunkt war ein Prompt von @majidmanzarpour ((öffnet in neuem Tab)) auf Skillry. Den Wortlaut finden Sie dort; der Prompt oben ist meine eigene Fassung.

Weitere Motions

Kontakt

Lassen Sie uns
Ihr Projekt
besprechen.

Schreiben Sie mir eine Nachricht oder füllen Sie das Kontaktformular aus. Ich melde mich innerhalb von 24 Stunden.

Paul Mill

Paul Mill

hallo@paulmill.com