EnginePico-8 0.2.5+
LanguageLua (Pico-8 dialect)
Time to run~3 minutes
LevelIntermediate — comfortable with pal(), spr() and Pico-8 token budgets
OutputOne Lua snippet (~80 tokens)
DependenciesNone.

The prompt

Open claude.ai/new, paste, send.

$ Build me a Pico-8 sprite drawing helper with palette swap.

// shape
- A function spr_swap(n, x, y, swaps) that draws sprite n at (x, y) using a per-call palette remap.
- swaps is a table mapping source color to target color, e.g. { [8] = 11, [2] = 3 }.
- spr_swap restores the default palette after drawing (pal()).

// extras
- A flash_white(n, x, y) helper that draws the sprite with all colors mapped to color 7 (white). Uses spr_swap internally.
- A predefined PALS table with named team palettes: {red = {[11]=8}, blue = {[11]=12}, gold = {[11]=10}}.

// constraints
- Token budget: keep the entire helper under 100 tokens.
- No globals beyond the function names and the PALS table.
- Pure Lua, no Pico-8 SDK extensions.

// return format
- One .p8 lua block of code with the helpers and the PALS table.
- A 3-line example showing how to use it from _draw().
- No prose before or after.
Open in Claude ▸ Run · 3 min

What this gets you

Per-instance recolor without doubling your sprite sheet. The same enemy sprite at three colors (red elites, blue mooks, gold bosses) costs the same tokens as one. The flash-white-on-hit gives you "got hit" feel for free.

Quick checklist

Full breakdown coming soon

The deeper writeup with actual token counts, hit-flash timing, and screen-shake combo is on the roadmap. Bookmark this page for the heads-up.