/xmaze

A maze generator with visualization options

Primary LanguageCGNU General Public License v3.0GPL-3.0

xmaze

The GPL license Travis CI

xmaze is a pretty customizable maze generator. It can run in terminal or in windowed mode (using X11 library).

Example maze generated by xmaze:

Typical usage looks like this: xmaze [OPTIONS], where supported options are:

  • -h - display help message
  • -x <width> - set maze width
  • -y <height> - set maze height
  • -f <frequency> - generation steps per second
  • -t <pixels> - single tile size (in pixels)
  • -s <seed> - random generator seed
  • -k - use Kruskal's algorithm
  • -c - show floodfill effects with colors
  • -p - start paused
  • -n - no graphics
  • -b - add wall border to text dump
  • -w <char> - set wall character
  • -W <hex color> - set wall color
  • -P <hex color> - set path color
  • -F <hex color> - set frontier color
  • -o <filename> - set output file

During graphics mode, following keys have their actions assigned:

  • q - quit
  • p - pause
  • c - toggle additional colors
  • d - dump current maze into the output file
  • s - dump current maze into the terminal
  • f - toggle border added to text dumps
  • + - speed generation up
  • - - slow generation down

Building

xmaze build process is fairly easy.

  • make sure you've got X11 library installed - sudo apt-get install libx11-dev
  • invoke makefile - make all