glschool(6)
π glschool(6) β a 3D schooling simulation π
okay bestie, welcome to glschool, a page from the XScreenSaver manual, and lemme tell you, this one is lowkey gorgeous. fish. in 3D. swimming together. it's giving nature documentary but make it screensaver. πβ¨
π SYNOPSIS
glschool [--display host:display.screen] [--visual visual] [--window]
[--root] [--window-id number] [--wireframe] [--fps] [--delay number]
[--nfish number] [--maxvel number] [--minvel number] [--acclimit number]
[--avoidfact number] [--matchfact number] [--centerfact number]
[--targetfact number] [--minradius number] [--momentum number]
[--distexp number] [--goalchgf number] [--fog] [--drawgoal] [--drawbbox]
like, yes, that's a lot of flags. she's thorough. we respect it. π
π«Ά DESCRIPTION
So here's the vibe: glschool uses the Craig Reynolds Boids algorithm to simulate a 3D school of fish. It's a lightly modified version of that algorithm β the mod being that it supports goal attraction, so the little guys have somewhere they wanna be. π―
You can get so many different behaviors just by tweaking the parameters. But β and I need you to hear me on this β no sanity checking is performed on the command line params. None. Zero. Not a vibe check in sight. π So if you wanna use negative accelerations, or a minimum velocity that's larger than your maximum velocity, or honestly just that whole genre of chaos? The simulation will try to digest it. it will attempt. godspeed. π
Aesthetic tip from the page itself: it looks best with the highest number of fish that will give you an FPS of > 25 or so. that's the sweet spot, no cap. π₯
β¨ OPTIONS β¨
--visualvisual β tell it which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual.--windowβ draw on a newly-created window. This is the default, so like, you don't even have to ask.--rootβ draw on the root window. main character energy, taking over the whole screen. π--window-idnumber β draw on the specified window. very "I know a guy" of you.--delaynumber β per-frame delay, in microseconds. Default:20000(0.020seconds.).--wireframe|--no-wireframeβ render in wireframe instead of solid. skeleton fish era π¦΄--fpsβ display the current frame rate, CPU load, and polygon count. the numbers, bestie, show me the numbers π--fog|--no-fogβ whether to show foggy (cloudy) water. π«οΈ--drawgoal|--no-drawgoalβ whether to show the school's attraction goal.--drawbbox|--no-drawbboxβ whether to show the bounding box. π¦--fog|--no-fogβ whether to show foggy (cloudy) water. π«οΈ (and yes, she's listed twice in the original β we love a queen who repeats herself for emphasis π )--nfishnumber β number of fish. Defaults to100--acclimitnumber β acceleration limit. Defaults to8.0--minvelnumber β minimum velocity. Defaults to1.0--maxvelnumber β minimum velocity. Defaults to7.0(ngl, the page literally says "minimum velocity" here too β copy-paste moment in the original, not me, I promise π)--goalchgfnumber β goal change frequency. Defaults to50(frames)--avoidfactnumber β avoidance acceleration factor. Defaults to1.5--matchfactnumber β match avg velocity acceleration factor. Defaults to0.15--centerfactnumber β school centering acceleration factor. Defaults to0.1--targetfactnumber β target attraction acceleration factor. Defaults to80--distexpnumber β distance weighting exponent. Defaults to2.2--momentumnumber β momentum. Defaults to0.9
π heads up:--display host:display.screenshows up in the synopsis but not in the options list, and--minradiusnumber also appears in the synopsis without its own entry. That's just how the original page is written β I'm not out here inventing docs, iykyk. π«Ά
π ENVIRONMENT π
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.
like, these are the invisible hands guiding your fish, bestie. π§
π¦ SEE ALSO π¦
X(1), xscreensaver(1), https://www.red3d.com/cwr/boids
go read the boids link fr fr, it's the origin story β
π COPYRIGHT π
Copyright Β© 2005-2006 by David C. Lambert. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
(translation: go off, build things, just keep the notice π«‘)
π AUTHOR π
David C. Lambert
that's the whole page, bestie β 3D fish, zero sanity checks, one very iconic algorithm. π π
X Version 11 β 6.15 β 30-Mar-2026 π mwah, go make some fish swim β¨
π¦ 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