maze(6)
π maze(6) β the XScreenSaver manual, but make it a group chat
okay bestie, so you found maze in the XScreenSaver manual and you're like "what is this" β don't worry, I got you. It's a lil X11 demo that keeps building random mazes and then solving them for you, over and over, and honestly it's giving main character energy. π
β¨ NAME β¨
maze β an automated X11 demo that repeatedly creates and solves a random maze. That's it. That's the whole vibe. π
π SYNOPSIS π
maze [--display host:display.screen] [--foreground color] [--background
color] [--window] [--root] [--window-id number][--install] [--visual
visual] [--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 π¦
So the maze program literally just creates a "random" maze and then solves it, with graphical feedback the entire time. You get to watch it figure things out. It's like watching your friend do a puzzle but the friend is a computer and the puzzle is infinite. Obsessed. π
π OPTIONS π
maze accepts the following options, and yes we're going through all of them, no skipping, periodt:
--windowβ Draw on a newly-created window. This is the default, so if you do nothing at all, this is what happens. Slay.--rootβ Draw on the root window instead.--window-id numberβ Draw on the specified window. You gotta give it a number.--installβ Install a private colormap for the window. Fancy.--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. Hex girlies rise. π--grid-size pixelsβ The size of each block of the maze, in pixels. Default is0, which means pick a random grid size. Minimum meaningful value is2. Don't go below 2, it's not a personality trait.--live-color colorβ The color of the path. The one that's thriving.--dead-color colorβ The color of the failed path. Also, important detail: it is also stippled with a 50% pattern. Little dots of sadness. π--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. It's the "girl I already know how this ends" color. π--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. Encirclement as a strategy, we love to see it.--solve-delay integerβ Delay (in microseconds) between each step of the solution path. Default5000, or about 1/200th second. Tiny lil steps.--pre-delay integerβ Delay (in microseconds) between generating a maze and starting to solve it. Default2000000(2 seconds.) A lil breather.--post-delay integerβ Delay (in microseconds) after solving a maze and before generating a new one. Default4000000(4 seconds.) Time to reflect on what we just watched.--generator numβ Sets the algorithm that will be used to generate the mazes. The default is-1, which randomly selects an algorithm for each maze that is generated. Let's meet the cast:- Generator 0 is the original one, and works by walking around randomly until we hit a place we've been before, then backtracking and trying a new direction somewhere. Vibes-based navigation, honestly.
- 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 until 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 continues 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. Name drop! π₯
--max-length numβ Controls the maximum length of walls drawn in one go by generator 1. Only generator 1, bestie. Know the difference.--fpsβ Display the current frame rate and CPU load. Numbers on screen, my beloved.
π±οΈ clicking things (it's a whole section, no heading in the original, but it lives here)
Clicking the mouse in the maze window controls it. Yes, the mouse is in charge now:
- LeftButton β Clears the window and restarts maze. Fresh start, clean slate. β¨
- MiddleButton β Pause or unpause the program. Time-out for the maze.
- RightButton β Exit. Bye bestie. π«Ά
π BUGS π
ngl, there are two known things and we're being honest about them:
- Expose events force a restart of maze. Not ideal, but we deal.
- Mouse actions are based on "raw" values (
Button1,Button2andButton3) instead of using the pointer map. Raw button energy, no pointer map, that's just how it is.
πΈ ENVIRONMENT πΈ
The environment variables it cares about:
DISPLAYβ to get the default host and display number.XENVIRONMENTβ to get the name of a resource file that overrides the global resources stored in theRESOURCE_MANAGERproperty.XSCREENSAVER_WINDOWβ The window ID to use with--root.
π SEE ALSO π
X(1), xscreensaver(1) β go read those too, iykyk.
β COPYRIGHT β
Copyright Β© 1988 by Sun Microsystems, Inc. Mountain View, CA.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright 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 express 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 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
β οΈ okay so that whole block is the legal bit and it is not a vibe, but it is the rules, so keep it intact. All caps means they're serious. π
π AUTHOR(s) π
The icons who made this happen:
- 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
okay that's literally everything, hope you had fun, mwah π this was X Version 11, 6.15 (30-Mar-2026), and it's the maze(6) page β catch you on the next manpage, bestie! πβ¨
π¦ where this page comes from
- alpine 3.24: xscreensaver-doc 6.15-r0 Β· GPL-2.0-or-later GPL-3.0-or-later 0BSD MIT
- arch rolling: xscreensaver 6.15-1 Β· LicenseRef-XScreenSaver
- nixpkgs unstable: xscreensaver 6.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms