miwale

Ukiyo-e Woodblock — Game Art Style Spec

An Edo-period colour woodblock print in motion: bokashi colour blocks printed off-register, carved sumi key lines, washi fibres, seigaiha water.

Everything looks like a Hokusai or Hiroshige print that has started to move. Every shape is printed from blocks, exactly like a real woodblock print: a kinari paper underlay, flat colour blocks with bokashi gradients laid slightly off-register, and one sumi key block whose lines swell and thin like a carved line and grow heavier towards the lower right. Washi fibres show through every colour. The ground is a pale cream meadow with sage and ochre washes, moss and susuki fields, earth paths and Prussian-blue water with shore contour lines and seigaiha fans, crossed by stepped kasumi mist bands. The screen itself is framed like a print: an ichimonji-bokashi band along the top, a paper margin with a key-line border, a signature cartouche and a red hanko seal. The module's cast – a wandering traveller in a wide straw hat, kappa water imps, haunted paper lanterns and a club-carrying oni – shows how to apply it.

At a glance

FamilyPrint · Woodblock
Moodserene, folkloric, elegant, playful, seasonal
Best forfolklore top-down action and adventure, calm travel games, Japanese-inspired RPGs and card games, story maps
RendererCanvas 2D, procedural, no image assets
Pixel artNo – native resolution, sprites baked at 3–7 px per world unit
Complexity6/10 – parts are quick to block out, but each needs a good split into colour blocks, bokashi and line weights
FontsZen Antique, Shippori Mincho, Yuji Syuku
Key colourspaper #f2e8d2, sumi #1e1b19, Prussian #24527e, vermilion #cf4a2c, indigo #2d4a72, straw #d8b264

When to use it

Good fits:

Bad fits:

Color palette

SwatchHexRole
Kinari paper#f2e8d2Paper underlay of every part, panels; page margin #efe4cb
Unprinted paper#fbf5e6Flash state, eyes, petals, foam – the brightest tone
Sumi#1e1b19Key block: outlines, solid hair, text, borders
Meadow cream#eee4c7Main ground wash (~50 % of the screen)
Meadow sage#c7cf98Large soft bokashi patches in the meadow
Meadow ochre#e6cf96Warm bokashi patches in the meadow
Moss#96aa74Moss regions (edge #688558)
Susuki field#dec48aDry grass field (edge #c29650)
Earth path#e7d4a8Paths (edge #c2a372)
Shallow water#a8c5c9Water at the shore
Prussian blue#24527eWater, ichimonji band, top bar, off-register text shadows
Prussian deep#1e456eDeepest water
Indigo#2d4a72Kimono (light #5a7aa0, deep #1c3150)
Vermilion#cf4a2cSashes, torii, oni skin, crest rims, hurt tint (light #e7845a, deep #9e321e)
Seal red#c8402aHanko seals and red slips in the HUD
Straw ochre#d8b264Straw hat, sandals, tiger skin (light #eed79c, deep #a9813d)
Pine green#3d5a45Pine pads, bamboo leaves (light #748f61, deep #2a4031)
Kappa green#5f9466Small creature (variants teal #4b8a86, olive #7d8f48)
Koban gold#d9a93bCollectibles, metal fittings, sparks (light #f4d77e, deep #a47722)
Sakura pink#f0c3c3Blossom crowns, petals (deep #d58c97)
Stone grey#8d918bLanterns, statues, rocks (light #c3c5b9, deep #5d6a76)
Usuzumi#4b4f58Flat cast shadows at 15–24 % alpha, motion trails

Palette rules:

Typography

FamilyWeightsRoleSample CSS
Zen Antique400Titles, clock, counters, floating numbers, seal numeralsfont: 400 40px/1 'Zen Antique', serif; letter-spacing: 2px; text-shadow: 2px 1.5px 0 rgba(36,82,126,.42);
Shippori Mincho500–800Card names (800), body copy (600), captions (500)font: 800 20px/1.15 'Shippori Mincho', 'Yu Mincho', Georgia, serif;
Yuji Syuku400Brush-hand labels, vertical red slips, hintsfont: 400 19px 'Yuji Syuku', serif; color: #9e321e;

