This project allows you to convert RPG Maker 2000/2003 games for Android using Docker and EasyRPG.
Before you start, make sure you have:
- Docker installed on your machine;
- your RPG Maker 2000/2003 game files (see the
/rpgmaker2kx_gamevolume below); - an icon for your game as a square
.pngimage (see the/icon.pngvolume below); - (Optional, only to sign the build) a keystore file. See Creating a keystore.
To install this Docker image, you must have Docker installed on your machine and in the terminal execute the following command:
docker pull carlsonsantana/rm2kx-android-builder:latestOr build it yourself executing the following command on the terminal:
docker build -t rm2kx-android-builder .Run the Docker image, mounting your game files and passing the environment variables that describe your game. The generated .apk and .aab files will be written to the directory you mount at /output.
docker run --rm \
-v "$(pwd)/rpgmaker2kx_game:/rpgmaker2kx_game" \
-v "$(pwd)/icon.png:/icon.png" \
-v "$(pwd)/output:/output" \
-e GAME_APK_NAME="com.mycompany.mygame" \
-e GAME_NAME="My Game" \
-e GAME_VERSION_CODE="100" \
-e GAME_VERSION_NAME="1.0.0" \
-e GAME_METADATA_SITE="https://example.com/" \
-e GAME_OPTIMIZATION_MINIFY_IMAGES="true" \
carlsonsantana/rm2kx-android-builder:latestNote: Android cannot install an unsigned
.apk— every app must be signed before it can be installed on a device or uploaded to Google Play. Use the unsigned build only if you plan to sign the files yourself with your own tooling; otherwise use the Signed build below.
To sign the output, also mount your keystore file at /game_certificate.key and provide the keystore credentials, either through environment variables or through secret files. This example uses environment variables:
docker run --rm \
-v "$(pwd)/rpgmaker2kx_game:/rpgmaker2kx_game" \
-v "$(pwd)/icon.png:/icon.png" \
-v "$(pwd)/output:/output" \
-v "$(pwd)/game_certificate.key:/game_certificate.key" \
-e GAME_APK_NAME="com.mycompany.mygame" \
-e GAME_NAME="My Game" \
-e GAME_VERSION_CODE="100" \
-e GAME_VERSION_NAME="1.0.0" \
-e GAME_METADATA_SITE="https://example.com/" \
-e GAME_OPTIMIZATION_MINIFY_IMAGES="true" \
-e GAME_KEYSTORE_PASSWORD="your_keystore_password" \
-e GAME_KEYSTORE_KEY_ALIAS="your_key_alias" \
-e GAME_KEYSTORE_KEY_PASSWORD="your_key_password" \
carlsonsantana/rm2kx-android-builder:latestTo keep the keystore credentials out of the command line, mount them as plain text secret files instead of setting the GAME_KEYSTORE_PASSWORD, GAME_KEYSTORE_KEY_ALIAS and GAME_KEYSTORE_KEY_PASSWORD variables:
docker run --rm \
-v "$(pwd)/rpgmaker2kx_game:/rpgmaker2kx_game" \
-v "$(pwd)/icon.png:/icon.png" \
-v "$(pwd)/output:/output" \
-v "$(pwd)/game_certificate.key:/game_certificate.key" \
-v "$(pwd)/keystore_password.txt:/run/secrets/game_keystore_password" \
-v "$(pwd)/key_alias.txt:/run/secrets/game_keystore_key_alias" \
-v "$(pwd)/key_password.txt:/run/secrets/game_keystore_key_password" \
-e GAME_APK_NAME="com.mycompany.mygame" \
-e GAME_NAME="My Game" \
-e GAME_VERSION_CODE="100" \
-e GAME_VERSION_NAME="1.0.0" \
-e GAME_METADATA_SITE="https://example.com/" \
-e GAME_OPTIMIZATION_MINIFY_IMAGES="true" \
carlsonsantana/rm2kx-android-builder:latestYou must mount the following volumes when running the Docker image. These mounts provide the necessary input files and define the location for the final output.
/rpgmaker2kx_gamethe folder containing your RPG Maker 2000/2003 game. This is the same folder you would runRPG_RT.exefrom: it must contain the game files at its root, such asRPG_RT.ldb(database),RPG_RT.lmt(map tree), theMap####.lmumap files and the asset folders (CharSet,ChipSet,Music,Sound,Picture, etc.). You do not need to delete unused files likeRPG_RT.exe, any documentation, any extras orThumbs.db: the build automatically skips.exe,.gitkeepandThumbs.dbfiles, so they will not be packed into the game (removing them beforehand only makes the final download smaller);/icon.pngthe icon for your Android game. It must be a square.pngimage; for best results use at least 512x512 pixels, since it is downscaled for every screen density (the largest generated icon is 192x192);/outputthe directory where the generated.apkand.aabfiles will be created (see Output files);- (Optional)
/game_certificate.keythe keystore file used to sign the.apkfile and sign the.aabfile; if provided, you must also set theGAME_KEYSTORE_PASSWORD,GAME_KEYSTORE_KEY_ALIASandGAME_KEYSTORE_KEY_PASSWORDenvironment variables; - (Optional)
/run/secrets/game_keystore_passworda plain text file containing the keystore password, required when the/game_certificate.keyvolume is provided and theGAME_KEYSTORE_PASSWORDenvironment variable isn't set; - (Optional)
/run/secrets/game_keystore_key_aliasa plain text file containing the key alias in the keystore, required when the/game_certificate.keyvolume is provided and theGAME_KEYSTORE_KEY_ALIASenvironment variable isn't set; - (Optional)
/run/secrets/game_keystore_key_passworda plain text file containing the key password in the keystore, required when the/game_certificate.keyvolume is provided and theGAME_KEYSTORE_KEY_PASSWORDenvironment variable isn't set.
GAME_APK_NAMEthe Application ID (e.g.,com.mycompany.mygame) of your Android game. Use lowercase letters, digits and underscores; it must have at least two segments separated by dots, and each segment must start with a letter;GAME_NAMEthe name displayed beneath the app icon on the device;GAME_VERSION_CODEthe version code of your game (example: "100"); newer versions must have a greater value than older ones;GAME_VERSION_NAMEthe version name shown to the user, which may contain letters and dots (example: "1.0.0");GAME_KEYSTORE_PASSWORDthe keystore password, required when the/game_certificate.keyvolume is provided and the/run/secrets/game_keystore_passwordvolume isn't provided;GAME_KEYSTORE_KEY_ALIASthe key alias in the keystore, required when the/game_certificate.keyvolume is provided and the/run/secrets/game_keystore_key_aliasvolume isn't provided;GAME_KEYSTORE_KEY_PASSWORDthe key password in the keystore, required when the/game_certificate.keyvolume is provided and the/run/secrets/game_keystore_key_passwordvolume isn't provided;GAME_METADATA_SITEthe website shown in the side menu (has a default value);GAME_OPTIMIZATION_MINIFY_IMAGESset totrueto minify images without losing quality (defaults tofalse).
Signing requires a keystore file. If you don't have one yet, you can create it with keytool (included with the Java JDK). This command creates a keystore named game_certificate.key with a key valid for about 27 years:
keytool -genkeypair -v \
-keystore game_certificate.key \
-alias game_cert \
-keyalg RSA -keysize 4096 -validity 10000keytool will prompt you for a keystore password (use it as GAME_KEYSTORE_PASSWORD), some identity details, and a key password (use it as GAME_KEYSTORE_KEY_PASSWORD). The value passed to -alias (here game_cert) is your GAME_KEYSTORE_KEY_ALIAS.
Keep this file and its passwords safe. To publish updates on Google Play you must sign every version with the same keystore; if you lose it, you cannot update your app.
For more details, see the official Android app signing guide.
The build writes its results to the /output directory. The filenames depend on whether you provided a keystore:
- Signed build (keystore provided):
rpgmaker2kx-signed.apkrpgmaker2kx-signed.aab
- Unsigned build (no keystore):
rpgmaker2kx-aligned.apkrpgmaker2kx-unsigned.aab
- An APK (
.apk, Android Package) is the file you install directly on a device. Use it to test your game or to distribute it outside of Google Play (for example, by sideloading). To install a signed APK on a device with USB debugging enabled, runadb install rpgmaker2kx-signed.apk, or copy the file to the device and open it. - An AAB (
.aab, Android App Bundle) is the publishing format required by Google Play. You upload it to the Play Console and Google generates the optimized APKs delivered to each device. You cannot install an.aabdirectly on a device.
For a detailed comparison, see the official Android App Bundle documentation.
ERROR: Partial keystore configuration detected.You mounted the/game_certificate.keyvolume but did not provide all three keystore credentials. When signing, you must provide the keystore password, key alias and key password — each either as an environment variable (GAME_KEYSTORE_PASSWORD,GAME_KEYSTORE_KEY_ALIAS,GAME_KEYSTORE_KEY_PASSWORD) or as the matching secret file under/run/secrets/.- The output icon looks blurry or pixelated. Provide a larger, square
.pngicon (at least 512x512 pixels). Small icons are upscaled and lose quality. - The game doesn't start or assets are missing. Make sure the
/rpgmaker2kx_gamevolume points at the folder that containsRPG_RT.ldbandRPG_RT.lmtat its root, not a parent folder that contains the game in a subdirectory. - The build can't be installed on the device. An unsigned APK cannot be installed; use the Signed build.
- RM2K Standalone Game — a game of mine, published on Google Play.
The source code is available on GitHub.