miwale

Crayon Kids — Game Art Style Spec

A child's wax-crayon drawing brought to life: toothy white paper, zigzag scribble fills that go outside the lines, wobbly boiling outlines.

Everything looks as if a six-year-old drew it with a box of wax crayons on bright white drawing paper. Shapes are coloured in rather than shaded: a light wax layer, then zigzag sweeps whose ends overshoot the outline or stop short of it. The wax skips on the paper tooth, so tiny white specks show through every stroke. Outlines are wobbly black crayon loops that overshoot their own start. Every drawing exists in three hand-drawn versions that swap seven times a second, so the whole picture boils like animation on paper. Proportions are naive — big round heads, stick limbs, lollipop trees, triangle-roof houses, a smiling sun in the corner — and most of the sheet stays white.

At a glance

FamilyHand-drawn · Wax crayon
Moodcheerful, innocent, playful, handmade, sunny
Best forchildren's and family games, cozy or comedic top-down action, educational / storybook projects, doodle-themed menus, party and casual mobile games
RendererCanvas 2D, procedural: wax lines + zigzag scribbles → paper tooth erased (destination-out) → white margin → baked sprites and cached ground chunks
Pixel artNo — native resolution, sprites baked at 2.5–5 px per world unit
Complexity4/10 — naive shapes forgive imprecision; the work is three boil variants per pose and keeping outlines strong
FontsGochi Hand, Patrick Hand, Caveat Brush, Schoolbell (Google Fonts)
Key colourspaper #fbf8ef, black crayon #2b2a30, red #e2362c, orange #f78b1f, yellow #fdce28, grass #42ae3a, sky blue #42a8ea, blue #2a5ec8, purple #8c4cc4, pink #f67eb4, brown #94582c

When to use it

Color palette

SwatchHexRole
Drawing Paper#fbf8efGround and the white margin around every drawing (~55 % of the screen)
Black Crayon#2b2a30Outlines, stick limbs, eyes, motion lines, HUD ink
Crayon Red#e2362cCape, shoes, roofs, apples, the scribble-ball projectile, bar fill
Orange#f78b1fSun rays, back spikes, star outlines, fish
Sunny Yellow#fdce28Sun, stars, belly, house walls, sticky note
Grass Green#42ae3aGrass patches, tree crowns, the large creature's body
Dark Green#217a38Grass tick tufts, pine trees, outlines of green scenery
Light Green#9ece3aSecond grass crayon, sunlit crown scribble
Sky Blue#42a8eaPond scribble, windows, small collectible, cloud outlines, ruler fill
Blue#2a5ec8Shirt, pond outline and waves, title digits
Purple#8c4cc4Small scribble monster, the dragon's wing, counter digits
Dark Purple#5c2c8cTangle lines inside the scribble monster
Pink#f67eb4Rosy cheeks, hearts, blossoms
Brown#94582cHair, trunks, doors, path edges, fence outlines
Tan#d8a262Dirt path, fence pickets
Peach#fcc698Skin
Grey#929098Scribbled shadows (alpha 0.1–0.3), rocks, pebbles, smoke, motion trails
Ghost Blue#a8d6f6The fast creature, pond base layer, cloud scribble

Rules

Typography

FontUseCSS
Gochi Hand 400Counters, card titles, bar labels, caption names, floating numbersfont: 400 40px/1 'Gochi Hand', cursive; color: #2a5ec8;
Patrick Hand 400Body copy, card descriptions, hintsfont: 400 19px/1.25 'Patrick Hand', cursive; color: #57545e;
Caveat Brush 400Big panel titles in rainbow crayonfont: 400 88px/1 'Caveat Brush', cursive; + 6-stop hard rainbow background-clip: text
Schoolbell 400Small family / category labelsfont: 400 14px/1.2 'Schoolbell', cursive; color: #217a38;

Rendering technique

