Export your game
Build a program for your system or a folder that runs in the browser (experimental) from the editor.
Under File > Export game… (or the Export button on the ribbon’s Home tab) the editor saves everything and packages the game.
Program for your system
Choose Program for this system, the program name and the output folder. Optionally pick an icon (.icns on Mac, .ico on Windows, .png on Linux). The result runs without the editor and without Python installed.
- The first export downloads PyInstaller into the project’s environment, so it needs internet.
- The program is built for the system you are running the editor on. You can’t build a
.exeon a Mac. - It has only been tested on Apple Silicon macOS.
Browser (experimental)
Choose Browser (web). The editor uses pygbag and builds a <Name>-web/ folder with index.html.
- It needs internet to build and to play: the browser downloads the Python interpreter and pygame-ce from a CDN.
- The folder must be served over HTTP; opening
index.htmlstraight from disk doesn’t work. To test, inside the folder:
python3 -m http.server 8000
and open http://localhost:8000.
- The Platformer template was built and ran in the browser. Audio and gamepad in the browser have not been tested.
From the command line
python -m pgstudio export . --out dist
python -m pgstudio export . --out dist --web
See the command line reference.