Hey there! I’m very excited to share what I’ve been up to since the coding period started. But before I jump into the details, let’s get familiar with the tasks I’m tackling during this period.
Tasks During Coding Period
My project involves three major tasks:
- Package games as DLC packages for various distribution platforms. The freeware games that ScummVM is allowed to distribute should be separately packaged such that they can be downloaded on-demand. This will give the users the flexibility to download any available games from the ScummVM launcher itself.
- Create the launcher’s GUI for showing/listing the games and implementing the downloading mechanism.
- Package games with the ScummVM executable:
- Single game bundled together with the ScummVM executable with their own icon, screenshots, etc. (using autostart). Eg: https://store.steampowered.com/app/1368340/Beneath_a_Steel_Sky/
- One or more games bundled together with the ScummVM executable such that users can launch these games from inside the launcher. Eg: https://snapcraft.io/scummvm
This week, I focused on the first task of automatically packaging games as DLC for different platforms and, if possible, automatically uploading them to the intended platform.
For this, I will be using the infrastructure and APIs provided by distribution platforms to host and deliver our game packages on demand. Each distribution platform has its own requirements for how the package should be structured, including relevant metadata and config files.
So, I’ve been working on a program that takes user-provided games, allows them to specify the export platform, and generates ready-to-upload DLC packages. If possible, the program will also handle the upload process of the intended distribution store.
DLC Packaging System
We have a simple architecture for the DLC packaging system: One program (master packaging script) will load relevant information from the game’s metadata and export formats using the data provided by the user and, using that, outputs a ready-to-upload DLC package(s).
Think of the “game’s metadata” and “export formats” as black boxes that hold all the necessary information for packaging a game in a specific format.
The game’s metadata acts as a universal database containing all the required metadata for creating and publishing the DLC package for any export format.
On the other hand, the export formats specify how we should package a game’s DLC for a particular target platform (Steam, Android, Snapcraft, iOS, etc.). These export formats guide the master packaging script in preparing the DLC package according to the requirements of each platform.
Describing Game’s Metadata
For creating the universal metadata, I had to research as much distribution platforms as possible and check if they support DLC (i.e. provide any infrastructure/API to host/deliver our DLC). If DLC is possible, I had to find what kind of metadata they required for packaging and publishing the DLC package. You can see my findings here.
Some useful insights:
- Steam and Microsoft Store lists DLCs on their store. So, we must provide screenshots, logos, header images, etc. On other platforms, we need very little information (just enough to identify DLCs) as we are not showing DLCs on the store and only requesting them on-demand from the app.
- Android has introduced a new universal standard called Android App Bundle, which has some useful features like dynamic deliveries that also support DLC. This is great because it means the packaging process remains the same and we only need to integrate different SDKs/APIs for each distribution stores.
- Linux has three different universal packaging standards available – Snap, Flatpak and AppImage (relevant xkcd). As far as DLC support goes, none of the distribution platforms supports the on-demand delivery. So, we will create standalone packages for the DLC (with its icon, description, etc.), with the ScummVM executable package as a dependency. The game can be hosted on snapcraft as a new content-only snap, and users can download it from the store instead of the launcher. After installing the game package, users can launch it from the desktop shortcut (which essentially runs ScummVM with some command line arguments) or from the ScummVM launcher (if it’s possible to edit the scummvm.ini game entries)
Describing Export Formats
Right now, the export formats are all about specifying which script to run and what arguments to pass in each phase.
Based on my findings, I have divided the process of creating DLC package into three phases:
- Preparation Phase: This phase prepares the game files in the appropriate format. It will either be used by the bundling phase or will be ready to upload to the distribution platform. This phase also prepares/downloads any other required files like icons, screenshots, etc., so they can be used in the uploading stage, or we can manually upload them to the store.
- Bundling Phase: Some distribution platforms require the DLC package to be included with the base package, not as a separate package. Eg: Play Store’s Android App Bundle. So, in this phase, we prepare the bundle using the intermediate game files prepared in the preparation phase.
- Uploading Phase: If any API is available to automate the upload of the DLC package or any other required files to store, then we do that in this phase.
Phase 2 and 3 are optional.
This is still work in progress and I’ll be making improvements to it in the future. So stay tuned for updates!
Thanks for reading to the end! If you have any feedback, I’d love to hear it.