Subservient Blips

September 2nd, 2006

I was pleased by the kind of “cheezy space film” mood David Van Brink’s pointless applet put me in, so I got the wild idea of creating a Mac OS X screen saver out of it.

Since I don’t do Java and am not sure how difficult it would be to use it directly in a screen saver, I decided to do a more-or-less verbatim translation to Objective-C Cocoa. This turned out not to be too much work, and the process I adopted was to paste David’s Java code into my Cocoa source file, #ifdef’d out. I then proceeded to bite of chunks of the code and translate them into equivalent Cocoa. This was motivational because I got visual feedback on my progress, even if it wasn’t too pretty at first:

Some of the bugs were surprisingly charming:




Though not as charming as the final product, with most if not all of the bugs ironed out.

Download Subservient Blips 1.0
Download Source Code (Requires Xcode)

In David’s applet you can add new blips by clicking the window, but in the screensaver that would just stop the screensaver from running. Thanks to Mark Dalrymple for pointing out that I can still grab keystrokes without waking up. Press “b” to add a new blip, and “i” to toggle the stats display.

If you like the screen saver, donate some cash and I’ll split the proceeds with David.

Update: Well, I just can’t put this thing down. I decided to play with the background color and I think this looks just amazing with a medium gray backdrop. I’ve decided to update the binary download with this setting.

If you don’t like it, well, build your own!

13 Responses to “Subservient Blips”

  1. Simone Manganelli Says:

    This is quite an interesting screensaver concept, but I’m not too fond of the actual aesthetics. I think it would look better if the text and the lines on the side and the white boxes were taken out, and then the circles made into glowy particles or something. Just stuff to make it more visually pleasing rather than look like a concept screensaver. I dunno if you’d even be willing to do this — just my thoughts.

  2. dvb Says:

    Dan — honored!

    Yes, this kind of code is much fun to work on because of the ongoing eye candy it produces. Agree++ that the bugs are half the fun!

    Hi Simone — I’m hurt. The “cheezy space film” meme (perhaps “movie” is more correct) is very, very deep in my psyche. I recommend you modify the code to have some screensaver options for “cheeze version” or “modern graphic design version”. :-)

    Dan — I’m curious, do you have to build and install the screen saver for every iteration, or is there a “run-as-screensaver” container of some kind?

  3. Daniel Jalkut Says:

    As far as I know there isn’t a test-harness or anything aside from System Preferences, so that’s what I used to do the testing.

    What I usually do in situations like this is just make a symbolic link in the plugin directory while I’m programming and debugging. That way I at least don’t have to bother with reinstalling to test the changes. You’ll notice in the project I have a second “executable” which points at the script (the path will need to be fixed on your machine) I also included that just restarts System Preferences and opens it up at the screen saver pane. This makes testing iterations pretty fast.

    I expect if I get bitten by the screen saver bug much more than I have been, I’d probably write some simple test harness that just cycled the drawing code in a regular window.

  4. Daniel Jalkut Says:

    And Simon – as to the difference of opinion about the aesthetics – how about making your own version with the source code :)

    I do think it would be cool to parameterize some of the details in a screen saver configuration panel.

  5. Niels Says:

    Very spiffy screensaver. It definitely has a spacey sort of feel to it. Reminds me somewhat of the subtle and deceptively simple usage of lines and simple shapes in the game Homeworld. It would be nice to have some configuration options for colors and the like.

    Great work, hope to see more :)

  6. Daniel Jalkut Says:

    I just tried changing the background to gray and I quite like the look of it..

    http://www.red-sweater.com/blog/images/DVBScreen6.png

  7. Daniel Jalkut Says:

    Hmm – I like gray so much I’ve updated the binary download to use it. I think it will be more universally appealing than the purple. No offense, David :) The gray really lets the colors punch out.

  8. Simone Manganelli Says:

    Lol, I would make my own version of the screensaver but I kind of doubt I’d have the ability to do anything beyond modify the colors of the cheese version. :P

    — Simone

  9. dvb Says:

    Or, positively: “…I”™d have the ability to … modify the colors of the cheese version.”

    And that’s how it starts, my friend.

  10. Ian Says:

    Great fun!

    I’ve added a Configure sheet so you can change the background color and toggle “Simulate Bug 1” mode.
    I’ve also added a debug executable to the project – download Saver Lab from here:
    http://www.dozingcatsoftware.com/SaverLab/SaverLab173.zip
    Pop it in your Applications folder and XCode should be able to launch it when you hit Debug.
    Place a symlink in the ScreenSavers folder to your debug build and away you go, full debugging of the screensaver in a window!

    You can get my additions here:
    http://www.fatbinary.com/SubservientBlips.zip

    Sorry about the sloppy code – I’m doing this in a coffee break at work ;)

    Thanks again for the fun code everyone
    Ian

  11. Daniel Jalkut Says:

    Cool Ian, I will have to check out your changes. I lost steam before I could get to any kind of configuration panel. Maybe I should make a public repository for this thing :)

  12. Ian Says:

    It’s ages since I did anything with screensavers, pre-NSUserDefaults days at least!
    Because of this my config sheet doesn’t ‘remember’ it’s settings because I was using NSUserDefaults whereas screensavers apparently use ScreenSaverDefaults (thanks to CocoaDevCentral where a quick Google led me: http://www.cocoadevcentral.com/articles/000088.php)

    Anyway, I’ve updated the project – the same download link above (http://www.fatbinary.com/SubservientBlips.zip) now gives you the ammended version!
    Oh, the ammended project now has brighter colored blips! (Sorry! I liked them lighter! Maybe ‘blip darkness/lightness’ should be a setting too!)

    Cheers
    Ian

  13. Justin Blanton | Twittervision screensaver for Mac OS X Says:

    […] screensaver for Mac OS X. This may actually replace Jalkut’s Subservient Blips on my machine (at least for a short while; don’t hate me Dan) and temporarily temper my […]

Comments are Closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.