Skip to content

joaoag/mazes_with_nannou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Displaying Mazes with Nannou

This repo combines my maze-making code with creative coding framework Nannou.
It's my first Rust project so things are pretty rough and ready! Example maze, generated with binary tree

Running locally

Make sure you have Rust lang installed (instructions here)
I've only used this on macOS, so if you're using something else your mileage may vary.

Steps for running locally:

  1. Clone or fork this repo (see GitHub docs here for help)
  2. Navigate to the repo in your terminal
  3. Run cargo run
  4. You should then see something like the below: Screenshot of the UI, set to default values

Running tests

Run cargo test to execute the test suite.

User guide

Button Behaviour
Generate new maze creates a maze, using the current settings from the UI
Save my maze exports a png of the generated maze to a mazes_with_nannou sub-directory in the project
Solve! increases blue intensity the further a route extends from the top left cell, illustrating paths through the maze
Height sets the number of walls on the vertical axis
Width sets the number of walls on the horizontal axis
Corrider size sets the size of the empty space between the walls
Wall thickness sets the width of the walls
Colours options for colouring the maze walls, selecting 'Custom' opens a colour picker for each wall (ish)
Binary tree, Sidewinder, Aldous-Broder etc. different maze-making algorithms

To Do

  • Investigate whether filename can be made of variables used to create the maze in question e.g. recording corridor size etc.
  • Restructure project to make it more idiomatic, misc. code tidying e.g. removing unused code
  • Allow cli_display() to be triggered from the command line, update docs accordingly
  • Address bugs that happen when width is set to more than one greater value than height
  • Consider making browser-version using WASM, like this example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages