Electoral College Screensaver 1.2

October 24, 2008, 12:00 am

Fixed up states that were exactly tied to show up purple (previously they were displayed blue, no Democratic bias here).

Permalink - Comments - Tags: Electoral College,Development

Electoral College Screensaver 1.1

October 15, 2008, 12:00 am

Made some cosmetic changes to the main Electoral Vote count bar and the per state info in the corner.

Permalink - Comments - Tags: Electoral College,Development

Electoral College Screensaver 1.0

October 10, 2008, 12:00 am

This ScreenSaver accesses the Internet to download a compilation of polling data for Democratic and Republican candidates in US Presidential Elections. Polling percentages for each candidate are used to determine a winning candidate and the states are coloured accordingly. A indicator bar at the bottom of the screen shows the Electoral College totals for each candidate. Electoral Votes "won" with more than a 4% up or down margin of error are displayed in a darker colour than those within the margin of error.

This screensaver is developed in C++ and uses the Ogre SDK to perform the onscreen rendering.

There were a handful of technical hurdles that required more interesting solutions:

  • The Electoral Vote data is not accessed directly by the screensaver (and be subject to changing data formats). Instead I use a python script to scrape the data daily and update to an XML file hosted on my domain.
  • I was not able to find detailed geographic data for the United States online, so I wrote a python drawing utility to cut textures out of a larger bitmap. I used a Google maps image to slice out each state texture.
  • I wanted to avoid the UI blocking on startup, so I implemented the WinHTTP requests in a seperate thread.
  • The OGRE SDK is a rich C++ interface and designed with the assumption that client code will use implicit linking. The is fine for most applications where the OgreMain DLL is in the run directory for the application. Because the screensaver has to run in the system32 directory, I had the onerous choice of writing a complicated thunking layer for the rich set of classes in OgreMain or add my install directory to the path. With a few weeks to go till the election, I chose the latter.

Permalink - Comments - Tags: Electoral College,Development

Fixed A1:I8 bug ...

May 13, 2008, 12:00 am

Thanks to Nathan Kruser for pointing out a bug plotting LOS from A1:I8. This is fixed now

Permalink - Comments - Tags: Heroclix,Development

Browser Fixes and UI Done

October 25, 2007, 12:00 am

I have fixed up alot of the browser problems I was having and the utility now works in Firefox, Safari and Opera and works in IE with slightly limited functionality (doesn't support loading XML driven maps).

Permalink - Comments - Tags: Heroclix,Development