You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to port and market games using #python and #pygame.
You've spent two years making a game, but now want other people to see
it?
How do you port it to different platforms, and make it available to
others? How do you let people know it is even a thing? Is your game Free
Libre software, or shareware?
All python related applications are welcome on
www.pygame.org. You'll need a screenshot,
a description of your game, and some sort of URL to link people to (a
github/gitlab/bitbucket perhaps). But how and where else can you share
it?
a few platforms to port to
itch.io and windows
windows store?
mac (for itch.io)
mac store
steam
linux 'flatpack' (latest fedora/ubuntu etc use this like an app
store).
pypi (python packages can actually be installed by lots of people)
android store
web
debian
redhat/fedora
Make it a python package
Some of the tools work more easily with your package as a python
package. Working with all the different tools is sort of hard, and
having a convention for packaging would make things easier.
So, why don't we do things as a simple python package with one example
app to do this? pygame has an example app already, solarwolf -
https://github.com/pygame/solarwolf. With work, it could be a good
example app to use. We can also link in this guide to other pygame
apps that have been distributed on various places.
There are other example apps linked below for different distribution
technology.
The benefit of pynsist is that it can create installers. Whereas
pyinstaller is for making standalone executables (which is good if you
are putting your app on the Steam store for example).
The python package system can mean your app can be available for
everyone who can use pip. Which is an audience in the millions.
Mac
pyinstaller is probably the best option at the moment. If your game is
open source, then you could use TravisCI for free to make builds with
pyinstaller.
Unfortunately you probably need a Mac to make a mac build, test it,
and release on the mac/ios stores. Getting a cheap apple machine off
ebay might be the way to go. Or a cloud account perhaps from
'macincloud'. Also the mac developer program costs $100.
Another option might be to borrow a friends machine to make the builds
when it's time.
With pygame 2 this should be possible since it uses the new SDL2.
If you use LGPL code on iOS you still have to let your users benefit
from the protections the LGPL gives them.
Tom from renpy says... "I've been distributing Ren'Py under LGPL
section 6c, which says that you can distribute it along with a written
offer to provide the source code required to create the executables.
Since Ren'Py has a reasonably strong distinction between the engine
and game scripts, the user can then combine the game data from an iOS
backup with the newly-linked Ren'Py to get a package they can install
through xcode."
renpy/pygame_sdl2#109 (comment)
An apple developer account costs $100, and selling things costs 30% of
the cost of your app. https://developer.apple.com/
Steam
There's a few games released using pygame on steam. Here are two
threads of games released:
Quite a few people have released their pygame games on itch.io.
Android
This isn't really possible to do well at the moment without a bit of
work.
python-for-android seems the best option, but doesn't work well with
pygame. https://github.com/kivy/python-for-android There is an old and
unmaintained pygame recipe included (for an old pygame 1.9.1). With
some work it should be possible to update the recipe to use the SDL2
support in pygame.
There was an older 'pygame subset for android' which is now
unmaintained, and does not work with more recent Android devices.
Web
There's not really an 'export for web' option at the moment. It is
possible with both CPython and SDL as well as SDL2 working on
emscripten (the compiler for WASM and stuff that goes on the web).
How to do that? Well, that's an exercise left up to the reader.
Probably getting it to use pyinstaller, and having them upload the
result somewhere.
One python app that uses Travis and Appveyor is the Mu editor. You can
see how in their .travis.yml and appveyor.yml files. See
https://github.com/mu-editor/mu
Virtualbox
With virtualbox (and other emulators) you can run some systems on your
local machine. Which means you do not need to buy a new development
machine yourself for those platforms.
Both windows and linux images are available that you could use
legally.
Note, that it is good to do your testing on a free install, rather
than testing on the same machine that you made your executables with.
This is because perhaps you forgot to include some dependency, and
that dependency is on the development machine, but not everyone else's
machines.
Each platform has slightly different requirements for icons. This
might be a nice place to link to all the requirements (TODO).
Making a game trailer (for youtube)
You may not need to make the best trailer, or even a good trailer.
Just a screen capture of your game might be 'good enough' and is
better than nothing.
How about making a trailer with pygame itself? You could call it 'demo
mode', or 'intro mode'.
There's a free iMovie on Mac, the Microsoft video editor on windows,
and blender for all platforms. An alternative is to use the python
module moviepy and script your
game trailer.