PYBLOCKS / DOCS
Export a Windows game
Turn your project into a standalone game folder that runs on Windows without Python or PyBlocks installed.
#Before you export
- Open a project. The scene that is open must be saved with a name (not
Untitled Scene) and contain objects. - Fix block errors: an included scene with critical diagnostics stops the export with an
Export Blockedmessage and lists them in the Problems panel. - If you use Lab blocks, load their modules in PyBlocks Lab first.
- Every sprite, sound, animation clip and font your scenes reference must exist in the project folder.
Project → Project Settings stores the defaults the export dialog starts from: Game Name:, Developer Name:, Version:, Start Scene:, Width:, Height:, Window Mode: and Game Icon:.
#The Export Game dialog
- Choose
Project → Export Game...or press Ctrl+E. - Check
Game Name:andDeveloper Name:. The developer name also becomes part of the folder where the game stores saves and logs, so use your own. - Click
Choose...to pick theOutput Folder:. - Optionally pick a
Game Icon:withSelect From Project.....icois recommended;.png,.jpg,.jpeg,.webpand.bmpare converted. The icon must be inside the project; use a square image of at least 256×256. - Set
Width:,Height:andWindow Mode:(WindowedorFullscreen). - Under
Scenes In Build, tick the scenes to include and order them withMove Up/Move Down. The first ticked scene is index0 (Start): the game starts there. - Click
Export Windows .exe.
A progress window shows each step, and a message confirms the output folder when the export finishes. The dialog says Fast export when the bundled PyBlocks Player is available: the game is packaged in seconds and players do not need Python.
#What the export contains
<Output Folder>\
└── <Game Name>\
├── <Game Name>.exe the PyBlocks Player, renamed, with your icon
├── _internal\ libraries the player needs
└── GameData\
├── build_manifest.json
├── scenes\ one .pbscene.json per included scene
├── assets\... only the files your scenes use
└── plugins\ Lab modules (only if your scenes use them)PyBlocks copies only the assets that the included scenes use (sprites and their slice data, animation clips and their frames, audio and font files), keeping the same relative paths as in your project. Files that no included scene uses are left out.
Exporting again with the same game name replaces the previous export. Close the game first, or PyBlocks cannot replace the folder. The output folder can never be your project folder or a folder inside it.
The exported .exe carries your game's details: in Windows, right-click it → Properties → Details shows the game name, Developer Name: as the company, the Version: and a copyright line. The comment field says it was made with PyBlocks.
#Test the exported game
- Open the export folder and double-click
<Game Name>.exe. - Play from the start scene through every scene you included.
- In fullscreen mode, press Esc to switch the game to a window.
Games save their progress (the Progress blocks) in %APPDATA%\<Developer Name>\<Game Name>\saves and write errors to %LOCALAPPDATA%\<Developer Name>\<Game Name>\logs. If a scene fails to start, the game shows an error message with the option to retry.
For an automatic check, run the game from a command prompt with --self-test. It boots without input, checks every file in the build manifest, simulates each included scene, runs the start scene for 180 frames, writes a JSON report and exits with code 0 when everything passed.
start /wait "" "MyGame.exe" --self-test report.json
echo %errorlevel%