glschool(6x)

✨ glschool ✨

okay bestie, so this is glschool from the XScreenSaver manual β€” a 3D schooling simulation and honestly? it's gorgeous. πŸ’–


🌊 NAME 🌊

glschool β€” it's a 3D schooling simulation. fish. in 3D. schoolin'. that's the whole vibe. 🐟🐟🐟


πŸ“œ 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]

periodt. every single one of those flags is real and we're gonna go through ALL of them, no skipping, no cap. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

So it uses the Craig Reynolds Boids algorithm to simulate a 3D school of fish. It's a lightly modified version of that algorithm, and the modification is that it also supports goal attraction β€” like, the fishies have somewhere to BE. iconic behavior honestly.

You can get so many different behaviors just by tweaking the parameters. Lowkey the fun part. BUT β€” and listen to me on this one bestie:

No sanity checking is performed on the command line params. So if you wanna pass negative accelerations, or a minimum velocity that's bigger than maximum velocity, or that sort of thing… the simulation will just try to digest it. πŸ’€ it will simply eat it. good luck to it.

Also, for peak aesthetics: it looks best with the highest number of fish that will still give you an FPS of > 25 or so. Find that sweet spot, it's giving optimized. ✨


πŸŽ€ OPTIONS πŸŽ€

  • --visual visual β€” Which visual to use. Legal values are the name of a visual class, OR the id number (decimal or hex) of one specific visual. your choice, queen.
  • --window β€” Draw on a newly-created window. This is the default, so if you say nothing, this is what you get. 🫢
  • --root β€” Draw on the root window.
  • --window-id number β€” Draw on the window you specify. very "I want it THERE" of you.
  • --delay number β€” Per-frame delay, in microseconds. Default: 20000 (that's 0.020 seconds.).
  • --wireframe | --no-wireframe β€” Render in wireframe instead of solid. skeleton fish arc. 🦴
  • --fps β€” Display the current frame rate, CPU load, and polygon count. numbers go brrr. πŸ”₯
  • --fog | --no-fog β€” Whether to show foggy (cloudy) water. spooky murky vibes. 🌫️
  • --drawgoal | --no-drawgoal β€” Whether to show the school's attraction goal. like a lil target the fishies are obsessed with.
  • --drawbbox | --no-drawbbox β€” Whether to show the bounding box.
  • --fog | --no-fog β€” Whether to show foggy (cloudy) water. (yes bestie, it's listed twice in the original. we're keeping BOTH. slay duplication πŸ™ˆ)
  • --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 (yep, the description says "Minimum velocity" right there in the source. copying it exactly, don't look at me 😭)
  • --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

🌸 ENVIRONMENT 🌸

the environment variables said hi, bestie:

  • 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.

πŸ¦‹ SEE ALSO πŸ¦‹

go read about boids fr fr, it's iconic 🐦


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.

like… free to use, just don't remove the notice, and no promises it won't explode. standard. πŸ’…


⭐ AUTHOR ⭐

David C. Lambert. the literal main character. 🫢


and that's the whole page bestie!! this one shipped as part of X Version 11, version 6.17-1.fc44, dated 13-Oct-2026. go forth and make a beautiful school of fish, you've got this πŸ’–βœ¨πŸŸ

πŸ“¦ where this page comes from