All three are on Google Fonts (Shippori+Mincho:wght@500;600;700;800, Zen+Antique, Yuji+Syuku). The signature trick of the type: every important number has an off-register colour copy – a Prussian-blue or vermilion text shadow offset by about (2, 1.5) px, like a colour block that missed its key line. Short labels can run vertically (writing-mode: vertical-rl) in a red slip. Seals and cartouches never contain legible script – only abstract brush glyphs.

Rendering technique

The whole style is one printing metaphor applied to everything:

  1. Paper underlay – the part's shape filled with kinari paper #f2e8d2, unshifted.
  2. Colour block – the same shape filled with a bokashi gradient, translated by (+0.38, +0.30) world units. This leaves a sliver of paper on the upper-left of every part and lets colour slip slightly past the line on the lower-right.
  3. Key block – the outline drawn as a stamped brush ribbon: circles placed every 0.2 * width along the polyline, all added to one path and filled once in sumi. Width varies along the line with 1 + 0.3 * (0.55 sin(0.85 s) + 0.45 sin(2.3 s)) and with the outward normal: 1 + 0.45 * (n · (0.6, 0.8)), so lower-right edges are heavier. Open lines taper at both ends over max(0.8, 2.4 * width).
  4. Washi fibres – a 160 px tile of curved light and dark fibres composited source-atop over the finished sprite.

Parts are printed back to front, each with its own key line, so a front part cleanly covers the lines behind it. Shapes are Catmull-Rom splines through a handful of control points, sampled to dense polylines that both the fill and the ink stamps use.

Baked at init (K px per world unit, K = clamp(round(display px per unit * 1.6), 3, 7)): every pose of every figure, its flash copy (pixels whose luminance is above ~40–82 become unprinted paper, darker ones stay sumi – only the key block survives), the hurt copy of the main character (colour re-printed in a vermilion ramp), dissolve frames, all props, FX sprites and icons. Per frame: only drawImage, a few ellipse fills and transforms.

Draw order: ground chunks → ink pools → collectibles → shadows → y-sorted props and figures → orbiting crests → projectiles → particles → numbers → drifting petals → print frame (screen space).

World and ground

The ground is a per-pixel shader cached in 256-unit chunks (up to 3 px per unit), built by a generator in 5 ms slices.

Characters

All figures face right when baked, feet at the sprite anchor; left-facing copies are mirrored.

Main character – a wandering traveller (about 25 units wide including the hat, 33 tall):

