Thursday, January 23, 2014

Phyiscal Maps and PGU GUI for Pygame

Classes are going slowly at the start of the year.  My son has been working on a program to manipulate a map of Palo Alto, based on the city's bicycle routes.  In the first class, he got the map to display, navigate, bounds checking, and jump to a specific location.  In the second class he started to build the menu for the touchscreen.

Since he's building basic widgets such as buttons on a regular basis, I looked at what type of pre-built widgets are out there.  The lead GUI toolkit for Pygame appears to be PGU.  I downloaded it, but did not develop any applications with it yet.

We blew through half the class last night trying to figure out how to get the background transparency working on a sprite sheet.  We finally got it working with Surface.subsurface(rect).  I should have realized this earlier since I wrote this blog post last month about slicing algorithms using subsurface.