Programming, Policitcs, and uhhh Pineapples.

Distractions : jsSolitaire

Click to open the game in a new window (PNSFW).

I am currently (when I created this game) a consultant at Merrill Lynch. What I'm actually doing there at the moment? Not much of anything. I don't know how the idea originally came up. But it has to do with me being really bored at work so I figure I'd put all of my free time to good use :)

If you haven't already clicked the link, I decided to implement the classic game of Solitaire using DHTML. I mean, what better way to express my boredom than to use the white collar workers' icon of boredom?

I decided to make it a little bit more risqué, so to speak, and borrowed some images from the Victoria's Secret website. The backgrounds came later, just to spice it up a bit more. I plan on putting together a SMSFW (slightly more safe for work) version and a SFW version soon :D

I wrote the entire script over a period of 4 days with a total coding and testing time of roughly 20-24 hours.

Why do it in DHTML? Well, I guess it has its advantages. No Solitaire on your machine? Not a problem. No internet connection on your machine? Not a problem, download the source and images for the game and put it on a floppy. And I guess I did it for the challenge...trying to write cross browser compatible DHTML (JavaScript/CSS/HTML) is fun and rewarding when you finally nail it.

And yes, as far as I've tested myself, it works in:

  • IE 6 (Win)
  • FireFox 0.9.3 (Win)
  • Netscape 7.2 (Win)

If you find that it works (or doesn't) on other browsers, let me know...I have limited resources to test with.

The end product is perhaps my finest DHTML work to date. The game is fully "skinnable" using CSS only so that you can create new "themes" with no JavaScript or HTML skills at all. I've placed detailed directions in the source files so that almost anyone can come up with a custom theme.

Some general troubleshooting tips:

  • The scoring is almost completely arbitrary...I have no clue how I came up with whatever the hell I came up with.
  • Newer browsers work better :)
  • XP SP 2 may cause problems
  • If you get flickering, check that page caching is set to automatic or enabled. In IE, this is Tools->Internet Options->Settings->Automatically
  • Make sure that JavaScript is enabled
  • The script is somewhat CPU intensive at times. If you have a slow CPU, it may flicker/become buggy
  • This game uses a lot of images...if you're on 56k, please be patient

Update: you can now download all of the game files in a .zip format (only 2.12 MB uncompressed). The JavaScript files are compressed, so they're a bit hard to read, but the CSS files are all intact. If you make some new skins/versions, let me know, I'd like to add them here.

RSS 2.0 Atom 1.0 CDF