The whole look comes from four drawing helpers and one compositing trick.

  1. Wax line — resample a polyline every 0.7 units, push each point along the normal by a low-frequency wobble (amp · (0.65·sin(s·f1+φ1) + 0.35·sin(s·f2+φ2)), amp 0.2 units, f1 0.16–0.3, f2 0.55–1.0, plus 15 % jitter). Stroke in pressure runs of 4–9 points (width × 0.86–1.08, alpha 0.8–1), then a second pass offset by up to 0.32 widths at 0.55× width, alpha 0.5. Closed loops start at a random vertex, go round once and continue 7–20 % further while drifting outward by 0.3–0.9 widths — the overshoot of a real hand.
  2. Zigzag scribble — pick an angle, step across the shape in scan lines sp × 0.75–1.25 apart, find the shape's extent on each line, and alternately take its left and right end; connecting them gives diagonal sweeps. Each end moves outward by over × (−0.4…1): it overshoots the outline or stops short. Sweeps are drawn as slightly bowed quadratic curves in runs of 2–5 with varying alpha and width.
  3. Cell scribble (large areas) — a real child colours a big area in short patches. Tile the shape with jittered, overlapping squares (30 units, step 0.78×), and scribble shape ∩ square in each with its own angle (base ±0.4). Overlaps get darker; edges look spiky.
  4. Coloured-in shape = flat wax layer (alpha 0.4) + zigzag scribble (alpha 0.85) + wax outline.
  5. Paper tooth — a 160 px tileable alpha map (three periodic Perlin octaves stretched 1.6:1, plus per-pixel noise, thresholded clamp((v − 0.1)/0.26)·235) is filled over each finished drawing with destination-out. About a quarter of the wax disappears in clustered specks.
  6. White margin — copy the sprite, source-in fill it with paper colour, draw it 18 times on a 0.9-unit circle (plus centre) under the sprite.

Baked at init: 2 idle + 4 walk + 1 dash poses of the main character, 4 frames × 3 creatures, ~17 prop variants, all particles, shadows, icons — each in three boil variants (variant 0 immediately, 1–2 lazily) and mirrored for facing left. Per frame: only drawImage blits, rotated blits for particles and orbiting crayons. Draw order: ground chunks → fading scribble marks → collectibles → shadows → props and actors sorted by y → orbiting crayons → projectiles → particles → numbers → screen overlay (edge darkening, tape, clouds, sun). Sprite resolution K = clamp(round(h/360 · 1.5 · 4)/4, 2.5, 5) px per unit; blits are snapped to device pixels.

World and ground

One endless sheet of drawing paper; the screen shows 360 world units of height.

Characters

All figures are drawn facing right with the feet at (0, 0), then mirrored.

Main character — a kid in a red cape (~30 units tall, ~20 wide with cape):

Small creature — scribble monster (~20 × 20): a lumpy purple ball r 8 at y −11, purple wax 0.5 + scribble 0.9, a random looping dark-purple "tangle" line inside, a black fuzzy outline plus a loose second loop in dark purple (wobble 0.35–0.5). Big white googly eyes (r 2.4 and 1.9) with black outlines and pupils looking forward, an open dark mouth with three white triangle teeth, a little zigzag hair tuft, stick arms raised with three-finger tips, stick legs.

Fast creature — ghost (~22 × 20): a round head r 6.4 flowing into a body whose lower edge is a zigzag tail sweeping back to a point at x −12. Ghost-blue wax 0.55 + scribble 0.9, a faint white scribble highlight, black outline 0.95. Two black oval eyes, a dark "oo" mouth, a pink cheek, two outlined mitten arms reaching forward. It floats 2.4 units above its shadow and bobs.

Large creature — scribble dragon (~58 × 48): green body ellipse 13.6 × 10.6, yellow belly with four orange plate arcs, three orange back spikes, a green tail with yellow spikes and an orange arrow tip, a purple scalloped wing on the back with two black spars, two stubby legs (the far one darker) with black claw ticks, a neck to a big head with yellow horns, black nostrils, a white eye with black pupil and angry brow, three white teeth, a pink cheek, and a grey smoke curl from the nose on every other frame. Black outlines 1.0–1.25.

States: hit = white tint overlay up to 0.85 alpha plus a ±1.2-unit sideways jitter; hurt main character = red tint overlay and blinking; spawn = revealed top to bottom with a crayon tip scribbling along the edge; removal = crossed out with black scribble in three steps, then shrink to 50 % and fade.

Props

PropSize (units)Construction
Lollipop tree32 × 48Brown trunk (vertical scribble, darker outline, one branch stroke), scalloped green crown r 14 with dark green outline, lighter sub-scribble; variants plain, red apples, pink five-dot blossoms
Pine24 × 42Three stacked dark-green triangles, short trunk, little yellow star on top
House43 × 58Yellow / pink / sky-blue walls 34 × 25, red triangle roof to 43 up, brown door with yellow knob, two sky-blue cross windows, round attic window, red chimney with three grey outlined smoke puffs; black outlines
Flowers16 × 14Three stems with leaves, six-petal outlined heads (red/yellow/pink or purple/orange/sky) with yellow centres
Sunflower14 × 30Tall dark-green stem, two leaves, 11-point yellow petal star with orange outline, brown seeded centre
Bush24 × 16Scalloped green puff with red or purple berries
Rock11–15 × 8Grey lumpy blob with a crack, optional pebble
Fence40 × 16Five tan pickets with pointed tops and brown outlines, two brown rails drawn over them
Rainbow45 × 24Six concentric 2.7-wide wax arcs (red → purple) standing on two white clouds with sky-blue outlines

