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 Blocked message 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

  1. Choose Project → Export Game... or press Ctrl+E.
  2. Check Game Name: and Developer Name:. The developer name also becomes part of the folder where the game stores saves and logs, so use your own.
  3. Click Choose... to pick the Output Folder:.
  4. Optionally pick a Game Icon: with Select From Project.... .ico is recommended; .png, .jpg, .jpeg, .webp and .bmp are converted. The icon must be inside the project; use a square image of at least 256×256.
  5. Set Width:, Height: and Window Mode: (Windowed or Fullscreen).
  6. Under Scenes In Build, tick the scenes to include and order them with Move Up / Move Down. The first ticked scene is index 0 (Start): the game starts there.
  7. 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

  1. Open the export folder and double-click <Game Name>.exe.
  2. Play from the start scene through every scene you included.
  3. 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%

Share your game

Zip the whole <Game Name> folder and share the zip. The GameData folder must stay next to the .exe; the game does not start without it.

  • Exported games run on Windows only.
  • The .exe is not code-signed, so Windows SmartScreen may warn the first time; players can choose More info → Run anyway.
  • Fonts installed on your PC are not included. Import the fonts you use into the project (see UI, text and fonts).
  • Python packages that Lab plugins import are not bundled.