Skip to main content
WEB
SkillFreeBy GameSkillGameSkill original

Code Sprites 16 (pixel sprites drawn in code, locked palette)

/code-sprites-16

A GameSkill original for browser games whose sprites are written in code: text rows of palette indices over a locked 16-colour palette, no image files. A dependency-free sprites.js validates, bakes and draws them crisp by origin; a Node checker fails ragged rows, illegal characters, empty or resized frames, extra colours and wrong sizes and writes a PNG contact sheet. Ships Seed Courier, an original 16-colour platformer tested in headless Chrome so every pixel on screen is a palette colour.

License
MIT
By
By GameSkill
Download ZIP

Tested by GameSkill

30/30 checks passed on Canvas 2D in headless Chrome + Node 22 (2026-11-09): trigger, a runnable example, a screenshot and self-check, one job per skill, and English + Chinese docs. Trigger checks match prompts against skill descriptions; they are not a live agent run.

Test report

GameSkill's tested copy

Written and tested by GameSkill for gameskill.dev. The ZIP holds the whole skill: SKILL.md and its Chinese version, scripts, a runnable example, tests, the self-check list and our test report.

Download tested ZIP (33 KB)Roadmap: Art assets

A GameSkill original, released under MIT. The ZIP keeps LICENSE and CREDITS.md, which lists the workflow inspiration, the CC0 test assets and the third-party libraries with their licenses.

Code Sprites 16 (pixel sprites drawn in code, locked palette)

Self-check

  • sprite_check 全部 PASS,并看过总览图 / sprite_check passes and the contact sheet was looked at
  • 画面上每个像素都是调色板颜色 / Every pixel on screen is a palette colour
  • 整数倍缩放、关闭平滑 / Whole-number scaling with smoothing off

Install

Tell your AI

Install the skill from https://gameskill.dev/skills/code-sprites-16/install.md

GameSkill's tested copy

Tested copy into .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/code-sprites-16.zip -o /tmp/gameskill-code-sprites-16.zip
unzip -oq /tmp/gameskill-code-sprites-16.zip -d .claude/skills
rm /tmp/gameskill-code-sprites-16.zip

What you get

  • sprites.js: validate, bake (integer scale, mirrored copies), draw by origin, frame timing, toRGBA for Node
  • tools/sprite_check.mjs: data checks with fixes, colour budget, size checks and a PNG contact sheet
  • Seed Courier: an original platformer with 10 code-drawn sprites, a 3x5 pixel font and a test hook
  • 18 checks in test/run_tests.mjs, including a palette-only screen test in headless Chrome

Good fit

  • Small pixel-art browser games made by an agent without an art pipeline
  • Code-drawn sprites that come out ragged, blurry or off-palette
  • Game jams where every asset must live in the source

Not for

  • Cleaning up AI-generated pixel images: use pixel-snap-cleanup
  • Turning 3D scenes into pixel art: use pixel-render-3d
  • Large sprite sheets drawn in an editor

Try this prompt

Prompt
Make an original 16-colour pixel platformer for the browser with every sprite drawn in code, check the sprite data, and test that only palette colours reach the screen.

About this skill

A GameSkill original. Agents can draw pixel art as text, and it goes wrong in predictable ways: a row one character short, a colour outside the palette, a frame of a different size, smoothing that blurs it, fillText that adds dozens of off-palette shades. This skill keeps sprites as data over a locked palette of up to 16 colours, checks the data with tools/sprite_check.mjs before the game runs (with a PNG contact sheet to look at), and draws it through sprites.js the one way that stays crisp: baked once, whole-number scale, drawn by origin at whole pixels.

Agent steps

  1. Fix the palette first and draw every sprite as rows of palette indices.
  2. Check the data with sprite_check and look at the contact sheet.
  3. Draw through the sprite set, with a pixel font for text, and test that every pixel on screen is a palette colour.

Common problems it solves

  • Ragged rows, wrong-size frames and illegal characters in hand-written sprites.
  • Blurry scaling and half-pixel positions.
  • Anti-aliased canvas text that breaks the palette.

Credits

The idea of a pure-code 16-colour sprite browser game comes from a post by @0xShoopy (link only; no code or text was used). The palette is Sweetie 16 by GrafxKid. Seed Courier, the code and the text are ours.

Requirements

  • Any browser for the game; sprites.js has no dependencies
  • Node 22+ for tools/sprite_check.mjs (standard library only)
  • Chrome or Chromium for the self-test

Topics

FAQ

MATCHED PRO KIT$49/yr

AI 2D Asset & Sprite Pipeline Kit

Turn raw AI-generated video clips into crisp transparent 2D sprite sheets: chroma-key + despill commands, 0px foot-root anchor locking, non-linear hit-stop action pacing (4.33s -> 1.88s), and Phaser 3 / Godot 4 SpriteFrames exporters.

Based on Pure-code 16-colour sprite browser game (post, idea only) by @0xShoopy (no licence, idea only, no code or text used). Ideas only: GameSkill wrote the code and text; CREDITS.md in the ZIP lists every source.

Works well with

Skills the author points to as related or as the better fit for neighbouring tasks.

Pixel Diorama Game
WEB
Skill
By GameSkill

Pixel Diorama Game (tiny isometric pixel games with seamless ambience)

A GameSkill original for making a small browser game as an isometric pixel diorama: one place floating on white, a fixed 30-degree camera, a 360x280 canvas scaled by whole pixels, hue-shifted shading, long hard shadows and one physical action, plus rain, ripples, smoke, embers and lamp flicker drawn by code in loops that wrap without a seam. Ships the Pixel Plays renderer (MIT), our ambience kit and a tested example game.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Pixel Snap Cleanup
GDT
Skill
By GameSkill

Pixel Snap Cleanup (AI fake pixels to true pixel art)

A GameSkill original that turns AI "fake pixel" art into true pixel art at the grid you choose: snap to a real grid with the bundled Pixel Snapper (MIT), force 0/255 alpha and a fixed palette, hit the exact size, then check it is CLEAN and imports crisp into Godot 4. Works on single sprites and on animation frames, which share one grid.

GodotWeb (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Style Cards
B3D
Skill
By GameSkill

Style Cards (one art style as hard limits, switch looks by switching cards)

A GameSkill original that writes a game's art style down as a card of measurable limits (canvas, colours and palette, alpha, triangles, shading, materials, textures, voxel grid), pastes it into every asset request and checks every asset against it. Ships 16 cards from pixel (including fixed PICO-8, CGA, four-greens LCD and Endesga 32 palettes) and one-bit to low-poly, voxel and toon, a no-dependency PNG checker, a Blender GLB checker and a palette locker; switch the whole look by switching the card.

Engine-agnosticBlenderGodotClaude Code · Codex +2

Similar skills