AIBRIEF LAB · Tool evaluation
pxl, tested: pixel art as code for a five-screen game
pxl lets you write pixel art as code: a short JavaScript file becomes sprites, animations and sprite sheets. We asked an AI agent to make all the art for a small game with it, and then to build the game. You can play it below, and read what the tool did well and where it struggled.
Play it
Brass & Soot: five screens of an old foundry. Each screen has a goal (collect every cog, pull a lever, or destroy every robot), and its gate opens once you reach it. Everything you see on the game screen was drawn with pxl.
Click the game first, then: ← → run, Z or ↑ jump, X or Space swing the wrench, R restart the screen, F fullscreen, M sound. Click outside the game to pause it. On a phone, use the buttons under the game and the fullscreen button in its corner.
What pxl is
pxl calls itself “pixel art as code”. You write a .px.js file, describing a sprite either as a grid of letters (one letter per colour) or with drawing commands like lines, circles and fills. pxl turns it into PNGs, animated GIFs and sprite sheets that game engines such as Phaser and Godot can load. A live viewer shows the drawing being built step by step every time you save. It needs Node 22.18 or later, has no dependencies, is MIT-licensed, and comes ready to use as a skill for AI agents.
We used uilianks's fork of crsolver's claude-pxl. The fork adds tools to make art look hand-made rather than computer-generated: colour shades that shift slightly in hue, outlines that pick up the colour next to them, and pxl lint, a checker that flags stray pixels, jagged lines and flat-looking shading.
How the game was made
Claude worked on it in Claude Code in two sessions on the same day. The first session wrote a style guide (a 30-colour palette, sprite sizes, light always from the top left) and drew the original sprites. The second built the game from those sprites, then went back to pxl for more art: the gate, steam vents, conveyor belts, the lift, the logo and the on-screen counters. The art lives in 9 source files. Each build produces 7 sprite sheets, 3 finished scenes and an enlarged preview of everything, which is how the agent checked its own work.
Made with pxl
- Tinker, the hero
- idle, run, jump, wrench swing, hurt: 19 frames
- Enemies
- clockwork beetle, steam drone
- Props and pickups
- boiler, gas lamp, gears, crates, lever, cog coin, steam cell
- Machines
- exit gate and its signal lamp, steam vent and jet, conveyor belt, chain lift
- Tiles
- plate, iron, brick, grate, wall, furnace window, hazard edge, vent, pipes
- Effects
- steam puff, sparks, explosion, landing dust
- Interface
- the title logo, the HUD's steam vials and digits, the exit sign
- Data
- the files that tell the game where each frame is and how long it shows
Not made with pxl
- The game itself
- levels, physics, enemies, goals, gates: about 650 lines of plain JavaScript
- Menus and text
- the title, intro and end screens and the line under the game are HTML
- Sound
- every effect is synthesised in the browser with Web Audio
- Controls
- the touch pad and fullscreen
What it did well
The hero looks the same in every frame
You don't draw each frame of an animation separately. The hero's body is drawn once, and each animation only lists where his feet and hand go. A small function draws the legs and arm between those points. So all 19 frames share the exact same body, and his feet stay planted. This is the whole running animation:
const RUN_FEET = [[10, 0], [8, 0], [6, 0], [4, 1], [6, 3], [9, 2]]
anim("hero_run", { ...HERO, frames: 6, fps: 10 }, (c) => {
const f = c.frame
hero(c, { bob: RUN_BOB[f], front: RUN_FEET[f],
back: RUN_FEET[(f + 3) % 6], hand: RUN_HAND[f] })
})A new version of a sprite is one line
The rusty crate is the normal crate with some colours swapped. The gate's green “open” lamp is the red one, recoloured:
sprite("crate_rusty", { base: "crate", swap: { 4: "e", 3: "c", 2: "C", 1: "C" } })
sprite("gate_housing_open", { base: "gate_housing", swap: { F: "V", f: "v", y: "z" } })Moving machines loop smoothly
Gears, the conveyor belt and the steam jet are drawn with a formula instead of frame by frame, so the last frame always flows back into the first without a jump. We also made the belt's animation move at exactly the speed it pushes the player, so it looks right when you stand on it.
The game can use its output directly
With each sprite sheet, pxl writes a small file saying where every frame is, how long it shows and which animation it belongs to. The game's code for loading all of it is about fifteen lines. Adding the second batch of art meant adding two names to a list.
Its checker found real mistakes
pxl lint checks all 57 pieces of art in half a second. In the new art it found three real problems: the notches on the coin were single dark dots instead of real gaps in its edge (fixed, and the coin looks better), a stray orange dot in a lamp, and a loose pixel on the exit sign's arrow. Each warning says exactly which pixel is wrong, which is very useful when you can't just look at a sprite.
It's easy to check your work
Every build also saves enlarged previews of each sprite, and pxl ascii prints a sprite as text with pixel coordinates. That's how the agent caught the first steam jet looking like three flat stripes instead of steam, and redrew it.
Where it got in the way
It has quirks you have to learn
pxl is a small language of its own, and some things don't work the way you'd guess. The agent hit five of them. For example, the command that brightens a sprite stops at the lightest shade, so you can't use it to flash a character white when it's hit. The automatic outline makes one-pixel-thin lines look muddy. And an animated scene only loops once all its animations line up, so a single odd frame timing can turn a short GIF into a very long one.
Many of its warnings are false alarms
Of the 25 warnings on the finished art, most aren't real problems. Rivets are drawn as one bright and one dark pixel on purpose, and the checker flags them every time. Whole scenes get over a thousand warnings each, because the checker treats deliberate texture as stray pixels. It even flags the 4 and the 7 in pxl's own built-in font.
It makes pictures, not levels
A pxl scene is saved only as an image. It doesn't record where each object was placed, so a game can't load it as a level. All five playable screens had to be typed out again in the game's code.
It won't make design choices for you
pxl makes it easy to apply a decision everywhere, but you still have to make the decision. The palette, the lighting, the proportions and every redraw came from the agent, not the tool. It also has only one tiny font, three pixels wide: the logo is readable, but its “&” looks more like a dollar sign.
The fork against the original
The fork says it makes art that looks hand-made instead of like “shapes filled with a gradient”. To check that, we compared it with the original claude-pxl, which has only two commits. The fork adds about 1,100 lines of code. The parts aimed at the look are colour shades that shift in hue, the colour-matched outline, the pxl lint checker, and a few lines of advice to the agent: light from one side, and don't shade things brightest in the middle. We ran two tests.
The same code built by both tools
The original builds our 621 lines of art with one change: it has no colour-matched outline, so every sprite gets its plain dark outline instead.


