mirror of
https://github.com/tiennm99/sokoban.git
synced 2026-09-15 08:19:26 +00:00
1d2fff6bf8eaae580f0f5ce7cb0b695e4c75b4f9
Replace the 3 hand-crafted JSON levels with the full Microban set (100 solvable puzzles by David W. Skinner) stored as XSB text and parsed at runtime. Rework the game into kebab-case modules under a 200-LOC budget: - core/level-parser: XSB parse with flood-fill interior detection - core/board-model: pure move/undo/win logic, Phaser-free - core/progress-store: localStorage persistence with graceful fallback - core/theme: Nord palette, fonts, responsive tile sizer - ui/button-factory: one rounded button impl with hover/press - ui/board-renderer: animated tile/wall/goal/box/player drawing - scenes: menu, paginated level select (5x4 grid, 5 pages), game Add WASD movement, U/Z undo, R restart, Esc to menu, live move counter, best-move tracking per level, win overlay with next/levels actions, and a radial-gradient CSS backdrop. Drop the dead Arcade Physics wiring, the broken manual shutdown/destroy code, the unused main.js self-import, and the hardcoded 3-level registry state. Add docs/ and refresh README.
Sokoban
A browser-based Sokoban game built with Phaser 3 and Vite, shipping 100 Microban levels by David W. Skinner.
Play: https://tiennm99.github.io/sokoban/
Features
- 100 solvable puzzles from the Microban set (beginner-friendly, concept-focused).
- Paginated level select with progress tracking and best-move record per level.
- Controls: arrow keys or WASD.
U/Zto undo,Rto restart,Escfor menu. - Undo history, live move counter, animated moves.
- Progress saved locally in
localStorage. - Responsive tile sizing so small and large levels both look right.
Development
npm install
npm run dev # dev server on http://localhost:8080
npm run build # production build
npm run dev-nolog # dev without the analytics ping
npm run build-nolog # build without the analytics ping
Project layout
Documentation
docs/project-overview-pdr.md— product scope.docs/system-architecture.md— how the pieces fit together.docs/code-standards.md— conventions.docs/development-roadmap.md— past and planned phases.docs/project-changelog.md— release notes.
Credits
- Puzzles: Microban by David W. Skinner (April 2000). Freely distributable with credit. Original site: http://users.bentonrea.com/~sasquatch/sokoban/
- Engine: Phaser 3.
License
MIT — see LICENSE.
Description
From-scratch Sokoban puzzle game — Svelte 5 + Vite, all 155 Microban levels, undo, progress tracking
Readme
Apache-2.0
1.4 MiB
Languages
Svelte
56.5%
JavaScript
38%
CSS
4.8%
HTML
0.7%