miwale

Origami Fold — Game Art Style Spec

A world folded from washi paper: flat facets with crisp mountain and valley creases on a giant crease-pattern sheet.

Every character, creature, prop, collectible and icon is a small fold mesh: flat triangular facets with a pseudo height per vertex. One soft light from the upper left gives each facet a flat tone from a 4-step ramp per paper colour (light / base / shade / deep). Shared edges are classified automatically: a mountain fold catches the light as a thin bright line, a valley fold is a thin dark line, an open edge is the deep-toned paper edge. The paper is two-sided like real kami — hems, bellies, inner ears, wing backs and confetti show the cream back of the sheet. The ground is one endless sheet scored with a crease tessellation; pastel sheets lie on top along straight folded hems with short drop shadows, and pleated blue water is sunk below. Soft plum shadows, sheared to the lower right, lift every folded object off the paper.

At a glance

FamilyPaper · Origami
Moodcalm, crafted, gentle, playful, tidy
Best forcozy top-down action and adventure, puzzle and board-game adaptations, children's games, zen / seasonal projects, papercraft menus and maps
RendererCanvas 2D, procedural: 2D fold meshes with z heights → flat tone per facet → automatic crease lines → baked sprites
Pixel artNo — native resolution, sprites baked at 3–8 px per world unit
Complexity5/10 — shading and creases are automatic; designing folds that read as origami is the craft
FontsZen Maru Gothic (500/700/900), M PLUS Rounded 1c (500/700/800), Kalam (400/700)
Key colourswashi #f4eee1, coral #e8755b, kami cream #f3e9d6, indigo #4f62a6, teal #35a194, mustard #e6ae42, blush #ee9597, plum #76599b, water #88a8d8

When to use it

Color palette

SwatchHexRole
Washi White#f4eee1Base sheet of the ground (~50 % of the screen), hem #fbf8f0
Sage Sheet#d5e1c0Pale green sheet on the ground
Mustard Sheet#f2dca6Pale yellow sheet
Coral Sheet#f3cebePale coral sheet
Teal Sheet#c3dfd6Pale teal sheet
Water#88a8d8Sunken water; pleats lit #a9c3ea, shaded #6d8cc6
Coral#e8755bMain character fur, roofs — ramp #f7a283 #e8755b #c95b47 #9b4136
Kami Cream#f3e9d6The back of every sheet — ramp #fffbf3 #f3e9d6 #dccbae #b5a083
Indigo#4f62a6Kimono, doors, diagram ink — ramp #7488c9 #4f62a6 #3b4a87 #283462
Teal#35a194Small creature, orbiting star — ramp #63c2b3 #35a194 #277f76 #1a5b56
Sage#98b37dSmall creature, stems, grass — ramp #bdd39b #98b37d #779562 #587149
Mustard#e6ae42Sash, mane, small collectible — ramp #f8d372 #e6ae42 #c68c2d #936624
Blush#ee9597Paper crane, tulips, lotus — ramp #f9c0bd #ee9597 #cd7279 #9d525c
Plum#76599bLarge creature — ramp #9a7fbb #76599b #5a447c #3f3059
Pine#60a077Pine tiers — ramp #88c197 #60a077 #46805c #305d44
Wood#b0875eTrunks, sticks — ramp #d4ae83 #b0875e #8b6543 #63472f
Stone#cac3baBoulders — ramp #e6e1da #cac3ba #a8a098 #7f7873
Paw Ink#3d3747Main character's legs — ramp #5a5368 #3d3747 #2e2936 #201c27
Ink#2a2433Eyes, noses; mixed into paper edges
Shadow Plum#4e3848Cast shadows at alpha 0.24–0.32
HUD Ink#3d3852HUD text; titles #3b4a87, captions #c95b47

Derived line colours per ramp: paper edge = deep tone mixed 38 % toward #2a2433; mountain highlight = light tone mixed 55 % toward white; valley line = deep tone mixed 15 % toward ink.

Rules

Typography

Zen Maru Gothic — 500, 700, 900 — titles, counters, card titles, floating numbers. https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&display=swap

