Notes on Expansion file support, RFC (request for comments)
So we've started preliminary work on expansion file support.
We likely won't be finishing it next week because of the Big Sur issue. I just wanted to get a start on it yesterday to get a sense of what we're getting into and how to design it. I'm gonna set my laptop to update to Big Sur tonight (gives me a weekend to wrestle with any bugs that pop up), so I can start tracking down the Big Sur issues in Mac Creator.
In the mean time, I wanted to give you a sneak peak on how things will work and see if there are any comments (also to assure you that we're really gonna do it this time).
- Expansion files will be store the main game project. Basically it's going to be a zip file of your game project with some special things going on, like audio assets not being zip compressed to allow for streaming.
- You will be prompted to upload a second game project file, the loading game.
- Usually, when the game is installed from google play, both files will be downloaded. BUT it's possible to have the APK installed with no expansion file installed (or in the middle of downloading).
- When that happens, the game will run the loading game. This game project can be a loading screen, a mini game, or even the first level of your main game. It's main thing is that it needs to let the user know that the game isn't fully there get and is downloading.
So here's the flow, assuming you don't have the expansion file downloaded.
- App starts
- App checks for expansion file.
- No expansion file, app starts background download the expansion file.
- App loads the 'loading game'.
- Once the app finishes downloading, the game will be able to run with the full game.
Step 5 is where things get tricky, so to get things out to the community quickly, here's the sequence of releases:
Version 1: (Late Dec, Early Jan)
- The downloading happens in the background.
- The loading game has no knowledge of progress and just has to be ready for a restart at any time.
- Once full game has downloaded, the engine will dump the loading game and load the main game.
- You will likely just want a splash screen here or a mini game that can end at any time.
Version 2: (Late Jan, Early Feb)
- You will need to add specifically named attributes that we will updated to notify you of changes in the loading game.
- The downloading happens in the background and will update attributes in the loading game to let you know progress (the bytes total and the bytes downloaded will be sent to you).
- You can display them or not. Now you can let users know loading progress.
Version 3: (Early Feb, Late Feb)
- You will also have a publishing time flag that ask if you want the game to automatically restart when download is complete.
- This will give you the option of including a subset of your game. You can now prompt the users to "restart" the game if they hit the end of your loading game content. If they don't hit the end before the game downloads, everything will work fine as they will just load the full game when they next run the game after the download.
Version 4: (After the next Windows Release)
- We'll add a new behavior that lets you manually trigger "reloading" the game once the expansion file has finished download.
- This will let you either manually trigger (through a button) or programmatically trigger (via behavior like on the end of the last scene) a reload of the game.
There is one extra bit of complexity if people want to include gameplay in the loading game. Game attributes are referenced by an internal ID and not by the name you see, so if you want to convey state from your loading game to the full game, you'll need to ensure that all the internal IDs are the same. The best way to do this is to build your full game, then start cutting extra stuff out of your main game until you get under the 100MB APK limit.
We're gonna push hard for Version 1 and then the timings for Version 2-4 will depend on what else is going on in our schedule. We will likely push hard for version 2 as that gets all you need for an "acceptable" experience. Version 3 is icing on the cake, as google's documentation seem to imply that a simple loading screen an okay experience.
The main thing you'll want to consider in timing your launch is your target market and the size of your game. If your game is large and the target market has mostly slow internet connections, you may want to hold off on release until at least Step 2 is available. Basically, you'll want to consider the experience your players will have as they wait for the full game to download after the apk has already installed.
Anyway, that's a big brain dump of how we're thinking expansion files will work. Let me know if anything is unclear, or if you have any suggestions for the flow!