Small creature – kappa (radius 9, about 20 × 24 units): a round green body (#8fb886 → #3a684a; teal and olive variants), a brown turtle shell on the back with hex lines, a cream belly plate with segment lines, an ochre duck-like beak, one big paper eye with a sumi pupil, a heavy brow, a solid black spiky hair fringe and a pale water dish on top. Four waddle poses.

Fast creature – chochin-obake (radius 7, about 15 × 23 units, floating 5 units up): a barrel-shaped paper lantern with horizontal cylinder shading (#cf9450 edges → #f8ecd2 centre) and a warm ochre glow wash inside, curved sumi ribs, black lacquer rims with vermilion bands and a wire handle, a torn mouth with a long lolling vermilion tongue (four sway frames), one big eye and one squint.

Large creature – oni (radius 17, about 44 × 60 units): a vermilion body (#e5835c → #c9472f → #8c2a1b, radial bokashi; a Prussian-blue variant #76a0c2 → #22446a), a wild black mane, ivory horns, gold eyes under solid black brows, a dark open mouth with ivory fangs, a tiger-skin loincloth (ochre with tapered sumi stripes), gold armlet and anklet, and an upright studded iron club held in front.

Rules:

Props

Printed with the same three passes; mirrored for variety; flat usuzumi shadows at 20 %.

PropSize (units)Notes
Pine (2)~59 × 73Ribbon trunk with bark arcs, branches to 5 flat cloud-like pads (lumpy top, flattened underside), bokashi #748f61 → #2a4031, fan-shaped needle clusters printed inside
Maple (2)~44 × 57Short trunk, 4 lumpy lobes with bokashi (red #ef9558 → #8c2a1a or gold #f3cd68 → #9c6a22), star-shaped leaf prints
Cherry (2)~56 × 58Gnarled dark trunk, 5 pink cloud lobes #fbe4e2 → #dc97a0, five-dot blossoms
Shrine (2)20 × 36 / 12 × 21Stone toro lantern with a glowing window; jizo statue with a vermilion bib and cap
Torii gate60 × 47Vermilion pillars and beams with horizontal bokashi, black bases, a curved black kasagi top beam
Stone (3)up to 34 × 19Lumpy garden rocks, bokashi light upper-left to deep lower-right, short diagonal brush strokes, moss dots
Bamboo34 × 66Five stalks with node ticks, 16 lance leaves
Reeds34 × 26Arching susuki blades with fluffy cream-to-ochre plumes

Rules: bokashi is light at the top and deep at the bottom; foliage blocks carry pattern prints clipped inside the block; trees, bamboo and reeds sway by skewing around the base (0.018–0.05 rad at 1.2 rad/s); placement follows the terrain (pines everywhere, cherries and shrines on the meadow, maples and bamboo on moss, reeds on the field, shrines and gates along paths, only stones in water).

Effects and particles

Atmosphere and lighting

There is no light model – everything is printed.

UI

The HUD is a set of paper slips and seals:

.panel { background: repeating-linear-gradient(17deg, rgba(120,96,60,.05) 0 1px, transparent 1px 7px), #f4ead4;
  border: 2.5px solid #1e1b19; box-shadow: inset 0 0 0 3px #f4ead4, inset 0 0 0 4.5px #1e1b19, 0 8px 16px rgba(30,27,25,.3); }
.bar > .fill { background: linear-gradient(180deg, #8e2a1a 0%, #cf4a2c 45%, #e8906a 100%); }
.seal { background: #c8402a; box-shadow: inset 0 0 0 2px #c8402a, inset 0 0 0 3.2px rgba(247,238,219,.9); transform: rotate(-5deg); }

Motion and animation

Do and don't

Do:

Don't:

Implementation recipe

  1. Write the toolkit: spline() (Catmull-Rom → polyline), ell(), capsule(), ink() (stamped ribbon) and part() (underlay + shifted bokashi block + ink).
  2. Bake a 160 px fibre tile; apply it source-atop at the end of every bake.
  3. Draw each figure back to front with part(); use filled sumi for hair and lacquer; add interior lines with open ink() calls.
  4. Bake every pose at K px per unit, mirror for the other facing, derive flash / hurt / dissolve copies by remapping pixels by luminance.
  5. Ground: sample region fields on a 4-unit grid, convert to distances f / |∇f|, then per pixel pick colours by depth (bokashi), draw key lines where |d| < half width, sample colour off-register, add seigaiha and contour lines in water, multiply fibres.
  6. Bake decals on top, then kasumi bands (stroke the union, then fill).
  7. Per frame: shadows, y-sorted drawImage, particles from baked FX sprites, then the cached print frame.
  8. Skin the HUD with double-rule paper panels, bokashi bar fills, red slips and seals.

Code

The stamped key line – the heart of the look:

function ink(ctx, pts, w, closed) {
  let area = 0;
  for (let i = 0; i < pts.length; i++) { const p = pts[i], q = pts[(i + 1) % pts.length]; area += p[0] * q[1] - q[0] * p[1]; }
  const sg = area >= 0 ? 1 : -1, segs = closed ? pts.length : pts.length - 1, step = w * 0.2;
  let total = 0;
  for (let i = 0; i < segs; i++) { const p = pts[i], q = pts[(i + 1) % pts.length]; total += Math.hypot(q[0] - p[0], q[1] - p[1]); }
  ctx.beginPath();
  let s = 0, next = 0;
  for (let i = 0; i < segs; i++) {
    const p = pts[i], q = pts[(i + 1) % pts.length], L = Math.hypot(q[0] - p[0], q[1] - p[1]);
    if (!L) continue;
    const tx = (q[0] - p[0]) / L, ty = (q[1] - p[1]) / L;
    const shade = closed ? sg * ty * 0.6 - sg * tx * 0.8 : 0;          // outward normal · lower-right
    for (; next <= s + L; next += step) {
      const x = p[0] + tx * (next - s), y = p[1] + ty * (next - s);
      let k = (1 + 0.3 * (0.55 * Math.sin(next * 0.85) + 0.45 * Math.sin(next * 2.3))) * (1 + 0.45 * shade);
      if (!closed) k *= Math.min(1, 0.2 + 0.8 * Math.min(next, total - next) / (w * 2.4));
      const r = Math.max(0.04, w * k / 2);
      ctx.moveTo(x + r, y); ctx.arc(x, y, r, 0, Math.PI * 2);
    }
    s += L;
  }
  ctx.fillStyle = '#1e1b19';
  ctx.fill();
}

One printed part – paper underlay, off-register bokashi block, key line:

function part(ctx, pts, light, deep, y0, y1, lineW) {
  const path = (c) => { c.beginPath(); c.moveTo(pts[0][0], pts[0][1]); for (const p of pts) c.lineTo(p[0], p[1]); c.closePath(); };
  path(ctx); ctx.fillStyle = '#f2e8d2'; ctx.fill();                  // paper underlay
  ctx.save(); ctx.translate(0.38, 0.30);                              // misregistration
  const g = ctx.createLinearGradient(0, y0, 0, y1);
  g.addColorStop(0, light); g.addColorStop(1, deep);                  // one bokashi per block
  path(ctx); ctx.fillStyle = g; ctx.fill();
  ctx.restore();
  ink(ctx, pts, lineW || 0.95, true);                                 // key block
}

Hit flash derived from the baked sprite – only the key block stays:

function flashCopy(src) {
  const c = document.createElement('canvas'); c.width = src.width; c.height = src.height;
  const x = c.getContext('2d'); x.drawImage(src, 0, 0);
  const img = x.getImageData(0, 0, c.width, c.height), d = img.data;
  for (let i = 0; i < d.length; i += 4) {
    if (!d[i + 3]) continue;
    const l = d[i] * 0.3 + d[i + 1] * 0.59 + d[i + 2] * 0.11;
    const t = Math.min(1, Math.max(0, (l - 40) / 42));              // 0 = ink, 1 = colour block
    d[i] = 30 + (251 - 30) * t; d[i + 1] = 27 + (245 - 27) * t; d[i + 2] = 25 + (230 - 25) * t;
  }
  x.putImageData(img, 0, 0);
  return c;
}

Seigaiha in a pixel shader – distance to the centre of the fan that covers a point:

function seigaiha(x, y, R) {                 // fans of radius R, rows R/2 apart, odd rows shifted by R
  const H = R / 2;
  let j = Math.floor((y + R) / H);
  for (let k = 0; k < 6; k++, j--) {         // lowest row first: lower rows cover upper ones
    const yc = j * H, xs = j & 1 ? R : 0;
    const cx = xs + Math.round((x - xs) / (2 * R)) * 2 * R;
    const d = Math.hypot(x - cx, y - yc);
    if (d < R) return d;                     // ring line where d is near a multiple of R / 4
  }
  return R;
}

Adapting it to your project

Performance notes

Copy-paste prompt

Use the Ukiyo-e Woodblock art style for my project: an Edo-period colour woodblock print in motion
(Hokusai / Hiroshige feel), drawn procedurally with Canvas 2D, no image assets.
- Print every shape in three passes: kinari paper underlay #f2e8d2, a flat colour block with ONE bokashi
  gradient shifted off-register by (+0.38, +0.30) units, then a sumi #1e1b19 key line.
- Key lines are stamped brush ribbons (circles along the outline in one path): silhouette 0.95-1.35 units,
  interior 0.25-0.6, swelling +-30 % along the line and heavier on the lower-right; open lines taper.
- Washi fibres show through every sprite (fibre tile drawn source-atop); no pure black or white.
- Palette: indigo #2d4a72, vermilion #cf4a2c, straw ochre #d8b264, Prussian blue #24527e, pine #3d5a45,
  sakura #f0c3c3, gold #d9a93b, ground cream #eee4c7 / sage #c7cf98 / ochre #e6cf96.
- Ground: pale meadow with soft bokashi patches, moss and dry-grass regions with tinted key lines,
  water with depth bokashi, paper contour lines along the shore and seigaiha fans in the deep, Hiroshige
  grass ticks and stepped kasumi mist bands.
- Motifs: wide straw hats, kasuri crosses, pines with flat needle pads, maples, cherry blossom, torii,
  stone lanterns, mitsudomoe crests, gold koban, ink splashes, kumo smoke curls, ensō rings, falling petals.
- Frame the screen like a print: Prussian ichimonji-bokashi band at the top, paper margin, key-line border,
  signature cartouche with abstract brush marks and a red seal.
- UI: paper slips with double sumi rules, bokashi bar fills, vertical red slips, hanko seals; fonts
  Zen Antique (numbers, titles), Shippori Mincho (body), Yuji Syuku (labels).
- Flat usuzumi shadow ellipses only; no glows, blur or rendered light.