Distributing Games
Once your game is ready, you can bundle it into a single package for easy distribution.
Creating assets.pak
On Windows
You can use the packaging tool included with Playfield Engine:
- Go to the
misc/windows/folder. - Drag and drop all your game files (such as main.pf, images, sounds, etc.) onto
playfield-pack.exe. - The tool will create an
assets.pakfile in the same folder.
This file contains all of your game’s scripts and assets in one archive.
On macOS
Use misc/macos/playfield-pack instead:
- Open the terminal.
- Go to
misc/macos/. (cd misc/macos) - Run
xattr -c playfield-packto clear the macOS's quarantine flag. - Run
./playfield-pack <files>to create a package.
On Linux
Use misc/linux/playfield-pack instead:
- Open the terminal.
- Go to
misc/linux/. (cd misc/macos) - Run
./playfield-pack <files>to create a package.
Files to Distribute
To distribute your game, you only need the following two files:
playfield.exeassets.pak
Place them in the same folder. Your players can then run the game by simply double-clicking playfield.exe.
Changing the Icon
For Windows
Use a third-party tool to replace the application icon in playfield.exe.
Or alternatively:
1. Download the Playfield Engine source code.
2. Replace resources/windows/icon.ico with your own icon.
3. Rebuild the app.
For macOS
- Download the Playfield Engine source code.
- Replace
resources/macos/icon512.pngwith your own icon image. - Rebuild the app.
For Linux
- Download the Playfield Engine source code.
- Replace
external/StratoHAL/src/icon.c, with your own icon data. - The file must contain a valid XPM image text.
- Rebuild the app.