miwale

Pumpkin Boy — Game Art Style Spec

A pumpkin-tinted handheld LCD: exactly four shades, Bayer dithering, crisp outlined mini sprites at 2 world units per pixel.

Pumpkin Boy ("Kürbis-Boy" in the module) looks like a monochrome handheld console whose screen has an orange tint. Every pixel of the world, every sprite and every HUD window is one of four warm shades: ink brown #2a1712, rust #7c3a1e, pumpkin #e0812c and cream #f6d7a1. There are no gradients and no alpha in the art: volume comes from four flat bands joined by single checkerboard rows, transparency and shadows are ordered (Bayer 4x4) dither, glow is a dithered ring. Sprites are tiny text grids (10-26 px) with an automatic 1 px ink outline. The low-res image is upscaled with nearest neighbour, and a faint LCD cell grid, vignette and recessed bezel sit on top at display resolution.

At a glance

PropertyValue
FamilyPixel Art · 4 Colours
Moodnostalgic, cosy-spooky, autumnal, crisp, toy-like
Best forcrowded top-down arena games, top-down adventures, harvest games with a spooky twist, short prototypes with a strict palette, monster-collecting RPGs
RendererCanvas 2D, procedural, no image assets
Pixel artyes - pixelArt: { scale: 2 } (1 art px = 2 world units, 180 art px visible vertically)
Complexity4/10 - tiny sprites are quick to draw, but with 4 colours every new creature design is harder to tell apart
FontsPress Start 2P (HUD), built-in 3x5 bitmap digits (floating numbers)
Key colours#2a1712 ink · #7c3a1e rust · #e0812c pumpkin · #f6d7a1 cream

When to use it

Color palette

Swatch nameHexRole
Ink (index 0)#2a1712Outlines, eyes, cracks, HUD borders and text. Never on open ground.
Rust (index 1)#7c3a1eShadow band, dark character bodies (main character torso, small creature), checker shadows, furrow and field edges, trunks.
Pumpkin (index 2)#e0812cMid tone: main character head, roads, grass tufts, furrows, dithered halos, bar fills.
Cream (index 3)#f6d7a1Backplane: open meadow, highlights, ghost bodies, HUD window fill, floating numbers.
LCD gap (overlay)#fae4b4 @ 20%1 display px grid line between upscaled art pixels (only if upscale >= 3).
Vignette / bezel (overlay)#2a1712 @ 0-30%Radial vignette 0 -> 0.16, top bezel 0.30, left bezel 0.24, cell edge 0.035.

Palette rules:

Typography

