Skip to content

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

License

Notifications You must be signed in to change notification settings

bocaletto-luca/Labyrinth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ† Labyrinth | Maze Explorer | Web Game ๐Ÿš€

Author: Bocaletto Luca


Test Online


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! ๐Ÿ˜Š


About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published