miwale

8-Bit Arcade — Game Art Style Spec

A lost NES cartridge: strict 2C02 palette, black-outlined 3-colour sprites, tile-language meadows and checker-flicker ghosts.

Everything should look like it ships on a forgotten NES/Famicom cartridge. Every colour comes from the NES PPU (2C02) palette. Every sprite uses at most three colours plus a 1-px pure-black outline. The world is made of flat colour areas with hard, tile-like edges: a dark-green meadow with light-green lips, brown forest floor behind black cliff lines, ochre dirt roads, navy ponds with a blue ring, and grey brick plazas dotted with tombstones. Nothing is anti-aliased, nothing has a gradient, and the world uses no alpha. Transparency is drawn as a checkerboard and blinking as sprite flicker, so the screen reads like real 1986 hardware. The cast drawn in this style: a main character with a round orange pumpkin head and a carved yellow face in blue overalls, small purple root creatures with leafy tops, white floating ghosts with checkered tails, and a large purple-and-ochre root giant. Everything below is written so you can apply it to any top-down or side-view project.

At a glance

FamilyPixel Art · NES 8-bit
Moodnostalgic, punchy, playful, arcade, crisp
Best fortop-down action games, arcade shooters, Zelda-like adventures, retro platformers, quick prototypes with strict rules
RendererCanvas 2D, procedural; all sprites are text grids baked at init
Pixel artyes, 1 art pixel = 1.5 world units (360-unit-tall view = 240 art rows, NES height)
Complexity3/10: small sprites as text grids; the strict NES rules help because there are fewer decisions
FontsPress Start 2P (Google Fonts)
Key colours#005800 meadow · #503000 forest floor · #AC7C00 road · #E45C10 main character · #940084 creatures · #FCFCFC ghosts · #000000 outlines

When to use it

Color palette

