Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
maze(6) 		       XScreenSaver manual			 maze(6)

NAME
     maze - an automated X11 demo repeatedly creating and solving a random maze

SYNOPSIS
     maze  [--display  host:display.screen]  [--foreground  color] [--background
     color] [--window] [--root] [--window-id  number][--install]  [--visual  vi-
     sual]   [--grid-size  pixels]  [--live-color  color]  [--dead-color  color]
     [--solve-delay usecs] [--pre-delay usecs] [--post-delay usecs] [--generator
     integer] [--max-length integer] [--fps]

DESCRIPTION
     The maze program creates a "random" maze and then solves it with  graphical
     feedback.

OPTIONS
     maze accepts the following options:

     --window
	     Draw on a newly-created window.  This is the default.

     --root  Draw on the root window.

     --window-id number
	     Draw on the specified window.

     --install
	     Install a private colormap for the window.

     --visual visual
	     Specify which visual to use.  Legal values are the name of a visual
	     class, or the id number (decimal or hex) of a specific visual.

     --grid-size pixels
	     The  size of each block of the maze, in pixels; default is 0, mean-
	     ing pick a random grid size.  Minimum meaningful value is 2.

     --live-color color
	     The color of the path.

     --dead-color color
	     The color of the failed path (it is also stippled with a  50%  pat-
	     tern.)

     --skip-color color
	     The  maze	solver will choose to not go down a path if it can "see"
	     (in a straight line) that it is a dead end.  This is the  color  to
	     use for paths that are skipped for this reason.

     --surround-color color
	     If  the  maze  solver  ever  completely encloses an area within the
	     maze, then it knows that the exit is not in there (and in fact  the
	     interior  of  that area might not even be reachable.)  It will mark
	     out those cells using this color.

     --solve-delay integer
	     Delay (in microseconds) between each step	of  the  solution  path.
	     Default 5000, or about 1/200th second.

     --pre-delay integer
	     Delay  (in  microseconds) between generating a maze and starting to
	     solve it.	Default 2000000 (2 seconds.)

     --post-delay integer
	     Delay (in microseconds) after solving a maze and before  generating
	     a new one.  Default 4000000 (4 seconds.)

     --generator num
	     Sets the algorithm that will be used to generate the mazes. The de-
	     fault is -1, which randomly selects an algorithm for each maze that
	     is generated. Generator 0 is the original one, and works by walking
	     around  randomly until we hit a place we've been before, then back-
	     tracking and trying a new direction somewhere. Generator 1 picks  a
	     random  spot in the maze, then draws a straight wall from that spot
	     in a random direction until it hits another wall (and continues un-
	     til the maze is complete). Generator 2 is based on sets.  Initially
	     all  cells  are  in  different sets. Then two neighboring cells are
	     chosen and if they are in different sets, their sets are joined. If
	     they were in the same set, a wall is built between them. This  con-
	     tinues until the maze is complete.

	     All  generators generate mazes with a certain 'characteristic'. See
	     if you can spot them!

	     The three algorithms are essentially Kruskal, Prim,  and  a  depth-
	     first recursive backtracker.

     --max-length num
	     Controls  the  maximum length of walls drawn in one go by generator
	     1.

     Clicking the mouse in the maze window controls it.

     LeftButton      Clears the window and restarts maze.

     MiddleButton    Pause or unpause the program.

     RightButton     Exit.

     --fps   Display the current frame rate and CPU load.

BUGS
     Expose events force a restart of maze.

     Mouse actions are based on "raw" values (Button1, Button2 and Button3)  in-
     stead of using the pointer map.

ENVIRONMENT
     DISPLAY
	     to get the default host and display number.

     XENVIRONMENT
	     to  get  the  name of a resource file that overrides the global re-
	     sources stored in the RESOURCE_MANAGER property.

     XSCREENSAVER_WINDOW
	     The window ID to use with --root.

SEE ALSO
     X(1), xscreensaver(1)

COPYRIGHT
     Copyright (C) 1988 by Sun Microsystems, Inc. Mountain View, CA.

     All Rights Reserved

     Permission to use, copy, modify, and distribute this software and its docu-
     mentation for any purpose and without fee is hereby granted, provided  that
     the  above  copyright  notice appear in all copies and that both that copy-
     right notice and this permission notice appear in supporting documentation,
     and that the names of Sun or MIT not be used in  advertising  or  publicity
     pertaining  to  distribution of the software without specific prior written
     permission. Sun and M.I.T.  make no representations about	the  suitability
     of  this  software  for any purpose. It is provided "as is" without any ex-
     press or implied warranty.

     SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS  SOFTWARE,  INCLUDING  ALL
     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     IN  NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
     DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROF-
     ITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF  THIS  SOFT-
     WARE.

AUTHOR(s)
     Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
     Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se
       Royal Institute of Technology, Stockholm, Sweden
     Jim Randell    [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
       HPLabs, Bristol
     Richard Hess   [ X11 extensions ]	     {...}!uunet!cimshop!rhess
       Consilium, Mountain View, CA
     Dave Lemke     [ X11 version ]	     lemke@sun.COM
       Sun MicroSystems, Mountain View, CA
     Martin Weiss   [ SunView version ]
       Sun MicroSystems, Mountain View, CA

X Version 11		       6.15 (30-Mar-2026)			 maze(6)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=maze&sektion=6&manpath=FreeBSD+Ports+15.1.quarterly>

home | help