Bash.tv → GitHub → itch.io

Logic and physics puzzle games (Sokoban-likes, match-3, sliding and tile puzzles, nonograms, physics puzzles, programming puzzles). Rules as pure functions with undo and restart, level data and validation with a solver, difficulty curves built from mechanics introductions, hint systems, level select and star ratings, generating levels procedurally with guaranteed solutions, juicy feedback for m...

Download skill (.zip) Files on GitHub

Puzzle game development

Core: clear rules, interesting consequences, the “aha!” moment.

Starter template

A playable starter for the game-scaffolding template is in assets/starter/. Box pushing with pure rules (move(state)), undo and restart, five levels in ASCII, star ratings against par, saved progress, smooth tweens, and an exported solve() (breadth-first) to prove levels are solvable and set par.

python3 <game-scaffolding>/scripts/scaffold.py my-game --title "My Game" --starter <this skill>/assets/starter

Controls: Arrows/WASD, Z undo, R restart, N next. Touch: swipe, or tap beside the player. Esc pauses. All numbers to tune are in src/config.js; the gameplay is in src/scenes/play.js. Every level is solved in tests, with par set to the best solution; swipe, undo and saving were checked.

Architecture

// Sokoban-style move: # wall, . floor, $ box, @ player, * goal
function move(s, dx, dy) {
  const nx = s.px + dx, ny = s.py + dy, bx = nx + dx, by = ny + dy;
  if (s.wall(nx, ny)) return null;
  const box = s.boxes.findIndex((b) => b.x === nx && b.y === ny);
  if (box >= 0) { if (s.wall(bx, by) || s.boxes.some((b) => b.x === bx && b.y === by)) return null;
    const boxes = s.boxes.map((b, i) => (i === box ? { x: bx, y: by } : b)); return { ...s, px: nx, py: ny, boxes, moves: s.moves + 1 }; }
  return { ...s, px: nx, py: ny, moves: s.moves + 1 };
}

Level design

Player support

Unlimited undo and instant restart, optional hints (show the next move from the solver, or reveal a step), skip a level after a few attempts, and no time pressure unless that’s the point.

Controls

Grid puzzles: arrows/WASD, swipe (30 px threshold) or tap adjacent tiles; match-3: drag or tap-tap swap. Big tiles on phones.

Pitfalls

Unsolvable levels (solver in tests), unclear rules (show, don’t tell), punishing mistakes without undo, difficulty spikes, and input that misreads swipes as taps.