Skip to main content

distributing — wiki

This page is intended to hold some of the gotchas that you need to be mindful of when distributing a game:

  • Not all systems have the Arial font (it's not free to distribute) Consider using the free Bitstream Vera fonts instead.
  • Not all systems are able to play MP3 files. Use Ogg Vorbis files instead (they're smaller and higher-quality to boot).
  • Mac OS X seems to have trouble loading small Ogg Vorbis files. Use WAV files for sound effects.
  • Use os.path.join to construct paths to files.
  • UNIX-based OSes have case-sensitive filesystems so open("foo.png") will not work if the file is actually called "FOO.png" or "foo.PNG".
  • Always open binary files in binary mode. This means "wb" or "rb" as flags to open() or file(). Pickle files are binary files.

There's also some things to think about in the actual packaging:

  • Use ZIP or TAR / GZIP to bundle your entry as these are more likely to be supported than more obscure formats like RAR.
  • Always put all your files in a directory.
  • You should put a READMEtxt file in the distribution which includes:
    • who wrote the code
    • who created the artwork
    • how to run the game
    • the licence for the game (the Free Software Foundation has a handy page of free software licenses
    • what dependencies need to be installed
  • If possible, you should bundle other libs you've used. If it's pure Python, then it may be bundled straight. If not, then consider including the source for the library.
  • Don't ship .pyc files with your game (unless you're not shipping the .py files, of course)