Distributing Acron Applications¶
A finished game is shipped to players as a program of its own: an app for Windows, macOS or Linux, a static web site, an Android app, or a Wii homebrew app. Players install nothing else – the engine travels inside the game.
How a game is turned into such a program depends on what it is written in:
A Python game is frozen: build_apps, a setuptools command that comes
with the engine, compiles the game’s code into an executable together with a
Python interpreter, the engine and the game’s files. It takes the engine from
the acron wheel of the target platform, so one machine can build for every
platform, and nothing is compiled.
A C++ game is compiled against the Acron SDK of the target platform:
the engine prebuilt for that platform, with its headers, a CMake package
(find_package(Acron)) and the tools that package the result. You never
compile the engine itself, and you do not need its source code.
This manual is showing the Python variation; the C++ pages in this section apply to C++ games only.
Choosing your path¶
Platform |
Python game |
C++ game |
What you get |
|---|---|---|---|
Windows, macOS, Linux |
|
the desktop SDK of each platform; see Building C++ Games for the Desktop |
a folder (on macOS an app bundle) and a |
The web |
|
the web SDK and Emscripten; see The Web |
a static site (HTML, WebAssembly, the game’s files), zipped |
Android |
|
the Android SDK and NDK; see Building for Android |
a signed APK (and for Python an app bundle, |
Nintendo Wii |
not available: the Wii runs no Python |
the Wii SDK and devkitPro; see Building for the Wii |
a |
The engine’s wheels and SDKs come from the Acron archive
(archive.acronengine.com), which needs an account; the launcher signs in for
you and hands the credentials on (UV_INDEX_ACRON_ARCHIVE_USERNAME and
UV_INDEX_ACRON_ARCHIVE_PASSWORD). The SDKs are downloaded once per
version and kept in a cache shared by all projects.
With acronmanager¶
The recommended way to build a game for distribution is acronmanager, the
project tool that comes with the Acron launcher. It reads the project’s
pyproject.toml, fetches the right wheel or SDK, runs build_apps or
CMake, and puts the result into dist/:
acronmanager dist # the desktop (Python: every platform it names;
# C++: this machine's platform)
acronmanager dist --web # dist/<name>-web.zip
acronmanager dist --android # dist/<name>-<version>.apk
acronmanager dist --wii # dist/<name>-<version>-wii.zip (C++ only)
build --web, build --android and build --wii build without
packaging; run --web serves the site locally and run --android
installs the app on a connected device or emulator and starts it. The
launcher’s buttons run the same commands: Distribute is dist, Export
for Web dist --web, Export for Android dist --android, App Icons &
Store Art assets and Set up CI ci init.
What the platform needs on your machine besides acronmanager:
Desktop: for a Python game, nothing; for a C++ game, a C++17 compiler and CMake (see Building C++ Games for the Desktop).
Web: for a Python game, nothing; for a C++ game, CMake and Ninja – acronmanager installs the Emscripten the web SDK names.
Android: the Android SDK (Android Studio’s, or the command-line tools) and a JDK; acronmanager installs the NDK a C++ game needs.
Wii: devkitPro (see Building for the Wii).
Everything acronmanager does can also be done by hand – with python
setup.py bdist_apps for a Python game, with CMake and the SDK for a C++
game – and each page shows how.
Before you ship¶
The game’s identity.
[tool.acron.app]inpyproject.tomlnames the game as players see it, gives its application id (com.example.mygame: two or more dot-separated parts, each starting with a letter, as Android requires) and its icon, from whichacronmanager assetsmakes every platform’s icons and the store art: see App Icons and Store Art.[project] versionis the version.Signing. An Android app is signed with a key of yours, and every update must be signed with the same one (see Signing). For macOS and Windows, sign the program with your own certificate before you publish it (see Signing for macOS and Windows).
Automated builds.
acronmanager ci initwrites a CI workflow that builds every platform on each release: see Continuous Integration for Games.