Skip to content

devshareacademy/phaser-editor-sokoban-course

Repository files navigation

🧱 Sokoban in Phaser Editor – Course Source Code

This repository contains the full source code for the “Build a Sokoban Game with Phaser Editor” YouTube course.

You’ll learn how to build a complete Sokoban-style puzzle game using Phaser 3 and Phaser Editor 2D, including tilemaps, prefabs, scene transitions, and a clean separation between game logic and rendering.

📺 Watch the full course playlist:
▶️ Build a Sokoban Game in Phaser Editor – Full Free Course

🎮 Play the game demo:
🕹️ Dungeon Sokoban on itch.io


🚀 About This Project

Over the series, we build a small but complete Sokoban game with:

  • Modular project structure
  • Custom Sokoban logic written in pure JavaScript
  • Tilemap-based level design
  • Player, box, and goal prefabs
  • Smooth fade transitions between scenes
  • Multiple fully playable levels
  • Clean scene flow architecture

This repository includes:

  • Starting project files
  • One snapshot per video (via tags)
  • Completed version of the free course
  • All assets used in the project

If you're following along with the series, this repo is your reference point for every step.


📁 Repository Structure

/assets                        → Images, spritesheets, fonts, and asset packs
/phaserjs_editor_scripts_base  → Core script node libraries
/src
  /components                  → Component configuration in Phaser Editor
  /lib                         → Sokoban core engine (pure JS)
  /prefabs                     → Reusable blocks for text and other game objects
  /scenes                      → Boot, Preload, Title, and Level layouts & tilemap data
  /scripts                     → Script nodes for game manager and scene transitions
  /config.js                   → Common game code
  /main.js                     → Game configuration and creation
/index.html                    → Web app entry point

🏁 Getting Started

1️⃣ Install Phaser Editor 2D

This project uses Phaser Editor 2D, which includes its own development server and scene editor.

Download it here:

Phaser Editor


2️⃣ Open the Project

  1. Open Phaser Editor 2D
  2. Select File → Open Project
  3. Choose this repository’s folder

3️⃣ Run the Game

Click the Play button inside Phaser Editor.

You should see the title screen and be able to start Level 1.


🧠 Course Roadmap

Each lesson builds on the last.

  1. Introduction & Full Game Demo
  2. Project Overview & Architecture Explained
  3. Setting Up Your Project in Phaser Editor
  4. Creating the Title Scene
  5. Understanding Prefabs in Phaser Editor
  6. Setting Up a Boot Scene (Loading Fonts & UI Assets)
  7. Building the Level Layout with Tilemaps
  8. Creating Player & Box Prefabs
  9. Coding the Core Logic (Part 1)
  10. Coding the Core Logic (Part 2)
  11. Testing the Sokoban Logic Engine
  12. Building the Game Manager Script
  13. Parsing Tilemap Data for Gameplay
  14. Connecting Logic to Phaser
  15. Handling Input & Updating Sprites
  16. Adding More Levels to the Game
  17. Level Transitions & Next-Level Flow
  18. Final Polish & Improvements
  19. Wrap-Up & Next Steps

🏷️ Versioning (Branches / Tags)

Each video has a corresponding project snapshot (via a tag).

Tags for each video:

v00-base
v03-setup
v04-main-menu
v05-prefabs
v06-boot-scene
v07-level-layout
v08-player-prefab
v09-core-logic-1
v10-core-logic-2
v12-game-manager
v13-parse-tilemap
v14-connect-logic
v15-input
v16-more-levels
v17-level-flow
v18-polish
v19-finished

To check out a snapshot:

git checkout v05-prefabs

🎁 Free Asset Pack + Project Files

You can download a free asset pack, full source ZIP, and per-video project bundles from Gumroad.

👉 Free download (Pay What You Want):

https://scottwestover.gumroad.com/l/sokoban-course


🌟 Premium Version (Optional Upgrade)

A premium extended course includes:

  • Move counter & scoring
  • Undo moves (Command Pattern)
  • Animated title scene
  • Sound effects & background music
  • Celebration effects
  • Level select scene

👉 Premium course:

https://scottwestover.gumroad.com/l/sokoban-course


🖼️ Screenshots

Game play demo 1

Game play demo 2

Screen shot 4


📝 Credits


❤️ Support the Project

If you found this course helpful:

  • ⭐ Star this repository
  • 🔔 Subscribe on YouTube
  • 💬 Leave a comment
  • ❤️ Support the project on Gumroad

📬 Contact

About

Source code for the complete Sokoban game built in the “Build a Sokoban Game with Phaser Editor” YouTube course. Includes starting project files, per-video snapshots, and the full completed game.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors