Game Packaging
Revision as of 03:24, 29 August 2023 by Ankushdutt (talk | contribs)
Introduction
This page contains information for packaging and distributing freeware games & demos (as DLCs) through in-app DLC downloader.
Platform-specific Guides
How to extend DLC support to more distribution stores
The general steps/tips are:
- Identify if the store have DLC support and have appropriate API or SDK for managing on-demand downloads. You may check this sheet containing information about various distribution stores for reference (might be outdated).
- Create a new class that implements
backends/dlc/store.h
. Seebackends/dlc/android/playstore.cpp
as an example. - Set the
dlcspath
in appropriate backends. - Use
#ifdef USE_DLC
where applicable. Before building, make sure to enable DLC support by using--enable-dlc
with./configure
. - Add a new entry to
packaging/export-platforms.json
. Theexport-platforms.json
consists of the description of scripts that eventually prepare and package the game in a specific format recognized by the distribution store and, if possible, upload the game directly to the distribution store. You can include the 3rd party SDK/scripts/tools or self-written scripts in thepackaging/scripts
directory. Here is an example for an entry toexport-platforms.json
(The single $ means variable frompackaging/package.py
context, double $ means variable frompackaging/dlc-games.json
, and triple $ means it is an environment variable):
"android": {
"target": "android",
"prepare": {
"type": "python-script",
"location": "android/generate_asset_pack.py",
"options": {
"--packagename": "org.scummvm.scummvm",
"--assetpackname": "$$packname",
"--deliverymode": "on-demand",
"--assetsdir": "$game_location",
"--outdir": "output/android"
},
"successMessage": "Asset pack required for bundling stage is successfully created!"
},
"bundle": {
"type": "python-script",
"location": "android/add_packs.py",
"options": {
"--androidsdk": "$$$ANDROID_SDK_ROOT",
"--sdkver": "33",
"--buildtoolsver": "33.0.2",
"--bundletool": "scripts/android/bundletool-all-1.15.1.jar",
"--inputbundle": "$binary_location",
"--packdir": "output/android",
"--packnames": "$$packname",
"--output": "output/android/scummvm-bundled.aab"
},
"successMessage": "Android App Bundle is successfully created in output/android. You can now manually upload this file on Google Play Console."
},
"upload": {
"type": "none"
}
}
It is possible that you might need to change the schema for export-platforms.json
and adapt the packaging/package.py
accordingly. For more details and reasoning, you may read this blog.