glschool(6)

πŸ“¦
version 6.15 Β· 2 versions
, in alpine 3.24, arch rolling, nixpkgs unstable

πŸ’– 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 ✨

  • --visual visual β€” 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-id number β€” draw on the specified window. very "I know a guy" of you.
  • --delay number β€” per-frame delay, in microseconds. Default: 20000 (0.020 seconds.).
  • --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 πŸ’…)
  • --nfish number β€” number of fish. Defaults to 100
  • --acclimit number β€” acceleration limit. Defaults to 8.0
  • --minvel number β€” minimum velocity. Defaults to 1.0
  • --maxvel number β€” minimum velocity. Defaults to 7.0 (ngl, the page literally says "minimum velocity" here too β€” copy-paste moment in the original, not me, I promise 😭)
  • --goalchgf number β€” goal change frequency. Defaults to 50 (frames)
  • --avoidfact number β€” avoidance acceleration factor. Defaults to 1.5
  • --matchfact number β€” match avg velocity acceleration factor. Defaults to 0.15
  • --centerfact number β€” school centering acceleration factor. Defaults to 0.1
  • --targetfact number β€” target attraction acceleration factor. Defaults to 80
  • --distexp number β€” distance weighting exponent. Defaults to 2.2
  • --momentum number β€” momentum. Defaults to 0.9
πŸŽ€ heads up: --display host:display.screen shows up in the synopsis but not in the options list, and --minradius number 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 the RESOURCE_MANAGER property.
  • 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 Β© 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