[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Introducing Pygame Launcher alpha



Yesterday, I started thinking about a nicer way to distribute pygame
games for Windows users. py2exe sort of does the job, but creating the
binary distribution is still sometimes a bit tricky and the resulting
package will be several megabytes even for simple games (especially if
you use PyOpenGL). This lead to the idea of a launcher application
that could be wrapped once with py2exe and then distribute a bare
minimum amount of data with each game.

The first alpha (simply a proof of concept at the moment) is at
http://people.cc.jyu.fi/~shang/pyg/ . The pyglaunch-alpha1-win32.zip
contains a premade windows executable, all required libraries, the
source and the examples.

The idea is that games could be distributed as a single .pyg file (I
converted some of my old game projects into pygs as an example). The
pyg file is essentially a zipfile that contains a 'py' directory for
source files and a 'resoruces' directory for datafiles such as
graphics. The 'py' directory must contain a 'pygmain' module that has
a function 'run()' that starts the game. Creating the pyg-file doesn't
require py2exe or any other special libraries, so this could also make
it easier for linux game authors to distribute their games to Windows
gamers.

In order to load data files from inside the .pyg instead of the file
system, the game author must import the module 'pyg' and use
'pyg.openfile' when reading files.

Eventually, my plan is to create a friendly windows installer wizard
that associates the .pyg extension with the pyglauncer.exe, so that
you can just double-click on the game package to run it. Currently,
you have to drag-and-drop the pyg files into the pyglauncher.exe (no
GUI) or execute 'pyglauncher.exe game.pyg' from the command line.

The .pyg files could also contain meta-information that could be used
for auto-updating, error reporting etc. The pyglauncher could also
develop into a full blown game browser GUI (such as MAMEw32 for
example) for pygame games.

So, does anyone else think a project like this could be useful? What
kind of features would you like to see in the final product? What
libraries should be bundled with the launcher (the alpha1 binary
release contains a large part of the Python standard library, PyGame
1.6, Numeric 23.5 and PyOpenGL 2.0.1.09, a later release should add at
least PyOpenGLContext and twisted for networking)? Would you be
willing to distribute your own pygame games in .pyg format?

-- 
Sami Hangaslammi