All values are from the NES 2C02 master palette (the module's P table). Use nothing else in the world.

SwatchHexRole
Black k#000000outlines, cliff lines, shadows, HUD/menu background
White w#FCFCFCghosts, tombstones, HUD text, window borders, sparks
Light grey g1#BCBCBCplaza highlight, stones, dead trees
Mid grey g2#7C7C7Cplaza bricks, rocks
Meadow gr0#005800grass base (~50 % of the screen)
Leaf green gr1#00A800tufts, grass lip, canopy, leaves on sprites
Light green gr2#58D854canopy/bush highlight
Dark brown br0#503000forest floor, road edge, large-creature feet
Ochre ochre#AC7C00road, forest lip, autumn canopy, large-creature body
Sand sand#F0D0B0road lip at water, light pebbles
Cream cream#FCE0A8creature faces/bodies, seed projectile, lantern glass
Dark red red0#881400tree trunks, empty hearts, leaf litter
Crimson crim#A80020spare accent
Red red#F83800hearts, HUD labels, burst rays, flash colour
Orange orange#E45C10main character's head, pumpkins, projectile trail
Light orange lorange#FCA044spare accent
Gold gold#F8B800large collectibles, highlighted numbers, lantern glow, flowers
Yellow yellow#F8D878main character's carved face, autumn highlight
Navy navy#0000BCwater base
Blue blue#0058F8water ring, small-collectible shade
Royal blue blue2#0078F8main character's overalls
Cyan cyan#3CBCFCghost tails, small collectibles, progress-bar fill, wave tops
Ice ice#A4E4FCspare accent
Purple purple#940084small-creature heads, large-creature head, lantern cap
Magenta magenta#D800CCsecond small-creature palette
Pink pink#F878F8large-creature flash
Violet violet#6844FCspare accent

Palette rules

Typography

Press Start 2P, weight 400. Google Fonts: https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap

.label { font: 16px/1 'Press Start 2P', monospace; color: #f83800; text-transform: uppercase; }
.value { font: 16px/1 'Press Start 2P', monospace; color: #fcfcfc; text-shadow: none; }
.clock { font: 32px/1 'Press Start 2P', monospace; color: #fcfcfc; }

On canvas, draw text into the low-res art buffer at 8 px (the font's native 8×8 grid) so it upscales with the pixels.

Rendering technique

  1. Art buffer. PS = 1.5 world units per art pixel. The upscale factor is up = max(1, round(screenH / 240)), and the buffer is ceil(screenW / up) × ceil(screenH / up). Draw everything into the buffer with imageSmoothingEnabled = false, then drawImage(buffer, 0, 0, bw * up, bh * up) onto the display.
  2. Bake at init. Every sprite comes from the mk(rows, map, opt) builder. A text grid (one char per pixel, . = empty) plus a char→hex map becomes a small canvas, with a 1-px black outline added on every empty pixel whose 4-neighbour is filled. Each sprite is baked as {r, l} (right and left facing, l = horizontal flip), for 2 frames and every palette variant (normal, flash, checker see-through copy).
  3. Bake ground per chunk. Chunks are 256 world units = 171 × 171 px. The material map is evaluated per 2×2 px block, then each pixel gets its base colour or an edge colour, then decals are stamped. A generator yields every few rows so baking never stalls a frame.
  4. Per frame, in this order: ground chunks (integer positions) → animated water waves → all shadows → y-sorted props, creatures and main character → orbiting lanterns → projectiles → particles → floating numbers → (display) optional scanlines.
  5. Snap everything. The blit helpers convert world → screen with Math.round(x * S + ox) and draw at an integer anchor (feet: bottom-centre, mid: centre). Never draw a sprite at a fractional position or with a transform scale.
  6. CRT hint. Only when up ≥ 3, a pattern darkens the bottom display row of every art-pixel row with rgba(0,0,0,0.16). This is the only alpha in the whole style, and it lives in display space.

World and ground

The ground is a top-down overworld of flat material areas. There are five materials, decided per 2×2 art-pixel block (this gives the chunky 2-px stair steps of NES tiles), at 1 art pixel = 1.5 world units:

MaterialRule (reference)BaseEdge colours
Plazaoctagonal rect, 88–132 × 60–92 px, cut = 6, ~42 % of 460-px cellsbrick tileblack outer ring, light-grey #BCBCBC second ring
Waterwarped noise /520 < 0.335#0000BCblack outer ring, blue #0058F8 second ring
Roaddistance to 2 domain-warped Perlin zero-lines < 11 world units#AC7C00sand #F0D0B0 next to water, dark brown #503000 next to grass/forest
Forest floorwarped noise /640 > 0.555#503000black cliff line next to grass, ochre lip next to road/water
Grasseverything else#005800leaf-green #00A800 lip next to any other material

Priority when classifying a block: plaza > water > road > forest > grass. The overall ratio is about 50 % grass, 25 % forest floor, 10 % road, the rest water, stone and decals.

Edges are the tile language. Every boundary is a single 1-px line (or a 2-ring for water and plazas), never a blend: grass gets a leaf-green lip, forest floor sits behind a black cliff line where it meets grass, roads get a dark-brown edge and a sand lip at water.

Brick tile. 12 × 6 px running bond, with rows offset by 6. Mortar (ly === 5 or lx === 11) is black. The top-left 5×1 and 1×3 of each brick is #BCBCBC, and the rest is #7C7C7C. Every ~10th brick gets a 4-px black crack.

Decals are glyphs ([dx, dy, colour] triplets built from text rows). One glyph is stamped per hashed grid cell, only on its own material and never on edge pixels:

Water gets anchors on an 11 × 7 px grid (only where the whole 9 × 6 neighbourhood is water). A 5 × 2 px wave glyph in cyan #3CBCFC or blue #0058F8 toggles between two shapes at 2.2 Hz. This is the only per-frame animation of the ground.

No noise texture. Surfaces are flat fills; all texture comes from the decal glyphs above.

Characters

Every figure is a text grid run through the same mk builder, so all of them share the 1-px black auto-outline, ≤ 3 colours + black per part, 2 frames and a horizontal flip for facing. Figure families differ by silhouette first, palette second.

Main character

A round orange pumpkin head with a carved yellow face and a green stem, on a small body in blue overalls with green vine sleeves. The grid is 13 px wide and 19 rows tall. With the outline that is 15 × 21 px, about 22 × 31 world units. Verbatim from the module:

......gg.....   HEAD (10 rows)          o = #E45C10 orange
.....gg......                           y = #F8D878 yellow (carved face)
..ooooooooo..                           g = #00A800 green (stem, vine sleeves)
.ooooooooooo.                           b = #0078F8 blue overalls
oooooyoooyooo   <- eyes (1-px peaks)    k = #000000 shoes
ooooyyyoyyyoo
ooooooooooooo
ooooyoyoyoyoo   <- zig-zag mouth
.oooyyyyyyyo.
..ooooooooo..
...ggggggg...   BODY (7 rows)
..ggbbbbbbb..
.gg.bbbbbbbb.
...bbbbbbbbbg
..gbbbbbbbbb.
..bbbbbbbbbb.
..bbbbbbbbb..
....bb.bb....   LEGS frame 0  |  frame 1: '...bb...bb...'
...kkk.kkk...                 |           '..kkk....kk..'

Small creature (root creature)

14 × 15 px: a purple root creature with a leafy green top, a round purple head with black slit eyes, and a cream lower half with a checkered k/c mouth of teeth. One row of legs alternates between 2 frames, and the sprite lifts 1 px on frame 1 (a hop). Palette variants: P = #940084 or #D800CC, c = #FCE0A8, g = #00A800. Shadow: 12 px.

...gg.g.gg....
....ggggg.....
......g.......
....PPPPPP....
..PPPPPPPPPP..
.PPPkPPPPPPkP.
.PPPPkkPPkkPP.
.PPPPckPPckPP.
.PPPPccPPccPP.
.cPcPcPcPcPcP.     <- checker seam between the two colour bands
.cccccccccccc.
..cckckckckcc.     <- teeth
...cckkkkkkc..
....cccccc....
...c..cc..c...     legs frame 0 (frame 1: '....c.cc.c....')

Fast floating creature (ghost)

A 13-px-wide white #FCFCFC head with cyan #3CBCFC shading on the left and lower edge, black eyes and an open black mouth, plus a 6-row tail that tapers to a single pixel. The tail is built with tailFrom: 10: rows from 10 on keep only pixels where (x + y + parity) & 1 == 0 and get no outline. Two parities are baked, and the parity flips with the frame counter, so the tail shimmers like NES flicker transparency. It hovers 3–4 px above an 8-px shadow, and its 2 tail frames (the second one curls to the right) alternate at 3 Hz.

Large creature (root giant)

22 × 27 px. The top is a purple #940084 root head with a leafy green crown and gold #F8B800 eyes under black brows. The body is ochre #AC7C00 with dark-brown #503000 cracks and a checkered black mouth, with long arms hanging at both sides, joined to the head by a checker seam row. Legs have 2 frames with dark-brown feet, each footfall spawns a small grey dust sprite, and it casts a 24-px shadow. Its flash palette is pink #F878F8, white, yellow and red. When removed it disappears in a big burst (R = 1.7) with 3 extra bursts.

Props

Props are outlined sprites standing on the ground, drawn with the same mk builder and NES rules as the figures: 1-px black outline, ≤ 3 colours + black, flat fills, light on the upper left, black on the lower right. They are blitted at their feet (bottom-centre) on whole art pixels and y-sorted with the figures.

Effects and particles

All effects are built procedurally on tiny pixel grids at init, use only palette colours and are blitted at whole art pixels. Fading is done by blinking, never by alpha.

Atmosphere and lighting

UI

The HUD is a solid black status bar across the top, like an NES status area, all in Press Start 2P:

.hud { font-family: 'Press Start 2P', monospace; color: #fcfcfc; background: #000;
  padding: 14px 32px 12px; box-shadow: 0 4px 0 #000; image-rendering: pixelated; }
.hud .label { font-size: 16px; color: #f83800; text-transform: uppercase; }
.bar { height: 16px; background: #000; box-shadow: 0 0 0 4px #fcfcfc; border-radius: 0; }
.bar-fill { height: 100%; transition: none;
  background: repeating-linear-gradient(90deg, #3cbcfc 0 8px, #0058f8 8px 12px, #000 12px 16px); }
.window { background: #000; border: 4px solid #fcfcfc; border-radius: 0;
  box-shadow: 0 0 0 4px #000, inset 0 0 0 4px #000, inset 0 0 0 8px #fcfcfc; }
.dim { background: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 8px 8px; }
.blink { animation: nesblink 1s steps(1) infinite; }
@keyframes nesblink { 0% { opacity: 1; } 50% { opacity: 0; } }

Icons are 16 × 16 text-grid sprites with the same palette rules. Render them as pixelated SVG data URLs (shape-rendering='crispEdges', one <rect> per run) or as canvases scaled by an integer factor.

Motion and animation

Do and don't

Do

Don't

Implementation recipe

  1. Set the view: 360 world units tall, PS = 1.5, a 240-row art buffer, integer upscale up = max(1, round(screenH / 240)), smoothing off.
  2. Copy the NES palette table (PALETTE in starter.js) and the mk(rows, map, opt) sprite builder.
  3. Draw your main character as a ~13 × 19 text grid: a big head with a 2-colour face, a small body in 1–2 colours, and 2 leg rows × 2 frames. Bake {r, l} for both frames, plus a flash palette.
  4. Draw each creature family as one grid (small: ~14 × 15, large: ~22 × 27) and palette-swap it for variants. Floating or ethereal creatures get a checker tail (tailFrom, two parities).
  5. Build effect frames procedurally on small grids: burst (4 frames), puff (3), star (3), collectible spin (4), 3×5 digits.
  6. Ground: define 3–5 materials from noise or level data on a 2×2 px block grid. Fill base colours and apply the edge table (lip, cliff or ring), then stamp decal glyphs on hashed grid cells. Bake per chunk with a generator.
  7. Props: build trees and bushes procedurally from circles (light upper-left crescent, black lower-right rim, checker shade). Write rocks, tombstones, fences and signs as grids.
  8. Each frame: blit chunks → 2-frame tile animations → checker shadows → y-sorted figures and props → orbiting objects → projectiles → particles → numbers, all at rounded art-pixel positions.
  9. HUD: a black bar, Press Start 2P, red labels, a heart row, a segmented progress bar, and double-bordered black windows. Dim the world with checker dither.
  10. Check: zoom into a screenshot and verify that every pixel is a palette colour, every sprite has a black 1-px rim, and no pixel is blended.

Code

Everything below runs on its own. starter.js contains the full preview scene (ground baker, all sprites, HUD). The complete reference module is ../../js/styles/nes8bit.js.

1. The sprite builder: text grid → outlined NES sprite (ported 1:1).

function mk(rows, map, opt = {}) {
  const h = rows.length, w = Math.max(...rows.map((r) => r.length));
  const o = opt.outline === false ? 0 : 1, W = w + 2 * o, H = h + 2 * o;
  const cell = new Array(W * H).fill(null), src = new Uint8Array(W * H);
  const tailFrom = opt.tailFrom ?? 1e9, par = opt.parity || 0;
  for (let y = 0; y < h; y++) for (let x = 0; x < rows[y].length; x++) {
    const c = map[rows[y][x]]; if (!c) continue;
    const i = (y + o) * W + x + o;
    if (y >= tailFrom) { if (((x + y + par) & 1) === 0) cell[i] = c; src[i] = 2; } // checker tail, no outline
    else { cell[i] = c; src[i] = 1; }
  }
  if (o) for (let y = 0; y < H; y++) for (let x = 0; x < W; x++) {
    const i = y * W + x; if (src[i]) continue;
    let n = (x > 0 && src[i - 1] === 1) || (x < W - 1 && src[i + 1] === 1) || (y > 0 && src[i - W] === 1) || (y < H - 1 && src[i + W] === 1);
    if (!n && opt.diag) n = (x > 0 && y > 0 && src[i - W - 1] === 1) || (x < W - 1 && y > 0 && src[i - W + 1] === 1) ||
      (x > 0 && y < H - 1 && src[i + W - 1] === 1) || (x < W - 1 && y < H - 1 && src[i + W + 1] === 1);
    if (n) cell[i] = '#000000';
  }
  if (opt.checker !== undefined) for (let i = 0; i < W * H; i++) if ((((i % W) + ((i / W) | 0)) & 1) !== opt.checker) cell[i] = null;
  const c = document.createElement('canvas'); c.width = W; c.height = H;
  const ctx = c.getContext('2d'), img = ctx.createImageData(W, H);
  cell.forEach((hex, i) => { if (!hex) return; const v = parseInt(hex.slice(1), 16);
    img.data.set([v >> 16, (v >> 8) & 255, v & 255, 255], i * 4); });
  ctx.putImageData(img, 0, 0);
  return c;
}
// usage: a ghost (head rows 0-9 solid, tail rows 10+ checkered), two parities
const GHOST_ROWS = ['...WWWWW.....', '..WWWWWWW....', '.WWWWWWWWW...', '.WWWkkWWkkW..', '.WWWkkWWkkW..', '.BWWWWWWWWWW.',
  '.BWWWWkkWWWWW', '.BBWWkkkkWWW.', '..BWWWkkWWW..', '..BBWWWWWWB..', '..BBBWWWWBB..', '...BBWWWBB...', '...BBBWBB....',
  '....BBBB.....', '....BBB......', '.....B.......'];
const ghost = [0, 1].map((p) => mk(GHOST_ROWS, { W: '#FCFCFC', B: '#3CBCFC', k: '#000000' }, { tailFrom: 10, parity: p }));

2. Pixel-snapped blitting and the low-res buffer.

const PS = 1.5;                                        // world units per art pixel
function setupBuffer(display) {
  const up = Math.max(1, Math.round(display.height / (360 / PS)));
  const buf = document.createElement('canvas');
  buf.width = Math.ceil(display.width / up); buf.height = Math.ceil(display.height / up);
  return { buf, ctx: buf.getContext('2d'), up };
}
// world -> art pixel, always rounded; anchor = bottom-centre of the sprite ("feet")
function blitFeet(ctx, img, wx, wy, cam, lift = 0) {
  const x = Math.round((wx - cam.x) / PS + ctx.canvas.width / 2);
  const y = Math.round((wy - cam.y) / PS + ctx.canvas.height / 2);
  ctx.drawImage(img, x - (img.width >> 1), y - (img.height - 1 + lift));
}
function present(display, b) {
  const d = display.getContext('2d');
  d.imageSmoothingEnabled = false;
  d.drawImage(b.buf, 0, 0, b.buf.width * b.up, b.buf.height * b.up);
  if (b.up >= 3) { d.fillStyle = 'rgba(0,0,0,0.16)'; for (let y = b.up - 1; y < display.height; y += b.up) d.fillRect(0, y, display.width, 1); }
}

3. Tile-language edge rules for the ground (per pixel, after the 2×2-block material map).

// mat: Uint8Array with a margin M around the chunk, EW = row width. 0 grass, 1 forest, 2 road, 3 water, 4 plaza
function edgeColour(mat, i, EW, C, brick) {
  const m = mat[i], n = [mat[i - 1], mat[i + 1], mat[i - EW], mat[i + EW]];
  const diff = n.some((q) => q !== m);
  const far = mat[i - 2] !== m || mat[i + 2] !== m || mat[i - 2 * EW] !== m || mat[i + 2 * EW] !== m;
  if (m === 4) return diff ? C.k : far ? C.g1 : brick();          // black ring, light-grey ring, bricks
  if (m === 3) return diff ? C.k : far ? C.blue : C.navy;           // black ring, blue ring, navy
  if (m === 0) return diff ? C.gr1 : C.gr0;                         // light-green lip on grass
  if (m === 1) return n.includes(0) ? C.k : diff ? C.ochre : C.br0; // black cliff vs grass
  return n.includes(3) ? C.sand : diff ? C.br0 : C.ochre;           // road: sand at water, brown edge
}

4. Checker shadow and invulnerability flicker.

function shadowSprite(w, par) {
  const h = Math.max(2, Math.round(w / 3)), rows = [];
  for (let y = 0; y < h; y++) {
    let s = '';
    for (let x = 0; x < w; x++) {
      const dx = (x + 0.5 - w / 2) / (w / 2), dy = (y + 0.5 - h / 2) / (h / 2);
      s += dx * dx + dy * dy <= 1 && ((x + y + par) & 1) === 0 ? 'k' : '.';
    }
    rows.push(s);
  }
  return mk(rows, { k: '#000000' }, { outline: false });
}
// pick the parity that matches the screen grid so the dither never crawls
const pickShadow = (set, sx, sy) => set[(sx + sy) & 1];
// flicker: skip drawing on every other 2-frame window while a figure blinks
const visible = (frame, blinking) => !(blinking && (frame & 2));

Adapting it to your project

Performance notes

Copy-paste prompt

Use the 8-Bit Arcade (NES) art style for my project: <X>.
- Render into a low-res buffer: 1 art pixel = 1.5 world units, view = 240 art rows, integer upscale, imageSmoothingEnabled = false.
- Only use NES 2C02 palette colours: #000000 #FCFCFC #BCBCBC #7C7C7C #005800 #00A800 #58D854 #503000 #AC7C00 #F0D0B0
  #FCE0A8 #881400 #F83800 #E45C10 #F8B800 #F8D878 #0000BC #0058F8 #0078F8 #3CBCFC #940084 #D800CC #F878F8.
- Every sprite is a text grid (one char per pixel) + char->colour map; a builder adds a 1-px pure black outline.
- Max 3 colours + black per sprite part; big heads with 2-colour faces; exactly 2 animation frames; flip for facing.
- Variants and flashes are palette swaps. No gradients, no alpha, no anti-aliasing, no rotation or scaling in the world.
- Transparency = checkerboard pixels (ghost tails, afterimages, shadows, see-through trees); blinking = flicker (skip when frame & 2).
- Ground = flat material areas on a 2x2-pixel block grid: grass #005800 with #00A800 lip, forest #503000 behind a black cliff
  line, road #AC7C00 with #503000 edge, water #0000BC with black + #0058F8 rings, 12x6 grey brick plazas.
- Decals: 2-row grass tufts on an 8-px grid, 3x3 flowers, 1-px leaf litter, pebbles; water waves toggle 2 frames.
- Props: circle-built trees and bushes (light upper-left crescent, black lower-right rim, checker shade), grid rocks, fences, signs, tombstones.
- Effects: 4-frame white/gold/red burst, 3-frame puff and star, 4-frame spinning collectibles, 3x5 bitmap number digits.
- Round every blit to whole art pixels; snap, never ease. No lighting, no vignette; optional faint scanlines only on the display.
- UI: black status bar, Press Start 2P at 8/16/32 px, red uppercase labels, rows of 8x7 hearts, segmented cyan/blue bar,
  black windows with double white borders, checker-dither dimming behind menus.