02 April 2006

PyWeek Finished

I finally got a good night's sleep last night, but I'm still exhausted. The whole Saturday was nothing but coding and play testing. There is still a lot of room for improvement and we didn't have time to add sounds and music this time, but I'm overally quite happy with what we came up with in a week, considering we only had time to work on the entry during evenings.

If you want to try our game (titled "Steam Run"), you can download the Windows installer here, or the Python source code here (requires Python 2.4, Pygame and PyOpenGL).

3 Comments:

Anonymous Anonymous said...

Dude that's awesome. =D.

Amazing to get all that done in so little time. Sweet particle effects in the steam.

Small python technical Q tho; How did you manage to get 'absolute' imports working. E.g:

from pygext.gl.shapes import Bitmap

when pygext's parent directory (steamrun) isn't in the local PYTHONPATH environment variable? I'm trying to figure out how to do this in my own pygame project at the moment and it's got me very confused.
Thanks!

11 April, 2006 11:28  
Blogger shang said...

re: absolute imports

In addition to PYTHONPATH, there are a few static locations that are always in the module search path. The first one (i.e. sys.path[0]) is always guaranteed to be the directory that contains the initial script (in this case play.py).

Also, you are free to modify sys.path yourself in your game code, so if you have libraries under 'lib/src' (relative to your main script), you can add it to you module search path by calling

sys.path.append(os.path.join(sys.path[0], 'lib', 'src'))

11 April, 2006 13:22  
Anonymous Anonymous said...

Arrhah, cheers.

Turned out I forgot to checkin __init__.py. Works like a dream now. =D. Thanks for opening all your source too though. Is an awesome learning tool for someone fairly new to opengl dev.

foot

12 April, 2006 11:00  

Post a Comment

<< Home