Giter VIP home page Giter VIP logo

maze's Introduction

Maze Generator and Viewer

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.

Features

  • 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.

Prerequisites

  • Go 1.16 or higher

Directory Structure

.
├── 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

Installation

  1. Clone the repository:

    git clone https://github.com/storbeck/maze.git
    cd maze
  2. Build and generate textures:

    make

Usage

Generate and View a New 2D Maze

To generate a new maze, generate textures, and view it in 2D:

make && ./scripts/2d.sh

Generate and View a New ASCII Maze

To generate a new maze and view it in ASCII without regenerating textures:

make build && ./scripts/ascii.sh

Generating Textures Only

If you need to regenerate the textures separately, run:

make textures

Cleaning Up

To clean up the generated files, run:

make clean

maze's People

Contributors

storbeck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.