mirror of
https://github.com/tiennm99/sokoban.git
synced 2026-10-13 10:15:59 +00:00
34eaf1b2a73807f9a287b514f8e35ef66bf06edc
Remove the scale-on-press animation from the shared button factory. Scaling the container also scaled its hit rectangle, so any small pointer drift between pointerdown and pointerup landed outside the shrunken hitbox and the click was silently dropped. Releasing off the button also left it visually stuck at 0.96 scale. Fire the callback on pointerdown instead — snappy, no release tracking, identical behaviour for mouse, touch, and fast clicks. Hover colour change still provides press feedback.
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
0 Stars
1 Watchers
0 Forks
Languages
Svelte
56.5%
JavaScript
38%
CSS
4.8%
HTML
0.7%