A 3D maze game built with C++ and SFML, featuring pathfinding algorithms and automated navigation systems. This is built on the raycasting algorithm from the previous project.
- Procedural Maze Generation: Random maze creation using Depth-First Search and Prim's algorithms
- 3D Raycasting Rendering: Immersive 3D perspective from 2D maze data
- Auto-Navigation: Computer-guided movement with "Navigate Maze" functionality via A* algorithm
- Real-time Path Visualization: Visual representation of calculated paths
- Performance Optimized: Efficient maze generation and pathfinding algorithms
- File I/O Integration: Save and load maze configurations
- W: Move forward
- S: Move backward
- A: Rotate camera left / turn player left
- D: Rotate camera right / turn player right
/maze_3D
│
├── src/ # Source files
│ ├── main.cpp # Main entry point of the game
│ └── game/ # Core engine functionalities
│ ├── globals/ # Constants and flags
│ ├── core/ # Game loop and state management
│ ├── physics/ # Physics and collision detection
│ ├── camera/ # Window and view management
│ ├── utils/ # Utility functions
│ └── scenes/ # Scene management
│
├── assets/ # Game assets
│ ├── fonts/ # Text files and sources
│ ├── sound/ # Sound effects
│ ├── tiles/ # Tiles and tilemaps
│ └── sprites/ # Sprite images
│
├── libs/ # External libraries
│ └── logging/ # Logging system
│
├── Makefile # Build instructions
└── README.md # Project documentation
- Compiler: Requires clang++ (or g++) with C++17 support
- SFML: Simple and Fast Multimedia Library for graphics
- Custom Game Framework: Built on top of the SFML Game Framework
-
Clone the Repository:
git clone https://github.com/kingkururu/maze_3D cd maze_3D (location will be different) -
Build the Project:
make test -
How to Clean the Build:
make clean
-
Install SFML:
# Install Homebrew if not already installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install SFML brew install sfml@2 brew install .... (other missing libraries)
-
Configure PATH (add to ~/.zshrc or ~/.bash_profile):
export PATH="/opt/homebrew/bin:$PATH" export PATH="/opt/homebrew/opt/sfml@2/bin:$PATH" export PATH="path to other libraries if any of them is missing)
- Algorithm Implementation: Understanding maze generation and pathfinding algorithms
- Graph Theory Applications: Practical application of DFS, Prim's, and A* algorithms
- Performance Optimization: Efficient algorithms for real-time maze generation and pathfinding
- Data Structures: Advanced use of graphs, priority queues, and spatial data structures
- File I/O Operations: C++ file handling for maze persistence and configuration
- Game AI Development: Creating intelligent navigation systems for enhanced gameplay
The game implements a sophisticated maze generation system that:
- Algorithm Selection: Choose between DFS and Prim's algorithms for different maze characteristics
- Procedural Generation: Create unique maze layouts using selected algorithms
- Path Optimization: Calculate optimal routes using A* pathfinding
- File Operations: Save generated mazes and load configurations
- Visual Rendering: Display maze in 3D using raycasting techniques
- Music: Game Background from Pixabay
- Pixel font: LLPixel Font
- Graphics: Custom artwork created using Canva and Canva AI
- Framework: Built using the Custom SFML Game Framework https://github.com/kingkururu/sfml_game_template/edit/main/README.md
- SFML: https://github.com/SFML/SFML
- Yaml-cpp: https://github.com/jbeder/yaml-cpp
- Spdlog: https://github.com/gabime/spdlog
- FMT: https://github.com/fmtlib/fmt