I learned something pretty useful that I think needs to be shared here, and I'm aware that this is technically "Necroposting", but this is an important bit of info related to the issue of loading game assets on game startup...
For those of you who are attempting to release Android builds of your MV/MZ games, there is an important bit if info I've learned about the way the Android runtime handles loading the game assets, the web runtime environment, and the startup of the game in general.
The Problem that Occurs on Android Builds:
- The Android Runtime Environment usually starts up the app much faster than the RPG Maker game's startup process requires to load the game assets (like the
img/system/Window.png file or the
img/system/IconSet.png file for example)
- This "failed to load" type of issue, in the case of Android/iOS app builds of MV/MZ games, is typically caused by what's referred to as a "Race Condition" (
learn more with a YouTube video) and the best way to deal with a Race Condition in the game assets loading stage of an MV/MZ game is to simply add a delay to give the game time to load the assets in the background like with a splash screen.
The Solution I've Found:
- Implement a delay of about 6000ms at minimum using the built-in splash screen feature that the CLI Build Tools that you're using to build your MV/MZ Web Deploy package as an Android APK file.
Personally, I use a rather complex custom build environment for building my game's Web Deployment bundle into both a Windows EXE package via the NW.exe CLI tools and for Android as a signed APK via the Capacitor CLI tools... so I'm not sure how to explain this in simple terms tbh... I've always been better at doing this stuff than actually explaining it sadly... so I appologize if this got rather complex...
I normally would jump at the idea of sharing my build environment with everyone here, however... this particular build workflow is not only super complex due to the extra custom steps I've added related to my studio's commercial games, but like I just mentioned it contains some "secret" data like our own encryption keys used in the custom build and bundling processes for both the PC and Android build workflows that essentially exist to prevent the game assets from being open to theft... sadly the normal build process that the RPG Maker game engines implement are NOT very hard to crack wide open so theft of a game's assets is pretty easy... hence why we use the Web Deploy option in MV/MZ and then use our own custom PC and Android build workflow that is super secure and would be a royal pain for people to crack open making the theft of our games' assets much less likely lolz!
Anywho, I hope this was at least a little bit helpful for all you fellow game devs out there!
If you guys ever need any other help with complex game dev topics like this, feel free to send me a DM here in the forums or just ping me in the Driftwood Gaming Discord server since I'm over there!
My Discord Username:
@kuroyukidev_games
