Skip to content

A-Maze-ing Documentation

Welcome to the technical documentation for the A-Maze-ing project.

This documentation explains the internal systems used to generate, solve, render, and export mazes using Python and MiniLibX.

The project focuses on: - Maze generation algorithms - Pathfinding visualization - Real-time rendering - Interactive gameplay - Reusable maze generation systems


Menu

For more information about the maze project, visit the repository: https://github.com/SaraFreitas-dev/A-Maze-ing


๐Ÿ“š Documentation Overview

Each document focuses on a specific part of the project architecture.


๐Ÿง  Algorithms

Core maze generation and pathfinding systems.

Topics Covered

  • DFS maze generation logic
  • BFS shortest-path solving
  • Path reconstruction
  • Explored cells for animation

Main Files

  • mazegen/generator.py
  • mazegen/solver.py
  • mazegen/MazeGenerator.py

๐Ÿ—๏ธ Maze Generator

Documentation for the reusable maze generation module.

Topics Covered

  • MazeGenerator class structure
  • Maze object creation
  • Generation pipeline
  • Seed-based reproducibility
  • Perfect and imperfect maze handling
  • Integration between DFS, BFS, validation, and export

Main Files

  • mazegen/MazeGenerator.py
  • mazegen/Maze.py

๐Ÿ–ผ๏ธ MLX Library

Overview of the MiniLibX integration used for graphical rendering.

Topics Covered

  • Window creation
  • Image rendering
  • Event hooks
  • Keyboard controls
  • Player movement
  • Real-time updates
  • Basic animation systems

Main Files

  • render/mlx_renderer.py
  • render/GameState.py

๐Ÿ“ Parsing System

Configuration parsing and validation systems.

Topics Covered

  • KEY=VALUE parsing
  • Required key validation
  • Type conversion
  • Duplicate key detection
  • Error handling
  • Maze configuration loading

Main Files

  • parsing/config_parser.py

๐ŸŽจ Render System

Rendering and visual systems used in the project.

Topics Covered

  • ASCII rendering
  • Maze drawing
  • Asset loading
  • Theme systems
  • Menu rendering
  • Dynamic scaling
  • Animation rendering

Main Files

  • render/draw_maze.py
  • render/menu.py
  • render/Assets.py
  • render/converter.py

๐Ÿ“ฆ Export System

Maze export and utility systems.

Topics Covered

  • Hexadecimal maze export
  • NSEW path conversion
  • Output file structure
  • Coordinate conversion
  • Path processing
  • Maze serialization

Main Files

  • utils/export_utils.py
  • utils/hex_utils.py
  • utils/path_utils.py

๐Ÿ—๏ธ Project Architecture

A-Maze-ing
โ”‚
โ”œโ”€โ”€ ๐Ÿ—๏ธ Maze Generator System
โ”‚   โ”œโ”€โ”€ Maze Object Structure
โ”‚   โ”œโ”€โ”€ Generation Pipeline
โ”‚   โ”œโ”€โ”€ Perfect / Imperfect Mazes
โ”‚   โ””โ”€โ”€ Seed Reproducibility
โ”‚
โ”œโ”€โ”€ ๐Ÿง  Algorithms
โ”‚   โ”œโ”€โ”€ DFS Generation
โ”‚   โ”œโ”€โ”€ BFS Solving
โ”‚   โ”œโ”€โ”€ Pathfinding
โ”‚   โ””โ”€โ”€ Maze Validation
โ”‚
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ Rendering System
โ”‚   โ”œโ”€โ”€ MLX Window
โ”‚   โ”œโ”€โ”€ ASCII Renderer
โ”‚   โ”œโ”€โ”€ Theme System
โ”‚   โ””โ”€โ”€ Asset Management
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Configuration System
โ”‚   โ”œโ”€โ”€ Config Parsing
โ”‚   โ”œโ”€โ”€ Validation
โ”‚   โ””โ”€โ”€ Error Handling
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ฆ Export System
โ”‚   โ”œโ”€โ”€ Hexadecimal Export
โ”‚   โ”œโ”€โ”€ Path Conversion
โ”‚   โ””โ”€โ”€ File Output
โ”‚
โ””โ”€โ”€ ๐ŸŽฎ Gameplay Systems
    โ”œโ”€โ”€ Player Movement
    โ”œโ”€โ”€ Menu Navigation
    โ””โ”€โ”€ Interactive Rendering