game.mov
This project provides tools to generate and view mazes in both ASCII and 2D formats. The mazes are generated using a challenging Hunt-and-Kill algorithm to ensure a complex and engaging puzzle experience.
- Maze Generation: Generate complex mazes using the Hunt-and-Kill algorithm.
- ASCII Viewer: View the generated mazes in a simple ASCII format.
- 2D Viewer: View the generated mazes in a top-down 2D style with textures.
- Go 1.16 or higher
.
├── 2d
│ └── maze.go # Main program for generating and viewing mazes in 2D format with textures
├── ascii
│ └── maze.go # Main program for generating and viewing mazes in ASCII format
├── gen
│ └── maze.go # Maze generation logic using the Hunt-and-Kill algorithm
├── lib
│ └── maze.go # Shared library for maze generation algorithms
├── scripts
│ ├── 2d.sh # Script to generate a new 2D maze and view it
│ └── ascii.sh # Script to generate a new ASCII maze and view it
├── textures
│ ├── entrance
│ │ └── generate.go # Generator for the entrance texture
│ ├── exit
│ │ └── generate.go # Generator for the exit texture
│ ├── floor
│ │ └── generate.go # Generator for the floor texture
│ └── wall
│ └── generate.go # Generator for the wall texture
├── bin # Directory for compiled binaries
├── Makefile # Makefile for building the project and generating textures
├── README.md # This README file
├── go.mod # Go module file
└── go.sum # Go dependencies file
-
Clone the repository:
git clone https://github.com/storbeck/maze.git cd maze
-
Build and generate textures:
make
To generate a new maze, generate textures, and view it in 2D:
make && ./scripts/2d.sh
To generate a new maze and view it in ASCII without regenerating textures:
make build && ./scripts/ascii.sh
If you need to regenerate the textures separately, run:
make textures
To clean up the generated files, run:
make clean