Starboard! - XScreenSaver GL graphics suite
The starboard application is a test of a procedure and interface layer which allows some of the GL graphics 'hacks' from the XScreenSaver package to be used as a screensaver for a BOINC application.
Last modified: 3 October 2009
Topics XScreenSaver Meaning of the name Files Release Notes Starboard!
This BOINC application is a test of a build procedure and interface layer which allows at least some of the GL screensaver "hacks" (or "demos" or "modules") written for the XScreenSaver program to be used with BOINC.XScreenSaver
XScreenSaver is a popular and versitile screensaver framework for Unix computers which use the X11 window system. It was written by Jamie Zawinski, and the code is freely available for download from www.jwz.org/xscreensaver The primary component of XScreenSaver is a program which runs in the background (a Unix "daemon"), waiting until the keyboard and mouse are idle for a given period. It then runs one of a variety of independent graphics programs, chosen at random, until someone uses the mouse or keyboard.Each graphics program used by XScreenSaver is called a 'hack'. There are about 180 graphical hacks included in the XScreenSaver 4.18 distribution, though only about 60 of them use GL. (The others use native X11 graphics, and so can be used only on X11, which pretty much means only Unix.) The graphical hacks are modular. Each consists of at least a routine to initialize the graphics window, to render a frame, and to adjust to a change in window size. (There may be other routines as well.) These modules can be compiled with a common main program to create a standalone program which will draw the graphics into a "virtual root" window put up by the XScreenSaver daemon.
The starboard application adds to BOINC an interface layer which translates the BOINC graphics API calls into calls to the proper routines for any of the XScreenSaver graphical hacks. Thus it should be possible to simply compile one of the hacks with this interface layer, without any changes to the 'hack' code itself, and it can be used as a screensaver for a BOINC application.
It seems possible that one could put these elements together in a slightly different combination and write a standalone graphics 'hack' which is invoked by the XScreenSaver daemon and which can communicate with the BOINC core client (perhaps via shared memory). It would be completely compatible with an existing Linux screensaver framework, and would provide a working BOINC screensaver for Linux. But that's another project....
Meaning of the name "Starboard"
The name of this application has several layers of meaning. First of all, a nautical term is appropriate for testing on Pirates@Home. Then there is some history. The GL 'hacks' in XScreenSaver were actually 'ported' to the XScreenSaver framework from a set of modules from a competing screensaver program called xlockmore. What I've done is in some weak sense the opposite of what Jamie Zawinski did for these modules: I ported them the other way, disabling the X11 and glX code in the module so as to obtain just the pure GL code for the screensaver. In sailing the opposite of 'port' is 'starboard', and hence the name.There is yet another meaning to the name. When two boats approach each other under sail the one on starboard tack has the right of way. All sailors know this, but in the heat of a race the crew of the boat on starboard tack may yell "Starboard!" to remind the other boat of who has the right of way. In this sense, "Starboard!" means "here I come, get out of my way." Since the small bit of code I've written might make almost 60 screensavers immediately available to BOINC applications, this is the sense I was thinking of when I gave this app the name. Comming through!
Note also that the rule that the boat on starboard tack has the right of way applies not only to racing, but also to Ultimate Frisbee played with sailboats. ;-)
Files
- starboard.C
- The main program for the BOINC application. The original version simply generated random numbers as the 'work' function, but the current version is a Monte Carlo simulation of Buffon's needle.
- glXhack2boinc.C/h
- This is the primary interface layer. It contains entry points for the BOINC graphics API, and modified versions of some of the interface functions used by XScreenSaver to run xlockmore modules.
- Xfake.c/h
- "Fake" X11 types and functions, stripped down from Xlib.h, Xutil.h, and Xresource.h. Just enough X11 to get glx hacks from XScreenSaver to compile and run under BOINC. Now includes the ability to read an xpm bitmap into a pseudo XImage object.
- xlockmore.h
- The definitions in this file made it possible to compile an xlockmore module into a standalone program, and thus use it as an XScreenSaver hack. It has modified further for use with BOINC.
- xlockmoreI.h
- Some more "internal" pieces of the xlockmore/xscreensaver interface, again modified for use with BOINC.
- xpm-ximage.c/h
- General set of functions to convert images in xpm (X11 pixel map) format to an intneral XImage. One slight modification to build with BOINC.
- Winstuff.C
- Minimal implementations of a few functions which are available on Unix but not on Windows.
Release Notes
Here are more specific notes for particular versions of starboard as they are released:
- starboard 6.01 (29 December 2008)
- Built with the SVN branch "server_stable" release 6.3.14 (r16543). Linux and Mac makefiles adjusted accordingly. Windows version built using MSVC++ 2003. Both the source code and build configurations have been adjusted to accout for the change in BOINC 6 to having the graphics run as a separate executable, rather than as a thread in a single executable. Windows build configuration files have also changed to account for the fact that BOINC source code now uses file extension .cpp rather than the .C extension.
The graphics are again the "impossible cage" mentioned several times below.
- starboard 5.21 (1 April 2008)
- This version was released for the April Fools prank Primates@Home. It is again the glmatrix hack, with DNA letters (A, C, G, T) in darker green. The date and time are hidden in some strips, while others contain hidden words. The words were taken from the output buffer filter which was used to alter Pirates@Home to become Primates@Home. One could interpret the occasional hidden messages in strands of DNA as suggestive of the small differences beteen humans and apes. Or not. There were no significant changes to the application code, and as before it was build with BOINC 5.10.32/r14462.
- starboard 5.19 (1 February 2008)
- This is version takes us back to the glmatrix hack, but with numerals and maths symbols in a spooky electric blue. No significant changes to the application code. Built with BOINC 5.10.32 from the 5.10 branch (/branches/boinc_core_release_5_10/, r14462) to test that this branch is still working. It does, though modulo the same issue which applied to yello 5.13
- starboard 5.18 (22 November 2007)
- This version used the timetunnel hack, with the main image replaced by that of a cooked turkey on a platter. It was released for the U.S. Thanksgiving holiday.
- starboard 5.16 (27 September 2007)
- A problem was fixed in the windows version of a function to get the time of day, which seemed to be causing a "slideshow" effect instead of smooth animation.
- starboard 5.15 (19 September 2007)
- The screensaver graphics thread for this version of starboard is the 'timetunnel' hack from XScreenSaver, written by Sean Brennan. The animation is similar to the opening and closing effects on the Dr. Who television show, but with a slight modification of the graphics in honor of Talk Like a Pirate day.
The code for this hack includes the following noice:
Copyright 2005 by Sean Brennan. 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.- starboard 5.14 (4 July 2007)
- Built with SVN r121933 (BOINC 5.10.6). The graphics are the Decimal variant of The Matrix digital rain (just decimal digits). The strands are colored blood red, and the embedded messages are the names of all 3584 U.S. soldiers killed in the current Iraq war (and 2 names witheld until confirmed), one per thread. B The motiviation is both that today is Independence Day in the U.S. and that this article appeared on the front page of today's local paper.
- starboard 5.13 (2 July 2007)
- Built with SVN r121933 (BOINC 5.10.6). The graphics are now the hex variant of The Matrix digital rain. The strands are gold colored and have some additional embedded messages.
- starboard 5.12 (7 May 2007)
- Built with boinc_core_release_5_9_3. The graphics are the 'Matrix' digital rain, in the classic motif but with text messages hidden in the strands. A Mac version of starboard is now available! The 32 bit versions are released for 64 bit platforms, and the PPC versionfor Mac is released for Intel Macs to run in "emulation" mode.
- starboard 5.09 (10 January 2007)
- This version of the 'glmatrix' hack was built with BOINC 5.7.5 without the throttling modifications to the graphics loop, as a attempt to identify the cause of a periodic pause in the graphics about every 10 seconds. The characters are from the 'DNA' mode of glmatrix, and the color returns to phosphor green.
- starboard 5.08 (8 January 2007)
- This version has some small but interesting modifications. The graphics performance information is only logged to the error output if the graphics have been started. The color of the text has been changed to red, which is appropriate for Pirates@Home (the initial screen looks sort of like blood dripping down the console). The character set has changed from the standard "matrix" glyphs to decimal digits. There is also some buried treasure in the strips, in the form of "secret" messages.
- starboard 5.07 (4 January 2007)
- The screensaver graphics thread for this version of starboard is the 'glmatrix' hack from XScreenSaver. It creates a 3D version of the scrolling rain of characters which appeared in the title sequence of the movie "The Matrix" and sequels. It was written by Jamie Zawinski, who is also the author of XScreenSaver itself. The complexity of the rendering, which uses "texture mapping" to create each glyph, means that this graphics thread could be rather taxing on older hardware. As in other recent versions in this series, the graphics performance is monitored and recorded periodically to the error log. The unix 'man' page for this hack can be found here
- starboard 5.06 (2 January 2007)
- This is similar to 5.05 (still the impossible cage), but without the .NET dependence. It uses the test version of the throttled graphics rendering loop, and reports the graphics status (frame rate and CPU fraction) along with the progress of the Monte Carlo simulation every 5%.
- starboard 5.05 (18 December 2006)
- Built with BOINC 5.7.5 with the 'cage' screensaver hack (see below). The BOINC rendering code has been modified to throttle the graphics thread based on the frame rate or (on windows) the fraction of CPU time used by that thread in a way that is more responsive to changes. Unfortunately, this version was built with a dependence on the .NET libraries, and so will fail on machines that do not have .NET installed.
- starboard 5.04 (28 October 2006)
- Built with BOINC 5.5.16, the last of the 5.5 series. First new release in a long while, with many errors.
- starboard 5.03 (21 January 2006)
- Still the impossible 'cage' screensaver hack.
- starboard 5.01 (16 January 2006)
- Built with BOINC 5.2.15 and the 'cage' screensaver hack (see below).
- starboard 4.14 (23 June 2005)
- The screensaver graphics were changed to the 'antinspect' hack from XScreenSaver, which was written by Blair Tennessy.
- starboard 4.13 (20 June 2005)
- The screensaver graphics were changed to the 'noof' hack from XScreenSaver, which was written by Mark Kilgard, the author of GLUT. A note in the source code says that it was called "diatom" on Irix.
To get this module ported to BOINC required commenting out two lines at the begining of the file. It also requires that the random number generator be functioning correctly, or you get a brown and boring pattern.
- starboard 4.09-12 (18-19 June 2005)
- Various tests of things which were thought to cause errors on Windows XP SP 2.
- starboard 4.08 (17 June 2005)
- The screensaver graphics are now Carsten Steger's hypertorus. Here are the notes from the source code:
This program shows the Clifford torus as it rotates in 4d. The Clifford torus is a torus lies on the "surface" of the hypersphere in 4d. The program projects the 4d torus to 3d using either a perspective or an orthographic projection. Of the two alternatives, the perspecitve projection looks much more appealing. In orthographic projections the torus degenerates into a doubly covered cylinder for some angles. The projected 3d torus can then be projected to the screen either perspectively or orthographically. There are three display modes for the torus: mesh (wireframe), solid, or transparent. Furthermore, the appearance of the torus can be as a solid object or as a set of see-through bands. Finally, the colors with with the torus is drawn can be set to either two-sided or to colorwheel. In the first case, the torus is drawn with red on the outside and green on the inside. This mode enables you to see that the torus turns inside-out as it rotates in 4d. The second mode draws the torus in a fully saturated color wheel. This gives a very nice effect when combined with the see-through bands mode. The rotation speed for each of the six planes around which the torus rotates can be chosen.
This program is very much inspired by Thomas Banchoff's book "Beyond the Third Dimension: Geometry, Computer Graphics, and Higher Dimensions", Scientific American Library, 1990.
/* Copyright (c) 2003 Carsten Steger
. */
- starboard 4.07 (17 June 2005)
- Testing a fix to a problem on some platforms where the MSCOREE.DLL is not found (it should not even be used).
- starboard 4.06 (16 June 2005)
- Testing some changes to how BOINC handles window creation on Windows.
- starboard 4.05 (15 June 2005)
- Recompiled with the current CVS HEAD after a bug was found and fixed in the BOINC API code.
- starboard 4.01 (11 June 2005)
- First release of the starboard application on Pirates@Home, using the 'cage' screenhack written by Marcelo F. Vianna, which shows an "Impossible Cage" based on the paintings of M.C. Escher.
Copyright © 2009 by Spy Hill Research http://www.Spy-Hill.com/myers/help/boinc/starboard.html (served by Islay.spy-hill.com) Last modified: 03 October 2009