sprite-stacking

agent
Security Audit
Pass
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 77 GitHub stars
Code Pass
  • Code scan — Scanned 2 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Agent skill: turn four pixel art views into fake-3D sprites you can spin. Works with Claude Code, Codex, Cursor, OpenCode, Gemini CLI, Pi.

README.md

sprite-stacking

An agent skill that turns four pixel art views into fake-3D sprites you can spin. By Daniel White.

MIT
Agent skill
Python 3 + Pillow + NumPy
Works with

Six sprite-stacked assets spinning

Install

npx skills add danielwh2/sprite-stacking

Installs to the current project. Add -g for every project, -a claude-code (or codex, cursor, ...) to pick an agent. Uses the skills CLI, Node 22.20 or later.

Or copy skills/sprite-stacking into your agent's skills folder:

Agent Folder
Claude Code ~/.claude/skills/
Codex, Cursor, OpenCode, Gemini CLI, Pi ~/.agents/skills/

Use

Ask your agent:

  • "Make a rotatable pixel art car."
  • "Sprite stack this 4-view sheet and give me a turntable."
  • "Add a fake 3D pixel art tree to my Godot game."

No image generator? The agent draws the views itself in a short Python script.

How it works

Sheet to slices to render

  1. Views: top, side, front and back, orthographic, one row.
  2. Carve: a voxel survives only where all four views cover it.
  3. Slices: the volume is cut into a strip of flat layers, ground first.
  4. Render: each layer is rotated, squashed for pitch and lifted 1 px.

Slicer CLI

python3 skills/sprite-stacking/scripts/views_to_slices.py views.png slices.png \
  --slices 36 --preview check.png --html viewer.html
  • --slices N: layer count. 15-20 chunky, 32-48 detailed.
  • --order reading: force TOP, SIDE, FRONT, BACK. Default matches views by proportion.
  • --round: towers, balloons, pots carve round, not square.
  • --side-nose right: the side view faces right.
  • --colours N: shared palette size, 0 keeps every colour.
  • --normals path.png: save a matching 3D normal-map slice strip.
  • --emissive path.png: save an auto-detected emissive mask strip (headlights, windows, neon).

Viewer

--html writes a standalone page: turntable, slice scan, exploded view, Play mode (Drive with WASD/arrows + drift, Wind sway, Shatter & rebuild), live Time of Day (Day → Sunset → Night with auto-emissive glow and light pools), draggable sun (Shift+drag) with projected 3D shadows, and 16-direction PNG export. skills/sprite-stacking/scripts/viewer.html also opens on its own and takes a dropped slice strip.

Requirements

Python 3 with Pillow and NumPy (pip install pillow numpy).

Contributing

python3 tests/check.py

Prints ok.

Prior art

Sprite stacking is a long-standing indie game technique, not invented here. This skill adds the four-view carving and the agent workflow.

Licence

MIT

Reviews (0)

No results found