.counter { font: 900 32px/1.05 'Zen Maru Gothic', sans-serif; letter-spacing: .05em; color: #3b4a87; text-shadow: 2px 2px 0 rgba(255,251,243,.9); }
.ribbon-title { font: 900 54px/1 'Zen Maru Gothic', sans-serif; letter-spacing: .06em; color: #fffbf3; text-shadow: 2px 3px 0 rgba(120,40,30,.35); }

M PLUS Rounded 1c — 500, 700, 800 — body copy, descriptions, caption bar. https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;700;800&display=swap

.desc { font: 700 15px/1.3 'M PLUS Rounded 1c', sans-serif; color: #7a6c74; }

Kalam — 400, 700 — handwritten notes on the paper: labels, hints, families, like pencil marks. https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&display=swap

.note { font: 700 15px/1.1 'Kalam', cursive; color: #c95b47; }

Canvas numbers: 900 8.5u "Zen Maru Gothic" (emphasised 12 units) in indigo #3b4a87 with a 0.32×size cream #fffbf3 border; emphasised values in deep coral #9b4136 on a folded mustard tag (upper half #f8d372, lower half #e6ae42, cream crease line, plum shadow offset). No all-caps; slight positive letter-spacing on titles.

Rendering technique

The fold mesh. A model is a list of triangles in screen space (x right, y down, units = world units) with a z height per vertex. Points are de-duplicated (rounded to 1/64 unit), so faces that share two points share an edge.

  1. Normal & tone. For each face, n = cross(b−a, c−a), flipped to face the viewer (nz ≥ 0). d = n·L with L = normalize(−0.55, −0.45, 0.7). Tone = d > 0.8 → light, > 0.55 → base, > 0.3 → shade, else deep. A flat face (d ≈ 0.70) is the base tone; tilting toward the upper left lightens, toward the lower right darkens. An optional tone offset (+1) pushes far legs and far wings back.
  2. Fill. Faces are drawn in authoring order (back to front) and stroked in their own colour at 0.9 px to hide anti-aliasing seams.
  3. Edges. Each edge is drawn once, when the later of its two faces is drawn:
    • open edge (one face): paper edge, deep tone toward ink, 0.55 units;
    • shared edge: take the far vertex of the earlier face and its signed distance to the later face's plane, divided by its distance from the edge. Below −0.025 → mountain (light-tone highlight, alpha 0.9, 0.3 units); above +0.025 → valley (deep line, alpha 0.6); flat → nothing (same colour) or a soft seam (alpha 0.45, different colours).
  4. Details. Ink dot eyes (0.75–0.85 units, white catch-light) and noses on top.
  5. Paper fibre. A tileable 160 px fibre canvas is laid over the sprite with source-atop at 0.55.

Baking. Everything is baked once at K = clamp(round(screenHeight/360·1.6), 3, 8) px per unit into sprites anchored at the feet. The left-facing version is rebuilt from mirrored geometry (x → −x, then re-lit) — never flipped — so the light stays in the upper left. Each sprite also gets a baked shadow sprite.

Per frame. Ground chunks (cached) → shadows of all y-sorted objects → props/creatures/main character sorted by y → orbiting objects → projectiles → particles → numbers → ambient butterflies → screen light overlay. Native resolution, smoothing on.

World and ground

Characters

All models face +x; feet at (0, 0); y up is negative. Built from three primitives: kite (two triangles folded along an axis A–B, side corners P, Q), folded strip (legs, necks, tails; centre crease raised by z) and fan (triangles around one raised point — heads, bodies, crowns).

Main character — the folded fox (~26 × 36 units including ears and tail):

Small creature — jumping frog (~18 × 14): a diamond body with an X of folds around a raised centre (0.2, −6.6, z 3.6) — the two upper facets in the creature colour, the two lower ones cream (belly); a big folded back thigh (+1 tone), a small front leg, two little pyramid eyes with ink pupils. Variants teal, sage, mustard. Frames: sit, crouch (body 1.4 lower), leap (legs extended 4 units).

Fast creature — paper crane (~26 × 21, hovering 8 units up): diamond body fan, tail strip to (−12.6, −17.4), neck strip to (9.4, −19.8) with a downward beak, far wing (+1 tone) and near wing as kites. Wing raise u ∈ {1, 0.45, −0.35, 0.45}; when u < 0.1 the wings show their cream backs. Blush.

Large creature — folded boar (~46 × 40): a plum body fan of 8 points around a raised flank point (−3, −21, z 6), a cream belly band, a 6-point head fan with a blush snout tip, a cream tusk, a mustard eye with an ink pupil, a plum ear with a cream inside, six mustard spike kites along the spine and four strip legs with mustard hooves (far pair +1 tone).

States: hit = cream #fffaf0 silhouette at alpha min(0.85, flash·1.2) plus a 16 % squash; appear = a flat four-facet square of the creature's colour rotating 1.6 rad and shrinking while the creature unfolds upward (outBack on y-scale after 25 %); the crane drops in from 30 units while fading in; vanish (0.35 s) = flatten (y-scale → 0.15, x → 1.35) and fade with a fading cream flash. Hurt main character = cream flash + squash + wobble; blinking at 16 Hz during invulnerability.

Props

Effects and particles

Atmosphere and lighting

UI

The HUD is folded paper — no rounded corners, hard offset shadows rgba(82,60,72,.15), 1 px edges rgba(120,96,80,.24).

.bar { position: relative; width: 250px; height: 26px; background: linear-gradient(180deg, #fffaf1 0 50%, #e9ddc7 50% 100%);
  box-shadow: 0 0 0 1px rgba(120,96,80,.26), 3px 4px 0 rgba(82,60,72,.16); overflow: hidden; }
.bar-fill { height: 100%; box-shadow: 1px 0 0 #9b4136;
  background: linear-gradient(180deg, rgba(255,255,255,.2) 0 50%, rgba(90,24,14,.13) 50% 100%), repeating-linear-gradient(62deg, #ee8063 0 15px, #df6c52 15px 30px); }
.card { position: relative; isolation: isolate; width: 232px; min-height: 300px; background: linear-gradient(180deg, #fffaf1, #f5ecdb);
  box-shadow: 0 0 0 1px rgba(120,96,80,.24), 6px 8px 0 rgba(82,60,72,.16); transform: rotate(-1.5deg); }
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 118px; z-index: -1;
  background: linear-gradient(90deg, #f29074 0 50%, #e2735a 50% 100%); clip-path: polygon(0 0, 100% 0, 50% 100%); }

Motion and animation

Do and don't

Do

Don't

Implementation recipe

  1. Define the ramps (4 hex values per paper colour) and derive the three line colours per ramp.
  2. Write the fold mesh: de-duplicated points with z, tri, quad, kite, strip, fan, dot, an optional transform (at(x, y, scale, rot)).
  3. Write renderFold: normals → tones → fill + seam stroke → edges classified as open / mountain / valley / seam → dots.
  4. Write bake(box, fn, mirror) at K px per unit with fibre on top, and castShadow(sprite, shx, shy, alpha, contact) with a blur filter.
  5. Author the main character facing +x as a function of a pose object; bake idle + walk frames + dash for both directions; same for each creature.
  6. Ground per chunk: classify the four triangles of every 40-unit cell, colour with the panel's relief pattern, draw layers with offset shadows and hems, clip water and draw chevron pleats, then crease lines, diagram lines, fibre, sparse decals. Use a generator and cache the region per triangle.
  7. Props: bake each variant (and mirrored copies) with shadows; place them per region on a jittered 60-unit grid, keeping land props off the water and boats/lotus fully on it.
  8. Effects: bake planes at 16 angles, shuriken and stars as rotation frames; draw petals, confetti, strips and sheets as tiny two-tone paths per frame.
  9. Add the screen light overlay and the butterflies; skin the HUD with the paper CSS.

Code

Fold mesh primitives

function Fold() { this.v = []; this.f = []; this.idx = new Map(); }
Fold.prototype.pt = function ([x, y, z = 0]) {            // shared points -> shared edges
  const k = Math.round(x * 64) + ',' + Math.round(y * 64) + ',' + Math.round(z * 64);
  let i = this.idx.get(k);
  if (i === undefined) { i = this.v.length / 3; this.v.push(x, y, z); this.idx.set(k, i); }
  return i;
};
Fold.prototype.tri = function (a, b, c, key, off = 0) { this.f.push({ a: this.pt(a), b: this.pt(b), c: this.pt(c), key, off }); return this; };
Fold.prototype.kite = function (A, B, P, Q, key) { return this.tri(A, P, B, key).tri(A, B, Q, key); };  // folded along A-B
Fold.prototype.strip = function (p0, p1, w0, w1, z, key) {                                             // leg / neck / tail
  const dx = p1[0] - p0[0], dy = p1[1] - p0[1], l = Math.hypot(dx, dy) || 1, nx = -dy / l, ny = dx / l;
  const L0 = [p0[0] + nx * w0 / 2, p0[1] + ny * w0 / 2], R0 = [p0[0] - nx * w0 / 2, p0[1] - ny * w0 / 2];
  const L1 = [p1[0] + nx * w1 / 2, p1[1] + ny * w1 / 2], R1 = [p1[0] - nx * w1 / 2, p1[1] - ny * w1 / 2];
  const C0 = [p0[0], p0[1], z], C1 = [p1[0], p1[1], z];
  return this.tri(L0, C0, C1, key).tri(L0, C1, L1, key).tri(C0, R0, R1, key).tri(C0, R1, C1, key);
};

Tones and automatic creases

const L = normalize([-0.55, -0.45, 0.7]);                 // light from the upper left
const toneOf = (n) => { const d = n[0] * L[0] + n[1] * L[1] + n[2] * L[2]; return d > 0.8 ? 0 : d > 0.55 ? 1 : d > 0.3 ? 2 : 3; };
// for a shared edge p-q between face i (drawn now) and face j (drawn earlier), d = far vertex of face j:
function creaseKind(nI, P, D) {
  const s = (nI[0] * (D[0] - P[0]) + nI[1] * (D[1] - P[1]) + nI[2] * (D[2] - P[2])) / (Math.hypot(D[0] - P[0], D[1] - P[1]) + 1e-6);
  return Math.abs(s) < 0.025 ? 'flat' : s < 0 ? 'mountain' : 'valley';
}
// mountain: stroke ramp.light mixed 55 % with white, alpha .9, 0.3 units
// valley:   stroke ramp.deep  mixed 15 % with ink,   alpha .6, 0.3 units
// open edge (no neighbour): ramp.deep mixed 38 % with ink, 0.55 units

Sheared soft cast shadow

function castShadow(s, shx = 0.62, shy = -0.36, alpha = 0.3, K = 4) {  // s = { c: canvas, ox, oy } anchored at the feet
  const pad = Math.ceil(K * 3), W = Math.ceil(s.c.width + shx * s.oy) + pad * 2, H = Math.ceil(-shy * s.c.height) + pad * 2 + K * 4;
  const out = Object.assign(document.createElement('canvas'), { width: W, height: H }), g = out.getContext('2d');
  const sil = Object.assign(document.createElement('canvas'), { width: s.c.width, height: s.c.height }), q = sil.getContext('2d');
  q.drawImage(s.c, 0, 0); q.globalCompositeOperation = 'source-in'; q.fillStyle = 'rgb(78,56,72)'; q.fillRect(0, 0, sil.width, sil.height);
  const ax = s.ox + pad, ay = pad + K * 2;
  g.filter = `blur(${(K * 1.1).toFixed(1)}px)`; g.globalAlpha = alpha;
  g.setTransform(1, 0, -shx, shy, ax - s.ox + shx * s.oy, ay - shy * s.oy);   // x' = x - shx*y, y' = shy*y around the feet
  g.drawImage(sil, 0, 0);
  return { c: out, ox: ax, oy: ay };
}

Folded-wave water (chevron pleats)

function waves(ctx, x0, x1, y0, y1, hash) {
  const PW = 18, PH = 11, A = 3.4;
  const row = (r, dy) => { const off = hash(r) * PW, pts = []; for (let x = Math.floor((x0 + off) / (PW / 2)) * (PW / 2) - off; x <= x1 + PW; x += PW / 2) pts.push([x, r * PH + dy + (Math.round((x + off) / (PW / 2)) & 1 ? A : 0)]); return pts; };
  const band = (a, b, col) => { ctx.fillStyle = col; ctx.beginPath(); a.forEach((p) => ctx.lineTo(...p)); b.slice().reverse().forEach((p) => ctx.lineTo(...p)); ctx.fill(); };
  for (let r = Math.floor(y0 / PH) - 1; r <= y1 / PH + 1; r++) {
    const top = row(r, 0), mid = row(r, PH * 0.45), bot = row(r + 1, 0);
    band(top, mid, '#6d8cc6'); band(mid, bot, '#a9c3ea');                       // shaded slope, lit slope
    ctx.strokeStyle = 'rgba(44,64,122,.32)'; ctx.lineWidth = 0.45; ctx.beginPath(); mid.forEach((p) => ctx.lineTo(...p)); ctx.stroke();
    ctx.strokeStyle = 'rgba(255,255,255,.7)'; ctx.lineWidth = 0.55; ctx.beginPath(); top.forEach((p) => ctx.lineTo(...p)); ctx.stroke();
  }
}

Two-sided confetti

function confetti(ctx, x, y, size, rot, t, seed, ramp, cream) {
  const flip = Math.cos(t * 9 + seed * 30), f = Math.abs(flip) < 0.15 ? 0.15 : flip;
  const co = Math.cos(rot) * size, si = Math.sin(rot) * size;
  ctx.save(); ctx.transform(co, si, -si * f, co * f, x, y);
  ctx.fillStyle = flip > 0 ? ramp[flip > 0.6 ? 0 : 1] : cream[flip < -0.6 ? 0 : 2];  // colour front, cream back
  ctx.beginPath(); ctx.moveTo(0, -1); ctx.lineTo(0.95, 0.7); ctx.lineTo(-0.95, 0.7); ctx.closePath(); ctx.fill();
  ctx.restore();
}

Adapting it to your project

Performance notes

Copy-paste prompt

Use the Origami Fold art style for my project:
- Canvas 2D, no image assets. Everything is a "fold mesh": triangles in screen space with a z height per vertex,
  shared points de-duplicated so faces share edges. Bake meshes once into sprites (K px per world unit, 360 units = screen height).
- One light from the upper left, L = normalize(-0.55,-0.45,0.7). Facet tone from d = n·L: >.8 light, >.55 base, >.3 shade, else deep,
  using 4-step ramps: coral #f7a283/#e8755b/#c95b47/#9b4136, indigo #7488c9/#4f62a6/#3b4a87/#283462, teal #63c2b3/#35a194/#277f76/#1a5b56,
  mustard #f8d372/#e6ae42/#c68c2d/#936624, blush #f9c0bd/#ee9597/#cd7279/#9d525c, cream back side #fffbf3/#f3e9d6/#dccbae/#b5a083.
- Shared edges: mountain fold = thin bright line (light tone + 55 % white), valley fold = thin dark line; open edges = deep-tone paper edge.
- Paper is two-sided: hems, bellies, inner ears, wing backs and confetti show the cream back.
- Mirror by rebuilding geometry (x -> -x) and re-lighting, never by flipping the image.
- Main character: a coral origami fox in an indigo kimono with a mustard sash, cream hem, dark paws, kite ears and a kite tail (~26x36 units).
  Creatures: teal/sage/mustard jumping frogs, blush paper cranes hovering 8 units up, a plum folded boar with a mustard spiked mane.
- Ground: a washi sheet #f4eee1 with a 40-unit crease tessellation (squares + diagonals, faint pyramid relief), pastel sheets
  (#d5e1c0 #f2dca6 #f3cebe #c3dfd6) laid on top along crease lines with cream hems and offset drop shadows, sunken water #88a8d8 as chevron pleats,
  major folds every 160 units in diagram notation (dashed valley, dash-dot mountain).
- Shadows: silhouette tinted rgb(78,56,72), sheared to the lower right, blurred, alpha ~0.3. Paper fibre texture on everything.
- Effects: paper-plane projectiles, two-tone shuriken, lucky stars, unfolding petal bursts, tumbling sheets, two-sided confetti.
- UI: folded paper strips with pleated fills, envelope panels with flaps, dog-eared tabs, envelope cards that unfold; fonts Zen Maru Gothic 900,
  M PLUS Rounded 1c, Kalam for handwritten notes.