Up close, the fork's outline is a darker version of whatever colour it touches, so a gold shell gets a dark gold edge. In the lamp, the black ring around the flame turns brown and orange.


That's the whole difference. 20 of the 54 images change, and only at their edges, which is 3.2% of all pixels. Tiles and effects, which have no outline, come out pixel for pixel the same. The fork's colour shades made no difference here because our palette was picked by hand. The checker gives about the same result on both builds (23 warnings for the original's, 25 for the fork's). So once the art is written, the fork changes very little. Anything else it does has to happen while the art is being drawn.
The same request to a new agent with the original
To test that, we gave a new session of the same agent the exact request that started our sprite set, with only the link changed to the original. It was the same model and the same Claude Code version, and it had no memory of our project. The request asks for steampunk sprites with animations for a small game, a style and palette first, then documentation and a plan, then the art. Nobody helped either session along the way.


The two sets look like the work of the same artist. Both chose light from the top left, a dark outline, palettes of about 30 colours, a 16-pixel grid and even the same name, Brass & Soot. Both drew the hero's body once and posed it in code, so it stays the same in every frame. The new session also caught its own bad sprites in the previews and redrew them: its first coin looked like a sea urchin and its drone like a burger. The work took about the same effort: 65 and 64 tool calls, 17 builds each, and 21 looks at the previews each. The original's session finished in 12 minutes and ours took 30, but that is one run each and includes waiting on the model, so it says little about the tools.


The fork's sprites have the softer edges shown above. Apart from that, we can't point to anything that looks more hand-made. The original's scene, with its city skyline, is if anything the nicer of the two. We also ran the fork's checker over the original's art: 26 warnings, against 25 on ours, mostly of the same kinds (stray pixels and jagged lines). Its one “brightest in the middle” warning was for the night sky, where the glow around the moon is meant to be brightest in the middle.
Our reading: this model already knows the usual pixel-art rules, so the fork mostly reminds it of things it does anyway. The colour outline is a real but small improvement, and the checker is useful for finding mistakes. The bigger promise, art that looks less computer-made, didn't show up in this test. It might with a weaker model, with the colour shades used instead of a hand-picked palette, or over more runs than one each.
Verdict
Use pxl if you need a set of pixel-art assets that have to match each other and that you want to keep as code: tiles, props, machines, looping animations, interface pieces. It suits AI coding agents especially well, because they can't draw by hand but can write code, look at a preview and fix it. It's the wrong tool for a single detailed illustration (an artist will paint that faster), for designing levels, and for anything that isn't an image.
Could the agent have done as well without it? Not quickly. It would first have had to build its own drawing helpers, outlines, colour shades, sprite sheet packing and checks, and the sprites would probably have looked flatter. Most of pxl's value is in having all of that ready to use.
How we tested it, and what we didn't check
- The game was played through in an automated Chrome browser using real key presses and touch input, on desktop and on simulated phones. Nobody has tried it on a real phone yet.
- The agent measured how loud the sounds are, but it can't listen to them.
- The same AI that built the game wrote this review, so take the praise with that in mind. The numbers and problems above can all be checked against the published game.
- We didn't try a tool other than pxl, so “could it be done without pxl” is an opinion, not a measurement.
- The fork and the original were compared with one session each. Two runs of the same agent can turn out quite differently, so read that section as one example, not a measurement. The fork's checker was used on both sets, because the original has none.
- Times are from one Linux machine: building all the art, previews and GIFs takes about 3.4 seconds, and checking it takes 0.6.
Every sprite in the game
All seven sprite sheets the game uses, animated from the same files.