https://github.com/bocaletto-luca/labyrinth
Welcome to Labyrinth | Maze Explorer! ๐ฎ This is a fun and interactive web game where players solve randomly generated mazes by tracing a path using the W, A, S, D keys. The maze is generated dynamically, and you can save your solved maze as PNG, JPG, or PDF. By Bocaletto Luca
https://github.com/bocaletto-luca/labyrinth
bocaletto-luca css3 game html5 javascript labyrinth labyrinth-game labyrinth-generator maze opensource responsive singleplayer webapp webgame
Last synced: about 2 months ago
JSON representation
Welcome to Labyrinth | Maze Explorer! ๐ฎ This is a fun and interactive web game where players solve randomly generated mazes by tracing a path using the W, A, S, D keys. The maze is generated dynamically, and you can save your solved maze as PNG, JPG, or PDF. By Bocaletto Luca
- Host: GitHub
- URL: https://github.com/bocaletto-luca/labyrinth
- Owner: bocaletto-luca
- License: gpl-3.0
- Created: 2025-06-01T22:36:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-10T10:41:17.000Z (about 1 year ago)
- Last Synced: 2025-06-10T11:37:23.190Z (about 1 year ago)
- Topics: bocaletto-luca, css3, game, html5, javascript, labyrinth, labyrinth-game, labyrinth-generator, maze, opensource, responsive, singleplayer, webapp, webgame
- Language: JavaScript
- Homepage: https://bocaletto-luca.github.io/
- Size: 52.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Labyrinth | Maze Explorer | Web Game ๐
#### Author: Bocaletto Luca
---
[](https://bocaletto-luca.github.io/Labyrinth/)
---
Welcome to **Labyrinth | Maze Explorer**! ๐ฎ
This is a fun and interactive **web game** where players solve **randomly generated mazes** by tracing a **path** using the **W, A, S, D** keys. The maze is generated dynamically, and you can **save your solved maze as PNG, JPG, or PDF**.
โญ **GAME HIGHLIGHTS** โญ
- ๐๏ธ **Random Maze Generation** using the recursive **backtracking algorithm**
- ๐ฉ **Start Cell:** Highlighted in **Green** (Topโleft corner, (0,0))
- ๐ฅ **Finish Cell:** Highlighted in **Red** (Bottomโright corner)
- ๐ฆ **Path Drawing:** Use **W, A, S, D** to trace a **blue path**
- ๐ **Backtracking Allowed:** Undo steps by retracing your path
- ๐ **Game Completion:** Dialog prompts a choice to start a **new maze** or **exit**
- ๐ค **Export Options:** Save maze as **PNG, JPG, or PDF**
- ๐ **Prevents Page Scrolling:** Moving with WASD does not scroll the page
---
## ๐ฎ How to Play
**1๏ธโฃ Generate a Maze**
Click the **"Generate New Maze"** button to create a new maze. The game will highlight the **Start Cell (Green)** and the **Finish Cell (Red)**.
**2๏ธโฃ Move Through the Maze**
Use the **W, A, S, D keys** to trace your path:
- **W**: Move **Up** โฌ๏ธ
- **A**: Move **Left** โฌ
๏ธ
- **S**: Move **Down** โฌ๏ธ
- **D**: Move **Right** โก๏ธ
Your path is **drawn in blue**. If you backtrack, the last step is removed.
**3๏ธโฃ Complete the Maze**
Once your blue path reaches the **Finish Cell**, a message will appear:
- โ
Click **OK** to generate a **new maze** (clears previous solution)
- โ Click **Cancel** to **exit the game**
**4๏ธโฃ Export Your Maze**
Use the **export buttons** below the canvas to **download your solved maze** as PNG, JPG, or PDF.
---
## ๐ Features
โ๏ธ **Fully Interactive Maze Solver**
โ๏ธ **Lightweight Web Game** (No Installation Required)
โ๏ธ **Dynamic Path Tracing** (Backtracking Supported)
โ๏ธ **Auto-Clearing Previous Solutions** when generating new mazes
โ๏ธ **Prevent Default Page Scrolling** when using movement keys
โ๏ธ **Built-in Export Options** (PNG, JPG, and PDF)
---
## ๐๏ธ Technologies Used
- ๐ต **HTML5 Canvas** for rendering the **maze**
- ๐จ **JavaScript** for **maze generation & interaction**
- ๐ **CSS** for styling
- ๐ผ๏ธ **jsPDF** for **PDF export**
- ๐ฑ๏ธ **Event Listeners** for **keyboard movement controls**
---
## ๐ค Export Options
Want to save your maze? Use the built-in **export buttons**:
- ๐ผ๏ธ **PNG Export:** Saves your maze as a **high-quality PNG image**
- ๐ธ **JPG Export:** Saves your maze as a **JPG photo**
- ๐ **PDF Export:** Saves your maze as a **PDF file** (powered by `jsPDF`)
---
## ๐ก Roadmap
๐ก **Future Improvements:**
- โณ **Timed Mode** โฑ๏ธ (Challenge yourself to solve the maze quickly)
- ๐ **Leaderboard Support** (Track best completion times)
- ๐ **Multiplayer Mode** (Race against friends to solve mazes)
If you'd like to contribute, feel free to submit **feature suggestions** or **pull requests**! ๐
---
## ๐จ Screenshots
๐ **Example Maze Preview:**
*(Insert sample images of the maze in action)*
๐ค **Exported Maze Example:**
*(Include an exported PNG/JPG/PDF sample)*
---
## ๐ Author
**๐จโ๐ป Bocaletto Luca**
Made with โค๏ธ and **JavaScript**!
If you enjoy Labyrinth - Maze Explorer, feel free to โญ star the repository or contribute to its development. ๐
---
## ๐ License
This project is licensed under the **GPLv3 License**.
Feel free to use, modify, and distribute it **freely**! ๐
---