Every prop stands on 2–7 green tick tufts (a child's ground line) and a light grey scribble shadow, has the white margin and boils with three variants. Houses line the horizontal paths; trees, pines, bushes and flowers gather on grass; open paper gets only sparse rocks, flowers, bushes and the odd rainbow.

Effects and particles

All effects are little crayon drawings, baked once, blitted with rotation and scale.

Atmosphere and lighting

UI

Stationery taped onto the drawing:

Motion and animation

Do and don't

Do

Don't

Implementation recipe

  1. Build the tooth alpha map (160 px, tileable) and the paper tile (256 px).
  2. Write wax(ctx, pts, {w, c, closed}), scribble(ctx, pts, {ang, sp, over, cell}) and shape(ctx, pts, fill, line).
  3. Write a bake(bounds, draw) that draws in world units at K px/unit, erases the tooth, adds the white margin and returns {canvas, anchor}.
  4. Draw every character, creature and prop as functions of (ctx, rng, frame); bake each pose with three seeds; mirror for facing left.
  5. Ground chunks: grass patches → ponds (erase margin first) → paths (erase band first) → doodles → erase tooth (world-aligned) → paper underneath with destination-over.
  6. Per frame: variant = floor(time · 7) % 3, blit everything with that variant; scribbled shadow first, sort by y.
  7. Effects: bake pow, zigzag, star, heart, crumb, ring, puff and motion-line sprites; spawn them from impact, burst, collect and dash events.
  8. Screen overlay per screen size: edge darkening + tape; per frame two clouds and the sun (three variants each).
  9. HUD: paper scraps with tape, ruler bar, crayon-bordered cards, handwritten fonts, waxy noise mask on fills and titles.

Code

Wax line with pressure runs and an overshooting closed loop:

function waxLine(ctx, pts, rnd, { w = 1, color = '#2b2a30', closed = false, amp = 0.2 } = {}) {
  let src = pts;
  if (closed) {
    const n = pts.length, i0 = Math.floor(rnd() * n), extra = Math.max(2, Math.round(n * (0.07 + rnd() * 0.13)));
    src = [];
    for (let i = 0; i <= n + extra; i++) src.push(pts[(i0 + i) % n]);
  }
  const P = [];
  for (let i = 1; i < src.length; i++) {
    const [ax, ay] = src[i - 1], [bx, by] = src[i], k = Math.max(1, Math.round(Math.hypot(bx - ax, by - ay) / 0.7));
    for (let j = 0; j < k; j++) P.push([ax + (bx - ax) * j / k, ay + (by - ay) * j / k]);
  }
  const f = 0.16 + rnd() * 0.14, ph = rnd() * 6.28;
  let s = 0;
  const Q = P.map((p, i) => {
    const a = P[Math.max(0, i - 1)], b = P[Math.min(P.length - 1, i + 1)], l = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1;
    if (i) s += Math.hypot(p[0] - P[i - 1][0], p[1] - P[i - 1][1]);
    const off = amp * Math.sin(s * f + ph) + (rnd() - 0.5) * amp * 0.3;
    return [p[0] + (a[1] - b[1]) / l * off, p[1] + (b[0] - a[0]) / l * off];
  });
  ctx.lineCap = ctx.lineJoin = 'round';
  for (let i = 0; i < Q.length - 1;) {
    const e = Math.min(Q.length - 1, i + 4 + Math.floor(rnd() * 6));
    ctx.beginPath(); ctx.moveTo(...Q[i]);
    for (let k = i + 1; k <= e; k++) ctx.lineTo(...Q[k]);
    ctx.lineWidth = w * (0.86 + rnd() * 0.22);
    ctx.globalAlpha = 0.8 + rnd() * 0.2;
    ctx.strokeStyle = color; ctx.stroke();
    i = e;
  }
  ctx.globalAlpha = 1;
}

Zigzag scribble that goes outside the lines:

function scribbleFill(ctx, poly, rnd, { angle = -0.55, spacing = 1, width = 1.05, over = 0.6, color = '#42ae3a' } = {}) {
  const dx = Math.cos(angle), dy = Math.sin(angle), nx = -dy, ny = dx;
  const proj = poly.map(([x, y]) => x * nx + y * ny);
  const zig = [];
  let side = 0;
  for (let off = Math.min(...proj) + spacing * 0.3; off < Math.max(...proj); off += spacing * (0.75 + rnd() * 0.5)) {
    let t0 = Infinity, t1 = -Infinity;
    for (let i = 0; i < poly.length; i++) {
      const A = poly[i], B = poly[(i + 1) % poly.length];
      const va = A[0] * nx + A[1] * ny - off, vb = B[0] * nx + B[1] * ny - off;
      if ((va < 0) === (vb < 0)) continue;
      const t = va / (va - vb), s = (A[0] + (B[0] - A[0]) * t) * dx + (A[1] + (B[1] - A[1]) * t) * dy;
      t0 = Math.min(t0, s); t1 = Math.max(t1, s);
    }
    if (t0 > t1) continue;
    const ext = over * (rnd() * 1.4 - 0.4);           // overshoot – or stop short
    const s = side ? t1 + ext : t0 - ext;
    zig.push([dx * s + nx * off, dy * s + ny * off]);
    side ^= 1;
  }
  ctx.beginPath();
  zig.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));
  ctx.lineWidth = width; ctx.strokeStyle = color; ctx.globalAlpha = 0.85; ctx.stroke(); ctx.globalAlpha = 1;
}

Paper tooth + white margin when baking a sprite:

function finishSprite(spriteCanvas, toothCanvas, unitPx, paper = '#fbf8ef') {
  const w = spriteCanvas.width, h = spriteCanvas.height, c = spriteCanvas.getContext('2d');
  c.save();
  c.globalCompositeOperation = 'destination-out';        // the wax skips the paper valleys
  c.fillStyle = c.createPattern(toothCanvas, 'repeat');
  c.fillRect(0, 0, w, h);
  c.restore();
  const mask = Object.assign(document.createElement('canvas'), { width: w, height: h }), m = mask.getContext('2d');
  m.drawImage(spriteCanvas, 0, 0);
  m.globalCompositeOperation = 'source-in';
  m.fillStyle = paper; m.fillRect(0, 0, w, h);
  const out = Object.assign(document.createElement('canvas'), { width: w, height: h }), o = out.getContext('2d');
  const r = 0.9 * unitPx;                                // 0.9 world units of white margin
  for (let i = 0; i < 12; i++) o.drawImage(mask, Math.cos(i / 12 * 6.283) * r, Math.sin(i / 12 * 6.283) * r);
  o.drawImage(mask, 0, 0);
  o.drawImage(spriteCanvas, 0, 0);
  return out;
}

The boil — three variants, one global beat:

const variants = [0, 1, 2].map((v) => bake(bounds, (ctx) => drawHero(ctx, seededRandom(100 + v * 31))));
function drawFrame(ctx, time) {
  const v = Math.floor(time * 7) % 3;          // same index for every drawing on screen
  ctx.drawImage(variants[v], x - anchorX, y - anchorY);
}

Adapting it to your project

Performance notes

Copy-paste prompt

Use the "Crayon Kids" art style for my project: a child's wax-crayon drawing brought to life.
- Background: bright, slightly toothy white drawing paper #fbf8ef; most of it stays white.
- Colour areas like a child: a light wax layer plus zigzag scribbles whose ends overshoot or stop short of the outline;
  big areas are coloured in short back-and-forth patches with slightly different angles.
- Erase a tileable paper-tooth noise out of every crayon mark so white specks show through the wax.
- Outlines: wobbly black crayon (#2b2a30, ~1 unit wide) drawn in pressure runs; closed loops overshoot their start.
- Naive proportions: big round heads, stick limbs, dot eyes, rosy cheeks; lollipop trees, triangle-roof houses,
  scribbled grass patches, a blue scribble pond with an outline, a brown dirt path, a smiling sun in a corner.
- Crayon-box palette: red #e2362c, orange #f78b1f, yellow #fdce28, green #42ae3a, sky blue #42a8ea, blue #2a5ec8,
  purple #8c4cc4, pink #f67eb4, brown #94582c, black. No gradients, no glow.
- Leave a 0.9-unit paper-white margin around every figure.
- Bake three variants of every drawing and swap them together at 7 fps so the whole picture boils.
- Effects are crayon doodles: spiky pow stars, zigzags, hearts, little stars, motion lines, cloud puffs.
- UI: paper scraps with masking tape, a wooden ruler as a bar, crayon-bordered cards, handwritten fonts
  (Gochi Hand, Patrick Hand, Caveat Brush for rainbow titles).