DEV Community

Joan Bernier
Joan Bernier

Posted on Edited on AI-assisted

Pixel Art for a Game Jam: My 16x16 Coin Sprite Sheet Workflow

At my last game jam I lost almost two hours on one spinning coin. The code was fine. The art wasn't. This time I wrote the process down while doing it: a 16×16 pixel art coin, four frames, exported as a sprite sheet and loaded into Phaser with crisp edges. Every step below fits into one evening.

What you'll end up with:

  • one 16×16 coin with 4 animation frames
  • a transparent PNG sprite sheet
  • a few lines of Phaser 3 that play it without blur

A small robot hopping between floating grassy platforms on a purple alien planet, collecting spinning gold coins in a retro pixel art game scene

You don't need drawing skills for pixel art this small. You need a grid, a short palette, and patience for 256 cells per frame.

Step 0: Pick a grid size you can finish

I drew this Pixel Art coin in a browser-based editor because I didn't want to install anything on the jam laptop. It runs in the browser, nothing gets uploaded, and the work auto-saves to IndexedDB on that machine.

A new canvas starts at 32×32. I switched it to 16×16 under canvas size.

Why 16? A coin is a pickup. In my game it sits on screen at 4× zoom, so 16 cells is plenty, and in pixel art a small grid is the difference between finishing and fiddling.

Step 1: Lock the palette before you draw

The default palette is PICO-8, which happens to be great for retro pixel art. I picked four colours from it and refused to touch anything else:

  • brown for the outline
  • orange for the body
  • yellow for the face
  • white for one highlight

My rule now: if I think I need a fifth colour, I usually need a better shape instead.

Step 2: Draw frame 1 with ellipse + mirror

I used two layers. Layer 1 is a rough sketch, layer 2 is the clean version on top. You can stack up to 16, but two is all a coin needs.

On the sketch layer:

  1. Drag the ellipse tool to make a circle about 12 cells wide and 14 tall, centred.
  2. Turn on mirror so whatever I fix on the left side shows up on the right.

On a 16×16 grid the ellipse comes out a bit lumpy. That's normal in pixel art: curves are really stairs. On the clean layer I traced it with the pencil and evened out the steps, so each curve goes 3-2-1 cells instead of 3-1-2.

Then:

  1. Fill the inside with orange using the fill tool.
  2. Pencil a smaller yellow oval inside it, two cells in from the outline.
  3. Add a 2-cell white highlight near the top left.

Leave the corners alone. Cells you never paint stay transparent in a PNG export, which is exactly what a sprite wants.

Step 3: The "spin" is mostly width

A spinning coin in pixel art is a fake 3D effect. You only squash the width and keep the height. Here's what I used:

Frame Coin width (cells) Notes
1 12 full face, highlight visible
2 8 face narrower, highlight shifts right
3 2 just the edge, outline + one orange column
4 8 same as frame 2, flipped

Four-frame 16x16 coin sprite sheet, the coin narrowing from full face to a thin edge and back

Add frames on the timeline (it allows up to 200, you need 4). Duplicate-and-edit is faster than redrawing, but I redrew frame 3 because the edge view barely resembles the others.

Turn on onion skin here. It shows the neighbouring frames faintly while you draw, which makes the next step much easier.

Step 4: Kill the wobble

My first loop wobbled. The coin looked like it was hopping by one pixel.

The cause: frame 2's top row sat one cell lower than frame 1's. With onion skin on, you can see it immediately.

The fix is boring but it works. Keep the top row and the bottom row at the same y on all four frames. Only the left and right edges move.

For a quick check I exported the timeline as a GIF and dropped it into the jam Discord. Two teammates said it looked fine at 8 fps, so I moved on.

Step 5: Export the sheet (and one big PNG)

I exported two files:

  • A sprite sheet for the engine.
  • A PNG at 8× for the itch.io page, so the pixel art shows up as sharp blocks in screenshots instead of a tiny smudge.

PNG scale only changes the display size. The pixel art itself stays 16×16 even when you download it bigger.

Before writing any code, open the sheet and check its pixel dimensions. Note the size of one frame and how the frames are laid out. You'll need that number in the next step.

Step 6: Load it in Phaser without blur

Here's the minimal scene I used with Phaser 3:

const config = {
  type: Phaser.AUTO,
  width: 320,
  height: 180,
  zoom: 4,
  pixelArt: true, // nearest-neighbour scaling, no smoothing
  scene: { preload, create }
};

function preload() {
  // frameWidth/frameHeight = size of ONE frame in your exported sheet
  this.load.spritesheet('coin', 'assets/coin-sheet.png', {
    frameWidth: 16,
    frameHeight: 16
  });
}

function create() {
  this.anims.create({
    key: 'spin',
    frames: this.anims.generateFrameNumbers('coin', { start: 0, end: 3 }),
    frameRate: 8,
    repeat: -1
  });

  this.add.sprite(160, 90, 'coin').play('spin');
}

new Phaser.Game(config);
Enter fullscreen mode Exit fullscreen mode

pixelArt: true is the line that matters. Without it, the browser smooths the upscaled sprite and your hard edges turn soft.

If your sheet came out at a bigger scale than 1×, set frameWidth and frameHeight to the real frame size you measured, not 16.

Not using Phaser? Same idea elsewhere:

  • plain canvas: ctx.imageSmoothingEnabled = false;
  • CSS on an <img> or <canvas>: image-rendering: pixelated;

My pre-commit checklist for pixel art sprites

I keep this in the repo README now:

  • [ ] all frames share the same top and bottom row
  • [ ] background cells are unpainted (transparent), not white
  • [ ] 4 colours or fewer for small pickups
  • [ ] sheet dimensions checked and frame size written in the loader
  • [ ] source file exported and committed, not just living in the browser

That last one matters. Browser auto-save is local to that browser. If someone clears site data on the jam laptop, the drawing goes with it. I commit the PNG and GIF next to the code.

What I'd change next time

Three frames might read just as well at this size. Frame 4 is almost a copy of frame 2, so dropping it would save a few minutes per pickup when I have ten of them.

Next up is a 6-frame pixel art walk cycle using the same setup. If you try the coin, tell me in the comments which frame rate looked right in your game. 8 fps worked for mine, but I'm not sure it's universal.

Top comments (0)