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/
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.

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

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:

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:
Costs $100 to join up and sell a game on this store. https://partner.steamgames.com/
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/SteamworksPy
Made 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."
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).
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.
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.

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/distributing

Things 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...
Of course the python world is a tiny place compared to the entire world.



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

ROSHIYA said…
Enact Roku connect, go to Roku.com/link roku.com link account enter Roku interface code showed on Roku TV. My roku com interface not working utilize new Roku code.To download click for more details..Activate Roku.com link Roku.com/link account enter Roku com link code displayed on Roku TV. My roku com link not working use new Roku code Roku enables you to Roku.com/link watch free and paid video content on your TV by means of the Internet. For Activating Roku, go to connect record enter Roku com connection code showed on Roku TV.

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.

ROSHIYA said…
Roku OS is the UI accessible on all Roku forms. Roku.com/link A portion of the accompanying capacities are not accessible on all adaptations. I'll tell you when that is the situation. Roku OS gives cross-stage search, voice search, and other programming highlights. You need a Roku record to institute Roku.com/link your contraption and access redirection. There are no month to month gear rental costs. Counting a portion method lets you adequately rent/buy movies or purchase in to surely understood organizations.Roku.com link - get started with roku account Roku.com/link creation, find roku activation code,link and activate roku device, add channels

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
ROSHIYA said…
office it the pile of office office.com/setup gadgets to make your working smooth and effective.visit: to downloaded in your PC with the smart help.Endeavor which is amazingly office.com/setup easy to present, download and recoup. Usage of it is moreover fundamental and the customer can pick up capability with the use of it adequately. Online Support&help elective is in like manner open in all application which gives a minute guideline.Microsoft Office is an application office.com/setup software. It is used in most of the businesses and organizations Install office setup on your Pc's to get best advantage of it. mostly used tasks are ms-word, Ms-excel and Ms-powerpoint.

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:

ROSHIYA said…
On the off chance that client office.com/setup needs to utilize the Office setup on the web, by then open the web program you are utilizing on your framework and visit office setup today. office it the heap of office devices office.com/setup to make your working smooth and effective.visit: office.com setup to downloaded in your PC with the shrewd help. office setup is the best office.com/setup programming which is exhaustively utilized in globe .It is a shocking association that causes you release your best contemplations, complete things, and stay related on the go.for more

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.

ROSHIYA said…

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.
ROSHIYA said…
Mcafee.com activate- 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 mcafee.com/activate issue. We give best foundation advantage. visit today.Activate mcafee antivirus mcafee.com/activate with 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 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.
ROSHIYA said…
Mcafee.com/activate- Find the easy mcafee.com/activate 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 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.
ROSHIYA said…
All you have to do is to amazon.com/mytv activate your Amazon Prime Video on amazon.com mytv using the activation code you retrieve .amazon Payment Products. Amazon amazon.com/mytv Rewards Visa Signature Cards; Amazon.com Store Card; Amazon Business Card; Amazon Business Line of Credit; Shop with Points; Now enter the activation or amazon.com/mytv verification code that appears on your tv display. 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. 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.
ROSHIYA said…
All you have to do is to amazon.com/mytv activate your Amazon Prime Video on amazon.com mytv using the activation code you retrieve ...amazon Payment Products.amazon.com/mytv Amazon Rewards Visa Signature Cards; Amazon.com Store Card; Amazon Business Card; Amazon Business Line of Credit; Shop with Points; Now enter the activation or amazon.com/mytv verification code that appears on your tv display. 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.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.

ROSHIYA said…
All you have to do is to amazon.com/mytv activate your Amazon Prime Video on amazon.com mytv using the activation code you retrieve ...amazon Payment Products.amazon.com/mytv Amazon Rewards Visa Signature Cards; Amazon.com Store Card; Amazon Business Card; Amazon Business Line of Credit; Shop with Points; Now enter the activation or amazon.com/mytv verification code that appears on your tv display. Amazon Prime Video is one of the most amazing and interesting platforms to watch.Amazon Instant Video application on your LG TV or Blu-ray Player and then Prime Instant Video to start watching.

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.
ROSHIYA said…

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:
ROSHIYA said…
norton web security is consistently used norton.com/setup antivirus gives minimal requesting to use and most intutive affirmation for your PC and your mobiles .present it and imprudence viruses,spyware,root-units - , hackers.for more nuances visit:

Presh said…
Men, this is great for me especially. I find this article very helpful
Sunrise said…
Always giving us the best update, thank you for this information. check this site below for amazing article.
Best investing Apps for beginners
O2Tvseries
PayPal Login
Yahoo Mail Login
Truecaller App Download APK
Facebook Dating on Desktop
Jamb Scholarship
Sunrise said…
You are really doing a great job for developers here ... Thanks for your support ... check this solution out Facebook login code
Peniel Rita said…
Thanks for the game update sharing. I really do hope you can take a second to check on this.
Madeboost said…
I must say I'm really impressed by the nice write-up you have here. You actually did a great job, unlike most bloggers I've seen on the internet talking about topics like this. Just by reading the first few paragraphs, I was already hooked up. Bravo and keep up the good work.

I would really appreciate it if you read this blog and leave a comment.
Slot said…
เอาเยอะๆไปสิ
ambbet

Popular posts from this blog

Draft 3 of, ^Let's write a unit test!^

Is PostgreSQL good enough?

post modern C tooling - draft 6