A "crazy," neon-themed arcade maze game built in Python.
Mazify is not just a maze generator; it's a complete, "juiced" arcade experience. It combines classic procedural generation algorithms with modern game-feel elements like sound, particle effects, and a pulsing neon aesthetic. The goal is to collect all the Data Fragments and reach the exit in the fastest time possible.
This project is packed with features that make it a complete and polished game:
- Dynamic Procedural Generation: Uses a Depth-First Search (DFS) algorithm to generate a new, unique, and perfect maze every single time.
- "Beautiful" Generation Animation: Watch the maze get "carved out" in real-time with a pulsing magenta generator head.
- Full Game Loop: Includes a "MAZIFY" Title Screen, a "GET READY!" transition, the main gameplay, and a "You Won!" end screen.
- Collectible System: The player must collect all 10 "Data Fragments" (white pulsing orbs) before the exit (green flag) will work.
- A* Pathfinding Hint: The player can press
Hto toggle a hint, which shows the optimal path calculated by the A* (A-Star) algorithm. - Instant Restart: Press
Gat any time (even during generation) to immediately abandon the current run and start a new one.
- Neon "Tron" Aesthetic: A dark, high-contrast theme with glowing cyan walls, a pulsing player, and vibrant start/end flags.
- Fading Player Trail: The player leaves a faint, fading trail of particles to show where they've been.
- Particle Explosions: Collecting a Data Fragment triggers a satisfying burst of neon particles.
- Screen Shake: A subtle screen shake effect plays when you restart or win the game.
- Polished "Glass" HUD: The game features a clean, semi-transparent HUD for the timer, fragment count, and controls.
- HUD "Pop" Animation: The "Fragments" text on the HUD flashes and scales up when you collect one.
The game has a full sound system where all sounds are generated from code using numpy sine waves. No audio files are needed!
- Player movement (
bloop) - Collecting a fragment (
ping!) - Winning the game (a two-tone
fanfare!) - Restarting (
whoosh!) - Toggling the hint (
click) - Failing to exit (
buzz!)
- Python 3: The core language for the entire project.
- Pygame: The library used for all graphics, input (keyboard), and sound.
- Numpy: Used exclusively for generating the sound effect wave data.
To get a local copy up and running, follow these simple steps.
You must have Python 3 and pip installed.
- Clone this repository (or just download the
mazify.pyfile). - Install the required Python libraries (
pygameandnumpy):pip install pygame numpy
- Run the game:
(If you named the file something else, run that file instead.)
python main.py
- SPACE (on Title Screen): Start the game
- ARROW KEYS (tap-to-move): Move the player (Up, Down, Left, Right)
- H: Toggle the A* solution path (hint)
- G: Restart the game and generate a new maze
- Q or ESC: Quit the game