Bash.tv → GitHub → itch.io

Interactive tutorials for browser games, written as data. Steps that wait for the player to do something (not just read), highlights that dim everything except the target, steps that freeze the game, read-and-continue steps with a minimum time, stuck detection with a better hint, skip and replay, resuming at the saved step, device-aware text, and drop-off funnels to see where players quit. Test...

Download skill (.zip) Files on GitHub

Game tutorial system

Use a scripted tutorial when the game has several systems that must be learned in order (strategy, building, card games). For action games, prefer level design plus hints (game-onboarding) and keep the scripted part under a minute.

assets/tutorial.js

import { createTutorial, funnel } from "./tutorial.js";
const tut = createTutorial({ id: "basics", save, report: (e) => analytics.push(e), onDone: () => (flags.tutorial = true), steps: [
  { id: "move",  say: { keys: "Move with WASD", touch: "Drag to move" }, until: (g) => g.moved > 150 },
  { id: "coin",  say: "Grab the coin", focus: (g) => g.coin, until: (g) => g.coins > 0, onStart: (g) => g.spawnCoin() },
  { id: "enemy", say: "Jump on the red one!", freeze: false, until: (g) => g.stomped, timeout: 20, hint: "Jump while you're above it" },
  { id: "pause", say: "Press Esc any time to pause", next: "tap", minTime: 1 },
] });
scene.enter: if (!tut.start(game)) startNormally();        // false = already finished earlier
each frame: tut.update(dt, game, input.lastDevice); if (tut.freezing) skip the world update;
  if (tut.waitingForTap && input.wasPressed("confirm")) tut.next();  tap on tut.skipRect -> tut.skip(game)
draw (after the HUD): tut.draw(ctx, { width, height }, camera, game)

Writing good steps

Drop-off

funnel(events, stepIds) → { steps: [{ step, reached, percent }], donePercent }. A step where many players stop is too hard or unclear: rewrite it, split it, or cut it.

Tested

Node tests: device text, advancing on the action, minimum time, tap-to-continue steps, stuck hint and event, drawing, resuming at the saved step, not repeating after done, skip, funnel percentages. Used in the UI kit demo (four steps with focus ring and skip).

Pitfalls

Text-only steps, unskippable tutorials, tutorials that restart every time, steps that can’t be completed on touch, freezing the game for every step, and a tutorial for things the level could teach.