Py2Exe – Packaging my Python Game

I’m building Eccoes in Python. One of the problems with Python is that not everyone has it. That makes distributing my game all the more difficult. I added some GUI elements to my game yesterday to build a menu using PGU. I also moved all the classes my game uses into some sub folders to better organize it. After these two changes my game would no longer build using py2exe. I tried to point py2exe at the eccoes.py file inside the eccoes package and it could not resolve the dependencies. It also couldn’t grab the graphics files I needed to use PGU. I finally figured it out, but it was a mess. I ended up moving my launching code to the root folder, and through trial and error figured out how to include the assets for PGU.

Resources that I found helpful:

After installing PGU I copied the graphics from C:\python26\share\pgu\themes\default into the same folder as my executable.

I’m planning on distributing my tech demo of the game soon. I need to figure out what license I’m required to distribute it under. I think most of my libraries are L-GPL, so…I’m actually okay there. My graphics, placeholders for now, are licensed under a version of the Creative Commons. I’m thinking I’ll want to do GPL, but I don’t know if anyone is interested in this yet.

This entry was posted in Eccoes, Neat Tricks. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.