Moire Screensaver Source

I'm not a big screensaver enthusiast per se, but one of my all time favorite screensavers is definitely Moire from the DirectX 8.1 SDK. It's simple yet visually striking, and it works seamlessly on multiple monitors. It's also hardware accelerated on each monitor without requiring a lot of video card horsepower or CPU time.

moire_screensaver.gif

One thing that always bugged me about Moire, though, was that it chose the same colors over and over. Every time it ran, it would cycle through the same exact color sequences, in the same order.

Well, after digging around (a lot) to find the DX 8.1 SDK that this sample is specific to, I came up with the C++ source for Moire. With the assistance of a coworker more versed in C++ than I, we managed to bundle Moire into a VS.NET 2003 C++ solution. Then I was able to hack in a more sophisticated random color algorithm with my completely negligible C++ coding skillz.

This solution compiles fine on any machine with VS.NET 2003 installed; no DirectX SDK is required. I've attached both the original, unmodified Moire from the SDK and our modified random color version. And if you don't feel like hacking on the source code, I put a binary up as well.

Related posts

Spawned a New Process

Back in September 2008, I mentioned that we were spawning a new process. Well, that process arrived today, and its id is Henry Burton Atwood. We're starting him off right with a little light reading. You may recognize this book from Apple's Mac vs PC ad

By Jeff Atwood ·
Comments

Falling Into The Pit of Success

Eric Lippert notes the perils of programming in C++: I often think of C++ as my own personal Pit of Despair Programming Language. Unmanaged C++ makes it so easy to fall into traps. Think buffer overruns, memory leaks, double frees, mismatch between allocator and deallocator, using freed memory, umpteen dozen

By Jeff Atwood ·
Comments

Respecting Abstraction

In a recent post, Scott Koon proposes that to be a really good .NET programmer, you also need to be a really good C++ programmer: If you’ve spent all your life working in a GC’ed language, why would you ever need to know how memory management works, let

By Jeff Atwood ·
Comments

Recent Posts

Stay Gold, America

Stay Gold, America

We are at an unprecedented point in American history, and I'm concerned we may lose sight of the American Dream.

By Jeff Atwood ·
Comments
The Great Filter Comes For Us All

The Great Filter Comes For Us All

With a 13 billion year head start on evolution, why haven’t any other forms of life in the universe contacted us by now? (Arrival is a fantastic movie. Watch it, but don’t stop there – read the Story of Your Life novella it was based on for so much

By Jeff Atwood ·
Comments
I Fight For The Users

I Fight For The Users

If you haven’t been able to keep up with my blistering pace of one blog post per year, I don’t blame you. There’s a lot going on right now. It’s a busy time. But let’s pause and take a moment to celebrate that Elon Musk

By Jeff Atwood ·
Comments
The 2030 Self-Driving Car Bet

The 2030 Self-Driving Car Bet

It’s my honor to announce that John Carmack and I have initiated a friendly bet of $10,000* to the 501(c)(3) charity of the winner’s choice: By January 1st, 2030, completely autonomous self-driving cars meeting SAE J3016 level 5 will be commercially available for passenger use

By Jeff Atwood ·
Comments