Press Start 2P (Google Fonts, weight 400 only) - https://fonts.google.com/specimen/Press+Start+2P Role: every HUD string. Sizes are strict multiples of 8 px: 8 px labels, 16 px values / card text, 24 px counters, 32 px clock and titles.

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
.clock-time  { font: 400 32px/36px 'Press Start 2P', monospace; color: #2a1712; text-shadow: 4px 4px 0 #e0812c; letter-spacing: 0; }
.clock-label { font: 400 8px 'Press Start 2P', monospace; color: #7c3a1e; letter-spacing: 1px; text-transform: uppercase; }
.tag         { font: 400 16px/20px 'Press Start 2P', monospace; background: #2a1712; color: #f6d7a1; text-transform: uppercase; }

Text effects: no blur, no glow. Big numbers and titles get a hard 4 px pumpkin offset shadow (4px 4px 0 #e0812c). Secondary text is rust, never reduced opacity. Inverted tags are cream on ink.

3x5 bitmap digits (built into the module) for numbers floating in the world: glyph grid 3 wide x 5 tall, 1 px spacing, cream fill (emphasised variant: pumpkin + !), full ink outline plus an extra rust underline row so 1 px gaps between digits stay readable.

Rendering technique

  1. Constants. PS = 2 world units per art pixel. The screen shows 360 world units vertically, so the art buffer is 360 / 2 = 180 px tall. The renderer picks up = round(displayH / 180) and a buffer of ceil(displayW / up) x ceil(displayH / up).
  2. Palette as 32-bit words. PX32[i] = (255 << 24) | (b << 16) | (g << 8) | r for the 4 colours, so ImageData can be written through a Uint32Array.
  3. Index grids (IG). Every sprite is an Int8Array of palette indices (-1 = empty) built from text rows: '0'..'3' = colour, '.' = keep, 'x' = erase. Parts are composed by stamping rows into the same grid (main character = body rows at y 10 + head rows at x 1).
  4. Auto outline. outline(g, col = 0) grows the grid by 1 px on each side and fills every empty pixel that has a filled 4-neighbour with col. The main character gets outline(outline(g), 3) = ink line plus a cream halo.
  5. Bake at init. Each grid becomes up to four canvases: right, left (mirrored), and palette-inverted right/left for flash frames. Also baked: dither-faded ghost copies (25/50/75%), shadow ellipses per size (two checker phases), halo rings, puff frames, number sprites (cached by string).
  6. Ground chunks. 256 world units = 128 art px per chunk, generated per pixel into ImageData (see World and ground), drawn at integer positions.
  7. Per frame, in the art buffer: ground chunks -> collectibles -> checker shadows of all props / creatures / main character -> y-sorted props, creatures and main character -> orbiting objects -> projectiles -> particles -> floating numbers. Every blit is snapped: px = round(x / PS - w * ax).
  8. Upscale the buffer to the display with imageSmoothingEnabled = false.
  9. Display overlay at full resolution (cached per size): LCD cell grid, vignette, bezel gradients. Then the HTML/CSS HUD on top.

World and ground

The floor is an autumn farmland seen from straight above, painted only in rust, pumpkin and cream (never ink) at 1 art px = 2 world units, and generated as deterministic functions of world position (fieldsAt(wx, wy)):

Per-pixel patterns (gx, gy are global art-pixel coordinates):

An edge pass then makes every border crisp: a field pixel touching a non-field pixel becomes rust if the non-field is below it, else pumpkin; tall grass gets a rust bottom edge and pumpkin top/side edge; a meadow pixel directly below a field or tall grass becomes a checkerboard drop shadow ((i + j) & 1 ? 2 : 3).

Decals are stamped as text glyphs after the edge pass (34-unit scatter cells): flower ['.2.','212','.2.'], daisy, stone ['.22.','2332','.11.'], pumpkinS ['..1..','.222.','22322','.111.'], pebbles on roads, leaves / mushrooms in forests, bones and cracks on plazas. Field pumpkins pumpkinF ['...1...','.23212.','2322221','2222211','.11111.'] are snapped onto the nearest furrow.

Keep the ground busy but low-contrast (mostly cream with pumpkin marks) so ink-outlined characters and props pop on top of it.

Characters

All characters are text grids of palette digits (10-26 px wide), composed from parts, auto-outlined with 1 px ink, mirrored for facing left, and baked with a palette-inverted copy for flash frames. Feet anchor at bottom centre; every blit snaps to whole art pixels (2 world units). Animation is frame swapping only.

Main character (a pumpkin-headed figure): a 12x14 grid composed of a 10x10 head over a 12x4 body, then double outlined (ink, then cream) to 16x18 art px (32 x 36 world units). It is the only character with a light rim, so it reads on every ground. Head (verbatim):

....11....
.22211222.
2221221222
2223222322
2233323332
2222222221
2322222231
2333233332
.22322322.
..222222..

Body frames (rows placed at y = 10): row 0 is always ...113311... (collar with cream buttons).

FrameRows 1-3
idle..21111112.. ...111111... ...11..11...
w0.321111112.. ...111111... ..11...11...
w1.321111112.. ...111111... ...11.11....
w2.321111112.. ...111111... ...11...11..
w3.321111112.. ...111111... ....11.11...
throw..2111111... (row 0 ...1133112..)
dash3321111112.. ..1111111... .11.....11.. (head shifted +1,+1)

Construction rules: big round pumpkin-orange head (index 2) with cream carved eyes and grin (3) and rust ribs/stem (1); small rust body; legs as 2-px pairs. Idle frame 2 drops the head by 1 px. Facing left = mirrored canvas. The sprite sits 1 px below the logical position so it stands on its shadow (rust checker ellipse 11x3 px).

Creatures use a single ink outline (no cream halo), so the main character stays the only figure with a light rim.

Props

Props are y-sorted with the characters, drawn as text grids of palette digits with a 1 px ink 4-neighbour outline (fences are the only exception: no outline), and each stands on a rust checkerboard shadow ellipse.

Effects and particles

All effects are palette pixels on the art grid: no alpha, no blur, no rotation.

Atmosphere and lighting

UI

Handheld-style windows everywhere: cream fill, 4 px ink border, 4 px cream gap, 4 px ink outer ring, square corners. Bars are segmented and pixel-hard (12 px on / 4 px cream gap for the wide bar, 8 px on / 4 px gap for the short bar) with a lighter top stripe. Icons are 14x14 four-colour grids, outlined, drawn at integer multiples (floor(size / 16)). The alert state inverts the bar window (ink fill, cream text). Modal screens darken the scene with an ink checkerboard, not a translucent fill. Cards are cream windows with a blinking ink triangle cursor (steps(1)). All text Press Start 2P in multiples of 8 px; big numbers get the hard 4 px pumpkin offset shadow; tags are cream on ink.

.win { background:#f6d7a1; border:4px solid #2a1712; border-radius:0;
       box-shadow:0 0 0 4px #f6d7a1, 0 0 0 8px #2a1712;
       font-family:'Press Start 2P', monospace; color:#2a1712; }
.bar-wide      { height:28px; overflow:hidden; }
.bar-wide-fill { background:repeating-linear-gradient(90deg,transparent 0 12px,#f6d7a1 12px 16px),
                            linear-gradient(#f6d7a1 0 4px,#e0812c 4px 16px,#7c3a1e 16px); transition:none; }
.bar      { width:208px; height:24px; background:#f6d7a1; border:4px solid #2a1712; border-radius:0; }
.bar-fill { background:repeating-linear-gradient(90deg,transparent 0 8px,#f6d7a1 8px 12px),
                       linear-gradient(#e0812c 0 4px,#7c3a1e 4px); transition:none; }
.alert .win { background:#2a1712; color:#f6d7a1; }
.icon    { width:32px; height:32px; image-rendering:pixelated; }
.overlay { background:repeating-conic-gradient(#2a1712 0 25%,transparent 0 50%) 0 0/10px 10px; }
.cursor  { animation:blink 1s steps(1) infinite; }
@keyframes blink { 0% { opacity:1 } 60% { opacity:0 } }

Motion and animation

Do and don't

Do:

Don't:

Implementation recipe

  1. Fix the camera to show 360 world units vertically; set PS = 2, buffer height 180 px, up = round(displayH / 180).
  2. Define the 4 hex colours and precompute their PX32 words and the inversion map [3,2,1,0].
  3. Implement IG(w,h) with rows(), outline(g, col), toCanvas(g, map) and a sprite-set helper producing right / left / inverted canvases.
  4. Draw every character and prop as text rows (palette index digits). Keep the main character ~16x18 px incl. outline, small creatures ~12x14, large creatures ~28x29.
  5. Compose characters from parts (head + body frames), then outline: ink for everyone, ink + cream halo for the main character.
  6. Write ground as per-pixel pattern functions of global art-pixel coordinates (grass tufts, tall grass motif, furrows, road speckle), choose materials from smooth noise / Voronoi fields, run an edge pass, stamp decal glyphs, write into a Uint32Array ImageData. Cache by chunk.
  7. Bake checker shadow ellipses (2 phases), dithered halo rings, puff frames, number sprites.
  8. Per frame: ground, collectibles, shadows, y-sorted characters and props, orbiting objects, projectiles, pixel particles, numbers - all via blit() that rounds to whole art pixels.
  9. Upscale with imageSmoothingEnabled = false, then draw the cached LCD overlay (grid + vignette + bezel).
  10. Build the HUD as double-bordered cream windows in Press Start 2P with segmented bars, sizes in multiples of 8 px.
  11. Use on-style feedback effects: inverted flash + sparks on impact, puff + pixel shower when something vanishes, stars on collectibles, blinking instead of fading.

Code

The blocks below are ported from the module and run on their own. A complete runnable scene (ground, main character, three creature types, props, lanterns, projectiles, LCD overlay and HUD) is in starter.js; the full module is ../../js/styles/kuerbisboy.js.

Palette, index grids and auto outline:

const HEX = ['#2a1712', '#7c3a1e', '#e0812c', '#f6d7a1'];
const PX32 = HEX.map((h) => { const r = parseInt(h.slice(1, 3), 16), g = parseInt(h.slice(3, 5), 16), b = parseInt(h.slice(5, 7), 16);
  return ((255 << 24) | (b << 16) | (g << 8) | r) >>> 0; });
function IG(w, h) {
  const a = new Int8Array(w * h).fill(-1);
  return { w, h, a,
    set(x, y, v) { if (x >= 0 && y >= 0 && x < w && y < h) a[y * w + x] = v; },
    get(x, y) { return x >= 0 && y >= 0 && x < w && y < h ? a[y * w + x] : -1; },
    rows(rows, ox = 0, oy = 0) {
      rows.forEach((r, y) => { for (let x = 0; x < r.length; x++) { const c = r.charCodeAt(x);
        if (c >= 48 && c <= 51) this.set(ox + x, oy + y, c - 48); else if (c === 120) this.set(ox + x, oy + y, -1); } });
      return this;
    } };
}
function outline(g, col = 0) { // grow by 1 px, fill empty 4-neighbours of filled pixels
  const o = IG(g.w + 2, g.h + 2);
  for (let y = 0; y < o.h; y++) for (let x = 0; x < o.w; x++) {
    const v = g.get(x - 1, y - 1);
    if (v >= 0) o.a[y * o.w + x] = v;
    else if (g.get(x - 2, y - 1) >= 0 || g.get(x, y - 1) >= 0 || g.get(x - 1, y - 2) >= 0 || g.get(x - 1, y) >= 0) o.a[y * o.w + x] = col;
  }
  return o;
}
function toCanvas(g, map) { // map = [3,2,1,0] gives the inverted flash copy
  const c = document.createElement('canvas'); c.width = g.w; c.height = g.h;
  const ctx = c.getContext('2d'), img = ctx.createImageData(g.w, g.h), d = new Uint32Array(img.data.buffer);
  g.a.forEach((v, i) => { if (v >= 0) d[i] = PX32[map ? map[v] : v]; });
  ctx.putImageData(img, 0, 0);
  return c;
}
// main character: body rows at y 10, head at x 1, then ink outline + cream halo
// const mainCharacter = toCanvas(outline(outline(IG(12, 14).rows(BODY_W0, 0, 10).rows(HEAD, 1, 0)), 3));

Bayer dither fade (ghost tail) and grid-locked checker shadow:

const B4 = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5].map((v) => (v + 0.5) / 16);
const bay = (x, y) => B4[((y & 3) << 2) | (x & 3)];
function dissolveRows(o, f) { // o = outlined index grid; lower rows keep fewer pixels
  const g = IG(o.w, o.h);
  for (let y = 0; y < o.h; y++) {
    const lv = y < 9 ? 1 : y < 11 ? 0.75 : y < 13 ? 0.5 : 0.3;
    for (let x = 0; x < o.w; x++) { const v = o.a[y * o.w + x]; if (v >= 0 && bay(x + f, y + f * 2) < lv) g.a[y * o.w + x] = v; }
  }
  return g;
}
function shadowPair(w, h) { // two checker phases, rust (index 1)
  return [0, 1].map((ph) => { const g = IG(w, h);
    for (let y = 0; y < h; y++) for (let x = 0; x < w; x++) {
      const dx = (x + 0.5 - w / 2) / (w / 2), dy = (y + 0.5 - h / 2) / (h / 2);
      if (dx * dx + dy * dy <= 1.05 && ((x + y + ph) & 1) === 0) g.set(x, y, 1);
    }
    return toCanvas(g); });
}
function drawShadow(ctx, pair, x, y) { // x, y in art pixels; phase picked so the checker never crawls
  const w = pair[0].width, h = pair[0].height, px = Math.round(x - w / 2), py = Math.round(y - h / 2);
  ctx.drawImage(pair[(px + py) & 1], px, py);
}

Ground pixel patterns and the edge pass (global art-pixel coordinates):

function hashInt(x, y, s) { let h = (Math.imul(x | 0, 374761393) + Math.imul(y | 0, 668265263) + Math.imul(s | 0, 1442695041)) | 0;
  h = Math.imul(h ^ (h >>> 13), 1274126177); h ^= h >>> 16; return h >>> 0; }
function grassPx(gx, gy, mac) { // cream with staggered 'v' tufts in pumpkin
  const cy = Math.floor(gy / 5), sx = gx + ((cy & 1) ? 3 : 0), cx = Math.floor(sx / 6), h = hashInt(cx, cy, 77);
  if ((h & 1023) / 1024 < 0.06 + 0.5 * mac) {
    const lx = sx - cx * 6 - (h >>> 10) % 4, ly = gy - cy * 5 - (h >>> 13) % 3;
    if (((h >>> 16) & 3) < 3) { if ((ly === 0 && (lx === 0 || lx === 2)) || (ly === 1 && lx === 1)) return 2; }
    else if ((lx === 0 || lx === 2) && (ly === 0 || ly === 1) && !(lx === 2 && ly === 0)) return 2;
  }
  return 3;
}
function fieldPx(gx, gy, o) { // o: 0 rows, 1 columns, 2 '/', 3 '\'
  const f = o === 0 ? gy : o === 1 ? gx : o === 2 ? gy + gx : gy - gx, r = ((f % 6) + 6) % 6, diag = o >= 2;
  if (r === 0 || (diag && r === 1)) return hashInt(gx >> 1, gy >> 1, 21) % 11 === 0 ? 1 : 2; // furrow + clods
  if (r === (diag ? 2 : 1)) return (gx & 3) === 1 && hashInt(gx >> 2, gy, 22) % 3 === 0 ? 2 : 3;
  return 3;
}
function edgePass(mat, col, W, H) { // mat: 0 grass, 1 tall, 2 road, 3 field
  for (let j = 1; j < H - 1; j++) for (let i = 1; i < W - 1; i++) {
    const k = j * W + i, m = mat[k];
    if (m === 3) { if (mat[k - 1] !== 3 || mat[k + 1] !== 3 || mat[k - W] !== 3 || mat[k + W] !== 3) col[k] = mat[k + W] !== 3 ? 1 : 2; }
    else if (m === 1) { if (mat[k + W] !== 1) col[k] = 1; else if (mat[k - W] !== 1 || mat[k - 1] !== 1 || mat[k + 1] !== 1) col[k] = 2; }
    else if (m === 0 && (mat[k - W] === 3 || mat[k - W] === 1)) col[k] = ((i + j) & 1) ? 2 : 3; // dithered drop shadow
  }
}

Pixel-snapped blit and the nearest-neighbour upscale with LCD grid:

const PS = 2; // world units per art pixel
function blit(ctx, img, x, y, ax = 0.5, ay = 1) { // world coords, buffer transform = 1 / PS
  ctx.drawImage(img, Math.round(x / PS - img.width * ax), Math.round(y / PS - img.height * ay));
}
function present(display, buffer, up) {
  const d = display.getContext('2d');
  d.imageSmoothingEnabled = false;
  d.drawImage(buffer, 0, 0, buffer.width * up, buffer.height * up);
  if (up >= 3) {
    d.fillStyle = 'rgba(250,228,180,0.2)';
    for (let x = 0; x < display.width; x += up) d.fillRect(x, 0, 1, display.height);
    for (let y = 0; y < display.height; y += up) d.fillRect(0, y, display.width, 1);
  }
  const W = display.width, H = display.height;
  const g = d.createRadialGradient(W / 2, H / 2, Math.min(W, H) * 0.42, W / 2, H / 2, Math.hypot(W, H) * 0.58);
  g.addColorStop(0, 'rgba(42,23,18,0)'); g.addColorStop(1, 'rgba(42,23,18,0.16)');
  d.fillStyle = g; d.fillRect(0, 0, W, H);
}

Adapting it to your project

Performance notes

Copy-paste prompt

Use the Pumpkin Boy art style for my project: 4-colour pumpkin-tinted handheld LCD pixel art.
- Use ONLY 4 colours in the image: ink #2a1712, rust #7c3a1e, pumpkin #e0812c, cream #f6d7a1. No alpha, no gradients in the art.
- Render into a low-res buffer at 2 world units per pixel (~180 px tall view), upscale by an integer with imageSmoothingEnabled = false.
- Define every sprite as text rows of palette digits '0'-'3' ('.' = empty), compose from parts (head + body frames).
- Auto-outline every sprite with a 1 px ink 4-neighbour outline; the main character gets an extra 1 px cream halo outline.
- Main character ~16x18 px incl. outline (big round pumpkin-orange head, cream carved face, small rust body); small creatures ~12x14 rust bodies with leafy crowns; floating ghosts cream with a Bayer-dithered fading tail; large creatures ~28 px banded dithered ovals.
- Shading = four flat bands joined by single checkerboard rows, light from the upper left. Transparency/fades = Bayer 4x4 masks.
- Shadows = rust checkerboard ellipses with two baked phases locked to the pixel grid. Glow = dithered pumpkin halo ring + lit sprite frame.
- Ground: mostly cream meadow with pumpkin 'v' tufts, pumpkin roads with rust specks, fields with furrows every 6 px, crisp 1 px rust/pumpkin borders, dithered drop shadows, tiny decal glyphs. Never ink on the ground.
- Props: round autumn trees from blob unions, pumpkins, carved glowing pumpkins, scarecrows, fences, graves, lamp posts, signs - all outlined text grids.
- Flash = palette inversion (0<->3, 1<->2). Particles are 1-2 px squares that blink out instead of fading.
- Animation by frame swapping only: 2 idle, 4 walk frames, 1 px bob on odd frames; everything snaps to whole pixels.
- After upscaling: faint LCD cell grid rgba(250,228,180,0.2), ink vignette to 16%, recessed top/left bezel.
- UI: cream windows with 4 px ink border + 4 px cream gap + 4 px ink outer ring, segmented bars, Press Start 2P in multiples of 8 px, hard 4 px pumpkin text shadow on big numbers.
- Floating numbers from a 3x5 bitmap font, cream with ink outline (emphasised variant pumpkin with '!').