miwale

Bouncy Cartoon — Game Art Style Spec

Candy-bright HD vector cartoon: thick deep-plum outlines, one cel-shade crescent, one white gloss and bouncy squash & stretch.

A clean, high-resolution vector cartoon. Every object is a chunky, rounded silhouette with one thick deep-plum outline (#3a2240), a flat fill, exactly one darker cel-shade crescent and one white glossy highlight. Characters are big-headed, round and expressive (angry brows, googly eyes, carved grins) and bounce constantly with squash and stretch. The ground is a flat pastel play-mat of soft grass, lilac and sand regions with crisp edges and tiny vector tufts and flowers, so the outlined figures pop clearly even when several hundred of them crowd the screen. The examples below are a pumpkin-headed main character, small purple-and-cream root-bulb creatures, floating white ghosts and a large root giant.

At a glance

FamilyVector · Cartoon
Moodcheerful, bouncy, toy-like, punchy, friendly
Best fortop-down arena shooters, crowded top-down action, casual mobile action, party games, kid-friendly adventures
RendererCanvas 2D, fully procedural (no image assets), sprites baked once into offscreen canvases
Pixel artNo – native resolution, sprites baked at 3–6 px per world unit
Complexity3/10
FontsLilita One (numbers, titles), Fredoka 400–700 (labels, body)
Key colours#3a2240 plum outline · #9ec671 meadow · #ff952b pumpkin · #2f9c95 teal · #9b5cd0 purple · #f6f8ff ghost · #ffd43f glow · #fff4de panel

When to use it

Color palette

SwatchHexRole
Plum Outline#3a2240The only ink colour: silhouettes, pupils, brows, mouths, HUD borders, text outlines
Meadow#9ec671Base ground (~55% of the screen)
Deep Grass#79ae5aDark grass patches (rim #6a9e50)
Lilac Meadow#c8b6daFlower-meadow regions (rim #b4a0cc)
Sand Path#ebd3a0Paths and clearings (rim #d8ba85)
Clay Field#daa070Autumn/rust regions (rim #c78a60)
Pumpkin#ff952bMain character head; shade #ea681c, rib lines #ec7a22
Candle Glow#ffd43fCarved eyes/mouth, stars, highlighted numbers; hot core #fff3b0, carve rim #8a3214
Teal Coat#2f9c95Main character body; shade #22736f
Leaf / Scarf#86cf4c / #8ad04cLeaves and scarf; shades #59a33a / #5ea83a, scarf stripes #c3ec8c
Legs / Shoes#41703f / #6b3d2cShades #2f5431 / #4c291f
Bulb Purple#9b5cd0Small creature top (variants #bd5aa6, #7d66d8); shade #7241aa
Bulb Cream#f8eacbSmall creature bottom; shade #e0c595
Root Beige#efd49eCreature limbs and large-creature arms; shade #cfac70
Ghost White#f6f8ffFloating ghost creature; shade #c3d0ef, tongue #ff7f9e, catchlight #9fd8ff
Giant#7b3f99 / #efc96fLarge creature top / bottom; shades #58297a / #cf9f4c, bandages #f6e6c4
Gem Green / Blue#74e690 / #62c8ffGem collectibles (small / large); facets #2fae66 / #2f83e0
Berry Red#ef5a52Berries, mushroom caps
Panel Cream#fff4deHUD panels and cards
Bar Trough#563a5eBar background
Shadowrgba(50,30,72,0.2)Ground shadows (plum at 20%)

Palette rules

Typography

Lilita One (400) – floating numbers, clock, counters, titles, card names. Google Fonts: https://fonts.googleapis.com/css2?family=Lilita+One&display=swap

Fredoka (400, 500, 600, 700) – labels, descriptions, hints. Google Fonts: https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap

Text effects:

/* tso(2.5, '#3a2240', 2) – shortened to 8 directions here */
.clock-time { font: 400 36px/1.1 'Lilita One', 'Fredoka', sans-serif; letter-spacing: 1.5px; color: #ff8a2a;
  text-shadow: 2.5px 0 0 #3a2240, -2.5px 0 0 #3a2240, 0 2.5px 0 #3a2240, 0 -2.5px 0 #3a2240,
    1.8px 1.8px 0 #3a2240, -1.8px 1.8px 0 #3a2240, 1.8px -1.8px 0 #3a2240, -1.8px -1.8px 0 #3a2240, 0 5px 0 #3a2240; }
.clock-label { font: 600 12px 'Fredoka', sans-serif; letter-spacing: 1.6px; color: #8a6280; }
.big-title { font: 400 78px 'Lilita One', sans-serif; letter-spacing: 3px; color: #ffd43f; transform: rotate(-3deg); }

Rendering technique

Shared by every element (characters, props, effects, icons):

  1. Choose sprite resolution. K = clamp(round(screenPxPerUnit * 1.25), 3, 6) canvas px per world unit, where screenPxPerUnit = displayHeight / 360.
  2. Describe every sprite as a part list fn(P) declared back-to-front: P.part(shapeFn, fill, { shade, sh:[dx,dy], inner, detail, hi, hi2, ol }) plus P.detail(fn) for faces and strokes.
  3. Bake each sprite in two passes into its own canvas (ctx.scale(K,K), round joins/caps):
    • Outline pass: every part is stroked and filled in #3a2240 with lineWidth = 2 * 1.15 u. Because all parts are filled plum, overlaps merge into one silhouette with one even 1.15 u border.
    • Fill pass: each part clips to its shape, optionally strokes a 0.55 u inner separation line (lineWidth 1.1, only the inner half survives the clip), fills the whole part with the shade colour, then clips again to the same shape translated by sh (e.g. [-1.9, -1.6]) and fills the lit colour. The uncovered sliver bottom-right is the cel crescent. Then detail, then gloss: white ellipse hi at alpha 0.92 plus a white dot hi2.
    • Flash pass (third copy): same, but lit = #ffffff, shade = #efe6f6, no details.
  4. Bake 4 animation frames for each animated figure, a flash copy of each, and mirrored copies (or mirror at blit time with scale(-1,1)).
  5. Per frame: ground chunks (cached images) → ground overlay (dirt holes) → gem collectibles → one batched shadow path → y-sorted props, creatures, main character → orbiting objects → projectiles → particles → floating numbers → world overlay (butterflies) → HTML HUD.
  6. Blit with transforms only: translate(x, y) · rotate(tilt) · scale(sx*facing, sy) around the feet, then drawImage(c, -ox/K, -oy/K, w/K, h/K). All squash/stretch is done here.
  7. Everything is drawn in world units (360 units visible vertically); no pixel snapping needed.

World and ground

The ground is a flat-colour play-mat with no outlines – it stays visually behind every outlined figure and prop.

Characters

All figures use the shared two-pass painter: one plum outline (1.15 u outer, 0.55 u inner lines), one cel crescent at the lower-right, one white gloss at the upper-left, 4 baked frames plus a white flash copy. Heads are big (~60% of the height), bodies and limbs tiny and stubby, and every figure type has its own unmistakable silhouette.

Main character (pumpkin-head kid) – box [-15,-34] .. [15,2.5], drawn at scale 1.1 (≈ 25 u wide, 37 u tall incl. stem), feet at y = 0.

Small creature (grumpy root bulb) – scale 0.9, box [-14,-32]..[14,2.5].

Fast creature (floating ghost) – box [-15,-28]..[14,2.5].

Large creature (root giant) – box [-28,-68]..[29,3], about 2.5× the small creature.

Creating new figures: start from a distinctive silhouette (blob, capsule tower, bean, star), give it a big readable face (googly eyes + brows, or a carved glowing face), a fill/shade pair, 4 frames, a flash copy and its own shadow size. Large figures are 2–2.5× the small ones; a giant centrepiece can be 4×.

Props

Scenery is painted with exactly the same two-pass painter as the characters, so it carries the same plum outline, crescent and gloss. Each prop is baked once (1–5 variants, plus mirrored copies) and stands on its own flat plum shadow.

Effects and particles

All particles are baked sprites from the same painter (outlined, crescented):

Atmosphere and lighting

UI

Chunky toy HUD in HTML/CSS: cream pills and plum troughs, 4 px plum borders, big radii and a solid 4–5 px plum drop (box-shadow: 0 5px 0) instead of blurred shadows. Bars get a 3-stop vertical gradient and a white gloss strip. Counters use Lilita One with the sticker outline, labels Fredoka 600 in muted mauve #8a6280. Icons are drawn with the same part painter on a 48 px grid with a 2.6 px outline (heart, root bulb, lightning, pot, basket...). Choice cards have a coloured header band (orange, mint, violet) and pop in with overshoot easing.

.hud-panel { background: #fff4de; border: 4px solid #3a2240; border-radius: 20px;
  box-shadow: 0 5px 0 #3a2240; padding: 2px 24px 7px; color: #3a2240;
  font-family: 'Fredoka', 'Baloo 2', system-ui, sans-serif; }
.bar { position: relative; height: 32px; background: #563a5e; border: 4px solid #3a2240;
  border-radius: 17px; box-shadow: 0 4px 0 #3a2240, inset 0 4px 0 rgba(0,0,0,.25); overflow: hidden; }
.bar-fill { position: relative; height: 100%; border-radius: 0 13px 13px 0;
  background: linear-gradient(180deg, #ff9a9a 0%, #ff5466 48%, #df3550 100%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.bar-fill::after { content: ''; position: absolute; left: 9px; right: 12px; top: 4px; height: 5px;
  border-radius: 3px; background: rgba(255,255,255,.55); }
.bar.alt { height: 26px; border-radius: 15px; }
.bar.alt .bar-fill { background: linear-gradient(180deg, #9af7d8 0%, #45d6ad 50%, #2cb892 100%); }
.card { width: 236px; min-height: 304px; color: #3a2240; border: 5px solid #3a2240; border-radius: 28px;
  background: linear-gradient(180deg, #ffd27f 0, #ffb24c 92px, #fff6e4 92px);
  box-shadow: 0 9px 0 #3a2240, 0 18px 30px rgba(20,8,30,.35);
  transition: transform .14s cubic-bezier(.3,1.6,.5,1); }
.card:nth-child(2) { background: linear-gradient(180deg, #9af0d6 0, #45d0aa 92px, #fff6e4 92px); }
.card:nth-child(3) { background: linear-gradient(180deg, #d4b6ff 0, #a982ea 92px, #fff6e4 92px); }
.card:hover { transform: translateY(-10px) rotate(-1.5deg) scale(1.03); }
.card-icon { width: 124px; height: 124px; border: 5px solid #3a2240; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffffff, #fff1d2 65%, #ffe2a8); box-shadow: 0 5px 0 #3a2240; }
@keyframes pop { from { transform: scale(.2) rotate(-14deg); } to { transform: scale(1) rotate(-3deg); } }

When the red bar drops, its panel shakes for 0.22 s (±3 px, ±1°).

Motion and animation

Do and don't

Do

Don't

Implementation recipe

  1. Set up a world-unit camera: scale = canvasHeight / 360; the main character is ~25 × 37 units.
  2. Define the palette as fill/shade pairs plus OUT = '#3a2240', OL = 1.15, IL = 0.55.
  3. Implement the Painter (outline / fill / flash modes) and gloss() exactly as in the Code section, plus shape helpers E, CAP, blobPath, roundPoly, leafPath.
  4. Implement build(box, fn, mode) that creates a canvas of (box size) * K, scales by K, runs fn with an outline painter and then with a fill (or flash) painter.
  5. Write each figure and prop as a part list, back to front: tail/back limbs → body → front limbs → head → face details → top decorations. Give every big part shade, sh and hi.
  6. Make 4 frames per figure by varying limb endpoints and small offsets (feet, arm angles, leaf sway, hem phase); bake normal + flash for each.
  7. Generate the ground: noise fields → per-pixel signed distance → coverage + rim blend → flat decals. Cache it in chunks.
  8. Per frame: ground, one batched shadow path, y-sort figures and props, blit with translate · rotate · scale(sx·facing, sy) around the feet, then particles and numbers.
  9. Add the motion rules (hop, waddle, float, stomp, overshoot pops) and the effects (impact star, flash, puff burst, stars, chunks, ring).
  10. Build the HUD in HTML/CSS with the panel/bar/card styles above; draw icons with the same painter on a 48 px grid and a 2.6 px outline.

Code

The snippets below are the real techniques from the module, made standalone. The complete runnable kit is starter.js; the full reference implementation (all creatures, props, icons, ground and effects) is ../../js/styles/cartoon.js.

1. The two-pass part painter (outline merge + cel crescent + gloss)

const OUT = '#3a2240', OL = 1.15, FLASH_SH = '#efe6f6', TAU = Math.PI * 2;
function Painter(ctx, mode, ol) { this.ctx = ctx; this.mode = mode; this.ol = ol; }
Painter.prototype.part = function (shape, fill, o = {}) {
  const ctx = this.ctx;
  if (this.mode === 'outline') {              // pass 1: everything plum, stroke at 2x weight
    ctx.beginPath(); shape(ctx);
    ctx.lineWidth = (o.ol != null ? o.ol : this.ol) * 2;
    ctx.strokeStyle = OUT; ctx.fillStyle = OUT; ctx.stroke(); ctx.fill();
    return;
  }
  const flash = this.mode === 'flash';
  ctx.save(); ctx.beginPath(); shape(ctx);
  if (o.inner) { ctx.lineWidth = o.inner * 2; ctx.strokeStyle = OUT; ctx.stroke(); } // inner line
  ctx.clip();
  const paint = (shade) => {
    ctx.fillStyle = flash ? (shade ? FLASH_SH : '#fff') : (shade ? o.shade || fill : fill);
    ctx.fillRect(-500, -500, 1000, 1000);
  };
  if (o.sh) {                                  // shade everywhere, lit colour on the shifted shape
    paint(true);
    ctx.save(); ctx.translate(o.sh[0], o.sh[1]); ctx.beginPath(); shape(ctx); ctx.restore();
    ctx.clip(); paint(false);
  } else paint(false);
  ctx.restore();
  if (!flash && o.hi) {                         // gloss: white ellipse at the top-left
    ctx.save(); ctx.beginPath(); shape(ctx); ctx.clip();
    ctx.globalAlpha = 0.92; ctx.fillStyle = '#fff';
    ctx.beginPath(); ctx.ellipse(o.hi[0], o.hi[1], o.hi[2], o.hi[3], o.hi[4] || 0, 0, TAU); ctx.fill();
    ctx.restore();
  }
};

2. Baking a sprite and blitting it with squash & stretch

let K = 3; // canvas px per world unit
function build(box, fn, mode) {
  const cv = document.createElement('canvas');
  cv.width = Math.ceil((box[2] - box[0]) * K); cv.height = Math.ceil((box[3] - box[1]) * K);
  const ctx = cv.getContext('2d');
  ctx.scale(K, K); ctx.translate(-box[0], -box[1]);
  ctx.lineJoin = 'round'; ctx.lineCap = 'round';
  fn(new Painter(ctx, 'outline', OL));
  fn(new Painter(ctx, mode || 'fill', OL));
  return { c: cv, ox: -box[0] * K, oy: -box[1] * K };
}
function blit(ctx, s, x, y, sx, sy, rot = 0, facing = 1) { // pivot = feet
  ctx.save(); ctx.translate(x, y); if (rot) ctx.rotate(rot); ctx.scale(sx * facing, sy);
  ctx.drawImage(s.c, -s.ox / K, -s.oy / K, s.c.width / K, s.c.height / K);
  ctx.restore();
}
// example prop: a bush = 4 ellipses as ONE part
const E = (x, y, rx, ry) => (c) => { c.moveTo(x + rx, y); c.ellipse(x, y, rx, ry, 0, 0, TAU); };
const bush = build([-15, -20, 15, 2], (P) => P.part(
  (c) => { E(-6.4, -6, 6.4, 6)(c); E(6, -5.8, 6, 5.6)(c); E(0, -9.6, 7.6, 7.2)(c); E(-0.5, -4.6, 7, 4.8)(c); },
  '#73c257', { shade: '#4e9a40', sh: [-2.1, -2.0], hi: [-4.8, -13, 2.2, 1.1, -0.6] }));

3. Carved glowing face and two-tone body fill

function carve(c, pathFn, dx = 0.2, dy = 0.7) {   // dark rim + glowing inside shifted down
  c.save();
  c.beginPath(); pathFn(c); c.fillStyle = '#8a3214'; c.fill(); c.clip();
  c.translate(dx, dy); c.beginPath(); pathFn(c); c.fillStyle = '#ffd43f'; c.fill();
  c.restore();
}
// fill function for P.part: cream bottom, purple top, wavy split (root-bulb creature);
// shade=true gives the shade pair
const turnipFill = (col, waveY, amp, freq) => (c, shade) => {
  c.fillStyle = shade ? col.botSh : col.bot; c.fillRect(-500, -500, 1000, 1000);
  c.fillStyle = shade ? col.topSh : col.top;
  c.beginPath(); c.moveTo(-60, -120); c.lineTo(60, -120); c.lineTo(60, waveY);
  for (let x = 60; x >= -60; x -= 0.5) c.lineTo(x, waveY + amp * Math.sin(x * freq + 0.6));
  c.closePath(); c.fill();
};

4. Ground: crisp region edges with an inner rim from a sampled noise field

// F: field values on a grid every `cpx` pixels (value > 0 = inside). Returns [r,g,b] for one pixel.
function shadePixel(F, nx, px, py, cpx, base, layer /* {f:[r,g,b], r:[r,g,b], rimPx} */) {
  const gx = Math.floor(px / cpx), gy = Math.floor(py / cpx), u = px / cpx - gx, v = py / cpx - gy;
  const A = F[gy * nx + gx], B = F[gy * nx + gx + 1], C = F[(gy + 1) * nx + gx], D = F[(gy + 1) * nx + gx + 1];
  const s = (A + (B - A) * u) * (1 - v) + (C + (D - C) * u) * v;
  const du = (B - A) * (1 - v) + (D - C) * v, dv = (C - A) * (1 - u) + (D - B) * u;
  const g = Math.sqrt(du * du + dv * dv) / cpx;
  const dist = g > 1e-9 ? s / g : (s > 0 ? 99 : -99);          // signed distance in pixels
  const cov = Math.min(1, Math.max(0, dist + 0.5));              // 1-px anti-aliased edge
  const rim = Math.min(1, Math.max(0, layer.rimPx - dist + 0.5)); // darker band just inside
  return base.map((b, i) => {
    const lay = layer.f[i] + (layer.r[i] - layer.f[i]) * rim;
    return b + (lay - b) * cov;
  });
}

5. Batched shadows and sticker floating numbers

function drawShadows(ctx, items) {                 // one path, one fill -> no darker overlaps
  ctx.beginPath();
  for (const a of items) { ctx.moveTo(a.x + a.rx, a.y); ctx.ellipse(a.x, a.y, a.rx, a.ry, 0, 0, Math.PI * 2); }
  ctx.fillStyle = 'rgba(50,30,72,0.2)'; ctx.fill();
}
// floating number: plum outline + plum drop, white or (highlighted) yellow -> orange gradient face
function damageNumber(ctx, x, y, txt, crit) {
  const fs = crit ? 12.5 : 9;
  ctx.font = fs + 'px "Lilita One", "Fredoka", sans-serif';
  ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.lineJoin = 'round';
  ctx.strokeStyle = '#3a2240'; ctx.lineWidth = fs * 0.3;
  ctx.strokeText(txt, x, y + fs * 0.09); ctx.fillStyle = '#3a2240'; ctx.fillText(txt, x, y + fs * 0.09);
  ctx.strokeText(txt, x, y);
  if (crit) { const g = ctx.createLinearGradient(0, y - fs * 0.45, 0, y + fs * 0.4);
    g.addColorStop(0, '#fff27a'); g.addColorStop(0.5, '#ffc93a'); g.addColorStop(1, '#ff8a2a'); ctx.fillStyle = g; }
  else ctx.fillStyle = '#fff';
  ctx.fillText(txt, x, y);
}

Adapting it to your project

Performance notes

Copy-paste prompt

Use the Bouncy Cartoon art style for my project (Canvas 2D, procedural, no image assets):
- Bright HD vector cartoon. ONE outline colour for everything: deep plum #3a2240, 1.15 world units
  outer silhouette (inner separation lines 0.55), round caps/joins. Never black.
- Paint every sprite in two passes into an offscreen canvas: pass 1 strokes+fills all parts in plum
  at 2x the outline width (merged silhouette), pass 2 fills each part: shade colour, then the lit
  colour clipped to the same shape shifted ~(-1.5,-1.5) units -> one crisp cel crescent bottom-right,
  then one white gloss ellipse (alpha 0.92) + tiny dot at the top-left. No gradients on bodies.
- Fat rounded shapes only: ellipses, capsule limbs, blobs, rounded polygons. Big heads, tiny bodies,
  googly eyes with plum pupils and white catchlights, thick angry brows.
- Colours come in fill/shade pairs (shade ~20% darker). Main character warm (orange #ff952b + teal
  #2f9c95), creatures cool (purple #9b5cd0 / cream, ghost white #f6f8ff), glow #ffd43f for light.
- Ground: flat pastel play-mat (meadow #9ec671, dark grass #79ae5a, lilac #c8b6da, sand paths #ebd3a0)
  with crisp anti-aliased region edges and a slightly darker inner rim; tiny tufts and 5-petal flowers.
- Props (round trees, bushes, rocks, fences) use the same outline + crescent + gloss painter.
- Shadows: flat plum ellipses rgba(50,30,72,0.2), all batched into one fill.
- Bake 4 frames + a white flash copy per figure; animate only by transforms: hop/waddle squash &
  stretch, tilt, bob, overshoot (outBack/outElastic) pops.
- Effects: white 8-point impact stars, outlined cloud puffs, yellow stars and colour chunks in bursts.
- Numbers in Lilita One with a plum outline + plum drop; UI in cream #fff4de pills with 4px plum
  borders and a solid 5px plum drop shadow; labels in Fredoka 600.