Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by PrimeOrdeal, posted on March 31, 2002

Image Description, by PrimeOrdeal

These are a couple of screen shots of my (now freeware) screensaver called GooMachine. The algorithm is an extension of what we used to call a 'sinus' - calculating a sin wave for every pixel on the screen based on the X coordinate, then feeding that value into another sin wave based on the Y coordinate, etc. (i.e. Function Composition).

The stills may be a little interesting, but the full-screen realtime animated version is pretty impressive (IMHO). Some points of interest:
  • With # Curves set to 9 on a 1024x768 screen, over 7 million multiplications and MODs, and over 14 million additions are calculated per frame!
  • The code is reasonably optimized - I get 9 FPS on a HP laptop with a cheesy video card (1024x768x9 waves)
  • DirectX 3.0 or higher (it's pretty simple stuff)
  • The source has the ability to play MIDI files along with the eye candy
  • Has the ability to animate over time (by slowly adding offsets) and by morphing between different curve types (not just sin waves but also with random waves)
  • Free, with source! (VC++ 6.0)
  • Be careful with the roughness setting - it can be a little 'rough' at times.
  • I have yet to make a WinAmp style plug-in, or pipe the output into a height-map viewer, but I'd love to see what anyone else might come up with...

    NOTE: This does not work too well as a screen saver since, for some reason, it leaks very small amounts of resources on each run. I tried narrowing the code down to track this down, but found that DX appears to be leaking. I can run this about 250 times on my Athlon 600 box with 256MB ram before I run out of GDI resources.

    Editor's note: The demo + source code package is available here: (73k)

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

    March 31, 2002, 03:16 PM

    looks weird.

    Albert Sandberg

    March 31, 2002, 03:19 PM

    Looks like a big fuzz for an old plasmaeffect, still however, nice work to see you put it out in a screensaver!



    March 31, 2002, 03:26 PM

    Nice work! It reminds me off the intro scene of The Net (there Sandra Bullock turns on that plasma screensaver ;)

    Bemmu Sepponen

    March 31, 2002, 04:04 PM

    I'm not saying anything since I don't want people to have bad memories of me when I eventually post my own IOTD :-).

    Division By Zero

    March 31, 2002, 06:54 PM

    1) I think its probably worth a comment ... that's a plus
    2) It looks weird ... (plus or minus ? u decide)
    3) It will shorten your monitor's lifetime so it's not good for screensaver ...

    But it looks nice !
    Thats why it`s worth a comment .. ;p


    March 31, 2002, 08:42 PM

    name your .exe to a .scr in the zip file

    screen savers are .scr!


    March 31, 2002, 11:53 PM

    Anyone who doesn't think that this is totally cool obviously didn't spend their uni years stoned with their friends listening to Winamp and watching Giess and MilkDrop :)

    Tim Baker

    April 01, 2002, 01:54 AM

    Agreed AntiCore, how can you not love shit like this? Very nice...


    April 01, 2002, 02:05 AM

    Wow, think this really rocks :o)

    But as I heard it would not make my monitor live longer I will not use it as screensaver... (Oh yes, I LOVE my Realflat)

    The algorithm for that must be really weird, mustn't it?


    April 01, 2002, 02:08 AM

    /me gets a tear in the corner of his eye...

    good times.

    nice j - o - b


    April 01, 2002, 02:23 AM

    I like it, it's a very nice effect! I'm just wondering about it "shortening your monitors lifespan".... ? How?


    April 01, 2002, 03:04 AM

    The screensaver looks really psyceldelic! I have a suggestion for an improvement. Texture your plasma. Instead of letting sin values decide the color, let them decide an offset into a texture. This looks soooo cool, and is very easy to implement. You can see some plasma shit I worked on in 1998 at I never finished it and its not fit for todays speed of computers, but it shows textured plasma.


    PS: I thought it was long time ago screensavers were about increasing (or shortening) the life of your monitor. I have yet to see eg. the Window Start button burned in on any monitor.


    April 01, 2002, 03:55 AM



    April 01, 2002, 06:39 AM

    Well I can tell you that you can noticeably see where my Winamp has sat for the past 4 years I have had this monitor especially when you open up something with a white(ish) background (like Word).

    However all that is about to change since I have just been paid and I hear the calling of a lonely 21" inch monitor:-)


    April 01, 2002, 06:57 AM

    have you been doing drugs again?!
    neat visual distortion

    Wim Libaers

    April 01, 2002, 09:11 AM

    It would also depend a lot on the intensity settings of the monitor. If you set it very bright, it will obviously cause damage faster.
    Also, some monitors have their own burn-in protection that works by very slowly moving the image over the screen (only a few mm). Usually not noticeable.


    April 01, 2002, 10:31 AM

    How would that work?

    I mean, what would it help to move an entirely white background a few mm to one side?

    That would only affect the sides, wouldn't it?

    Wim Libaers

    April 01, 2002, 10:42 AM

    Correct. But it doesn't matter much. Contrast is much more visible than the brightness of the screen. So if the sides of the damage are blurred, it probably won't be very noticeable.

    Hiro Protagonist

    April 01, 2002, 12:13 PM

    It is generally not nice to set registry keys in your software, unless you have an install appllication that comes with an Uninstall option. For the most part people are going to toss this app in a couple of weeks or whenever theyre done with it and they will have no idea that you have set a registry key. No harm done, but when every application does it, it leaves your registry in a cluttered mess. Just bad practice, that's all.


    On another note your demo is very cool.


    April 01, 2002, 12:28 PM

    The complete version (with installer) takes care of this. However, I was a little too rushed for time to rebuild the installer for the IOTD. The URL to the release version (without source, but with the installer) is: GooMachineSetup.exe


    April 01, 2002, 12:30 PM

    It's not that kool for a screen saver anyway - due to the resource leak. But, does it really shorten the life of the monitor? Dunno.

    Thanks for the kind words though...


    April 01, 2002, 12:34 PM

    I'll try and throw a texture in there as the base image, rather than a sine wave... But, with the baby coming my "days are numbered" :^)

    Nice Java intro... I never tried stuff like this in Java, because I thought it would be too slow. Your bump map is impressive.


    April 01, 2002, 07:02 PM

    I worked at a PCS provider for awhile, and all the customer service people left their computers on all the time with no screensavers. The company's logo, which was the desktop image, was burned into every monitor. That's the only time I've ever seen burn-in, and it took several years.

    Johnny Svensson

    April 13, 2002, 06:39 PM

    If u decide to use the sin/cos values as offsets for a texture instead of treating them like a color, u should really consider bilinear interpolation or it will probably look really crappy ;)
    i guess it's just my $0.2

    This thread contains 24 messages.
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.