Draft of, "How to port and market games using #python and #pygame."
This is a collaborative document, and a really early draft. Please feel free to add any tips or links in a comment here or on the reddit post https://www.reddit.com/r/pygame/comments/9aodt7/collaborative_doc_lets_write_pygame_distribution/
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.Python packaging guide - http://packaging.python.org/
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.
pyinstaller
https://www.pyinstaller.org/This can make ones for linux, windows, and mac.
pyinstaller --onefile --windowed --icon=icon.ico
.py
Windows
pynsist and pyinstaller can be used.https://github.com/takluyver/pynsist
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).
Windows code signing
- https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Win-Code-Signing
- https://docs.microsoft.com/en-us/windows/uwp/packaging/create-certificate-package-signing
Flatpak
apps on linux - https://flatpak.org/Here's an example of making a pygame one. https://github.com/flathub/flathub/pull/478
Developer guide for more detail here - http://docs.flatpak.org/en/latest/
pypi
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.
See:
- https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing
- https://developer.apple.com/macos/distribution/
- https://developer.apple.com/support/code-signing/
iOS
It's not easy, but possible.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." https://github.com/renpy/pygame_sdl2/issues/109#issuecomment-412156973
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:- https://www.reddit.com/r/pygame/comments/87q9fr/i_just_published_my_game_the_four_colour_theorem/
- https://www.reddit.com/r/pygame/comments/4ck5zv/released_a_pygame_game_on_steam_after_3_years_of/
- https://www.reddit.com/r/pygame/comments/3j6zvr/with_help_from_you_guys_my_first_game_launched_on/
Recently someone used pyinstaller to package thier game.
pyinstaller --onefile --windowed --icon=icon.ico
.py
SteamworksPy
A python module for the C++ steam sdk. https://github.com/Gramps/SteamworksPyMade by someone who has released their game (using pygame) on steam.
Itch.io
"itch.io is an open marketplace for independent digital creators with a focus on independent video games."- creators FAQ - https://itch.io/docs/creators/faq
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).Here is the latest 'cpython on web' project. https://github.com/iodide-project/pyodide
Building if you do not have a windows/mac/linux machine
CI tools
If your game is open source, you can use these systems to build your game remotely for free.- Appveyor (for windows) https://www.appveyor.com/
- Travis (for linux and mac) https://travis-ci.org/
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.
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
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.
Writing portable python code
Some old (but still valid) basic advice on making your game portable: https://www.pygame.org/wiki/distributingThings like naming your files case sensitively.
Announcing your game.
Generic Indie game marketing guides all apply here.Some python/pygame specific avenues for marketing and announcing...
- post a 'release' on the pygame website
- mention it on the pygame reddit (and python reddit perhaps)
- announce on the python announce mailing list (https://mail.python.org/mailman/listinfo/python-announce-list)
- get your blog listed on planet with your 'python' tag. (open an issue https://github.com/python/planet/issues)
- mention @pygame_org or #pygame for retweets
Icons.
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.
OBS is pretty good multi platform free screen capture software. https://obsproject.com/download
Animated gif
These are useful for sharing on twitter and other such places, so people can see game play.You can save the .png files with pygame, and convert them to a gif with the 'convert' tool from imagemagik.
# brew install imagemagick # sudo apt-get install imagemagick # call this in your main loop. pygame.image.save(surf, 'bla_%05d.png' % frame_idx)
Now you can convert the png files to
convert -delay 20 -loop 0 bla_*png animated.gif
Some solutions on stack overflow.
Comments
Roku enables you Roku.com/linkto watch free and paid video content on your TV by means of the Internet. For Activating Roku, go to record enter Roku com connection code showed on Roku TV.Roku empowers you Roku.com/linkto watch free and paid video content on your TV by methods for the Internet. For Activating Roku, go to www.roku.com associate record enter Roku com association code appeared on Roku TV.Roku gives the least complex Roku.com/link approach to stream excitement to your TV. With a large number of accessible channels visit here for more subtleties.
Roku enables you to watch free Roku.com/link and paid video content on your TV by means of the Internet. For Activating Roku, go to record enter Roku com connection code showed on Roku TV.Roku empowers you to watch free and Roku.com/link paid video content on your TV by methods for the Internet. For Activating Roku, go to roku.com associate record enter Roku com association code appeared on Roku TV. Initiate Roku tv, go to roku.com link Roku.com/link record enter Roku com connection code showed on Roku TV. My roku com connect not working utilize new Roku code
Microsoft Office Setup is the office.com/setup complete bundle of Microsoft programs as it takes to the a variety of jobs, servers, and affiliations like PowerPoint, Excel, Word, Outlook, Publisher, OneNote, and Access.office setup is the best programming which is broadly utilized in globe .It is a dazzling association that causes you release your best contemplations, complete things, and stay related on the go.for more subtleties visit: today.Be more innovative and accomplish office.com/setup what is important with Outlook, OneDrive, Word, Excel, PowerPoint, OneNote, SharePoint, Microsoft Teams, Yammer, and that's only the tip. For more details go through the links:Microsoft Office Setup is the full office.com/setup suite of Microsoft utmost programming that joins a mix of livelihoods, affiliations, and server like Excel, PowerPoint, Word, OneNote, Publisher, and Access. Get to know more details visit the links:
Download office 365 with office.com/setup our assistance group without completing any work independent from anyone else.In case customer needs to use the office.com/setup Office setup on the web, by then open the web program you are using on your structure and visit office setup today.Get your Office Setup Installed office.com/setup with the help of the best help team. You may install the complete office 365 package without any complicated work.
Mcafee login To Activate your mcafee.com/activate 25 Digit Product Key Login Mcafee on your PC with ... You can without much of a stretch sign into your mcafee my account and activate the product visit here.Mcafee.com/activate- Find the easy way to download, install and activate McAfee Antivirus, type the 25-digit product key at mcafee.comactivate. Protect your PC from virus, spam, spyware, and malware. McAfee provides the latest antivirus software, spyware removal and internet security for your home or home office.Present mcafee thing with no issue. mcafee.com/activate We give best foundation advantage. visit today.Activate mcafee antivirus with mcafee.com/activate the highly professional tech team and get rid of antivirus from computer click the link for more details.
mcafee antivirus is broadly mcafee.com/activate utilized antivirus recognizes and kill PC infection, the infected mail ,the malware programs,and enables your framework to free of infection and other malware is a serious every day challenge.McAfee Activate! you can mcafee.com/activate start incitation with enter thing code/key at and visit for more nuances.It is unsurpassed best mcafee.com/activate defensive antivirus and against spyware .It is ongoing security innovation and it is more secure.
mcafee antivirus is broadly mcafee.com/activate utilized antivirus recognizes and kill PC infection, the infected mail ,the malware programs,and enables your framework to free of infection and other malware is a serious every day challenge.McAfee Activate! you can start mcafee.com/activate incitation with enter thing code/key at and visit for more nuances.It is unsurpassed best defensive mcafee.com/activate antivirus and against spyware .It is ongoing security innovation and it is more secure.
mcafee antivirus is broadly mcafee.com/activate utilized antivirus recognizes and kill PC infection, the infected mail ,the malware programs,and enables your framework to free of infection and other malware is a serious every day challenge.McAfee Activate! you can start mcafee.com/activate incitation with enter thing code/key at and visit for more nuances.It is unsurpassed best defensive mcafee.com/activate antivirus and against spyware .It is ongoing security innovation and it is more secure.
Amazon Instant Video application amazon.com/mytv on your LG TV or Blu-ray Player and then Prime Instant Video to start watching. Amazon.com mytv is a amazon.com/mytv registration portal of Amazon Prime from which members can watch thousands of movies and TV showsThe instant video service can only amazon.com/mytv be watched after registering your device with a simple subscription code.
Amazon Instant Video application amazon.com/mytv on your LG TV or Blu-ray Player and then Prime Instant Video to start watching.Amazon.com mytv is a registration amazon.com/mytv com portal of Amazon Prime from which members can watch thousands of movies and TV shows The instant video service can amazon.com/mytv only be watched after registering your device with a simple subscription code.
Amazon Prime Video is one of the most amazing and interesting platforms to watch.Amazon Instant Video application amazon.com/mytv on your LG TV or Blu-ray Player and then Prime Instant Video to start watching.
Antivirus is the need of norton.com/setup PCs that makes them sickness free and we are going to give you full help to get the best antivirus exhibited in your PCs and workstations. Download norton antivirus store up with us today.norton web security is generally norton.com/setup utilized antivirus gives the least demanding to utilize and most intutive assurance for your PC and your mobiles.Install the norton.com/setup on your Android gadget and disregard viruses,spyware,root-units, programmers.norton web security is broadly norton.com/setup utilized antivirus gives the least demanding to utilize and most intutive insurance for your PC and your mobiles .introduce it and disregard viruses,spyware,root-units, hackers.for more subtleties visit today.
norton web security is ordinarily norton.com/setup utilized antivirus gives the least asking for to utilize and most intutive certification for your PC and your mobiles .present it and carelessness viruses,spyware,root-units - , hackers.for more subtleties visit:Antivirus is the need of PCs that norton.com/setup makes them ailment free and we are going to give you full help to get the best antivirus showed in your PCs and workstations. Download norton antivirus store up with us today.norton web security is regularly norton.com/setup utilized antivirus gives the least asking for to utilize and most intutive confirmation for your PC and your mobiles .present it and carelessness viruses,spyware,root-units - , hackers.for more subtleties visit:
Best investing Apps for beginners
O2Tvseries
PayPal Login
Yahoo Mail Login
Truecaller App Download APK
Facebook Dating on Desktop
Jamb Scholarship
I would really appreciate it if you read this blog and leave a comment.
ambbet