Gravity Screensaver


May 25 - Just released the latest version which includes a "no trail" mode. Not a huge deal, just shows I'm still working on Gravity. Also, Gravity has been featured on a few cool sites, namely and VoodooExtreme. Big thanx to all those who put it up on their sites. If you have, let me know and I'll mention ya here. My personal favorite is a quote from VoodooExtreme:

Gravity screensaver - 3:00pm MDT - Billy "Wicked" Wilson God knows how I love 3D accelerated screensavers! 3DFiles sends word that Blaine Hodge has released a new version of his Gravity Screensaver. Here's the description on this one:

Thanx, Billy.

Download - The latest version. - The source code.


The screen saver is basically a small simulation of particles acting on each other with gravitational force. And by simulation, I mean I have tweaked a few things with the physics model to make it more visually appealing. It uses OpenGL to render the particle movement (rather well I might add). Just run it to find out.

There are two modes, erode and regular. Erode takes a copy of you desktop and eats it like a worm through an apple. Standard mode just looks plain cool. Please don't hesitate to make suggestions you feel would add to the program.

The actual graphics load is very minimal. Microsoft's software OpenGL that comes with Windows works just fine, though I do recommend 24-bit, or atleast 16-bit, color for maximum viewing pleasure. It is the actual physics computations that are CPU intensive and time consuming. I have a few ideas and will look into other methods of increasing performance without the loss of detail (it's all in the details).

And yes, for all you Y2K compliancy freaks, it is as Y2K compliant as the Windows operating system and Microsoft's screen saver library. No dates were used in the making of this program. Oh man, is that old news. I also have it upon good authority that Gravity runs perfectly fine with Windows 2000 (W2K) and Windows ME.


Windows 95, 98, NT4+, 2000, or ME
OpenGL (OpenGL comes with Windows 95 OSR2, 98, and NT. Otherwise it can be downloaded from here.)


Copy the file Gravity.scr into your \WINDOWS\SYSTEM directory.

Set the screen saver to 'gravity' under your Display Settings. You can find this under Display in the control panel, the Screen Saver tab.


Change to a different screen saver under display settings or otherwise disable the gravity screen saver.

Delete the file gravity.scr from your \WINDOWS\SYSTEM directory.

No fancy install/uninstall program, that would have been much larger than the actual program itself.


Blaine Hodge

Known Bugs

The "worms" will be rendered over top any window that lies over the screen saver preview box. Kinna neat actually. Will look into it later. Apparently, the result of direct writes to video memory, bypassing window clipping.

Only operates on the primary monitor in a multiple monitor setup (ie. mine). Seems to be a bug in the screen saver library that comes with Visual C++. Someone sent me a version compiled with Visual C++ 6.0 and it was fixed.

Version History

Version 1.4 - May 25, 1999
Just quickly, added a new mode whereby the particles' trails are erased each frame. You get a better idea of the motion involved and can clearly see the orbits as they happen.

Version 1.3 - May 7, 1999
Petri Hodju has given me a better fix for Riva TNTs that he says fixes the line smoothing on TNTs. Could people with said video card please e-mail back in the next week whether it works or not? Phil Brewer suggested an option to control the refresh time. It has been added. Just enter the time in seconds.

Version 1.2 - May 5, 1999
Fixed the Riva TNT problem. Added an option to disable line smoothing, seeing as how the TNT's OpenGL can't handle it.

Version 1.1 - Mar 18, 1999
Minor tweaks and performance enhancements.

Version 1.0 - Jan 15, 1999
Almost complete code rewrite (much cleaner). Replaced octrees with BSP trees (better performance). Various tweaks and changes.

Version 0.4 - Jan 13, 1999
Minor tweaks and adjustments.

Version 0.3 - Jan 8, 1999 (needed sleep)
Added control to change number of particles. Tweaked physics engine (more speed). Added custom color control.

Version 0.2 - Jan 7, 1999 (a few hours later)
Added 3D mode (I love OpenGL).

Version 0.1 - Jan 7, 1999
Initial release.

Ye Olde Standard Displaimer

There are no warranties concerning this software, either expressed or implied. The developer of this software is not responsible for any failures, problems, or loss of data resulting from the use of this program or source.

It's freeware, what do you expect?