Electoral College Screensaver 1.1
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
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
The Ruby in the Smoke - Philip Pullman (Audio Book)
Permalink - Comments - Tags: Books
Count Karlstein - Philip Pullman
Permalink - Comments - Tags: Books
Hunter's Run - George R. R. Martin, Gardner Dozois, Daniel Abraham
Permalink - Comments - Tags: Books,GRRM
[First Page] [Prev] Showing page 2 of 5 pages [Next] [Last Page]