Examples
This page provides practical examples for common workflows when using Ludens.
Example 1: Minimal Setup
Section titled “Example 1: Minimal Setup”The simplest possible setup — export your game and build with default settings.
- Export your RPG Maker MV or MZ game with the Android / iOS deployment option. If unavailable, select Web Browsers.
- Copy the contents of your exported
wwwfolder to:Note: The build system will automatically synchronize these files to the internal resources directory during compilation. If you prefer manual management without auto-sync, place your files directly inproject/www/composeApp/src/commonMain/composeResources/files/www/. - Edit
ludens.properties:# ----- Android Identity -----ludens.android.id=com.example.mygameludens.android.version=1.0.0ludens.android.versionCode=1ludens.android.minSDK=21ludens.android.targetSDK=36ludens.android.name=My Gameludens.android.launcherName=My Game - Run:
Terminal window ./gradlew assembleDebug
Result
Section titled “Result”A debug APK at composeApp/build/outputs/apk/debug/composeApp-debug.apk ready for testing.
Example 2: Custom Icon and Signed Release
Section titled “Example 2: Custom Icon and Signed Release”A full production workflow with custom branding using the automated App Icon Generator.
-
Complete the Minimal Setup above.
-
Configure your custom icon:
- Place your source icon image (recommended: vector
icon.svg, or a high-resolutionicon.pngof at least 512×512 px) in theproject/assets/icons/folder. - Configure the generator properties in
ludens.properties:# Name of the source master icon in project/assets/icons/ludens.icons.name=icon# Name of the foreground adaptive layer (optional)ludens.icons.foreground=icon_foreground# Solid hex color background or resource referenceludens.icons.background=#FDFDFD# Enable android and ios generationludens.icons.android.enable=trueludens.icons.android.format=webpludens.icons.android.playstore=trueludens.icons.ios.enable=true# Scale of the foreground asset inside the adaptive icon viewportludens.icons.scale=0.62
- Place your source icon image (recommended: vector
-
Create a signing keystore (if you don’t have one):
- In Android Studio: Build > Generate Signed Bundle / APK
- Select APK, click Next
- Click Create new… and fill in the keystore details
- Save the
.jksfile securely
-
Configure signing:
keystore.properties storePassword=my_secure_passwordkeyPassword=my_key_passwordkeyAlias=my_key_aliasstoreFile=C:/keys/my-game-key.jks -
Build the release APK:
Terminal window ./gradlew assembleRelease
Result
Section titled “Result”A signed release APK at composeApp/build/outputs/apk/release/composeApp-release.apk ready for distribution.
Example 3: Using the YDP_Ludens Plugin
Section titled “Example 3: Using the YDP_Ludens Plugin”Integrate the recommended plugin for better WebView compatibility and diagnostic traceback dialogues.
-
Locate the
YDP_Ludens.jsplugin inside theresources/folder of this project (or download the latest version from the rpgm-plugins repository). -
Place it in your RPG Maker project’s
js/plugins/folder. -
Open your RPG Maker project and go to the Plugin Manager.
-
Add
YDP_Ludensand move it to the top of the plugin list. -
Save and re-export the game.
-
Copy the updated
wwwfolder contents toproject/www/and rebuild.
Benefits
Section titled “Benefits”- Patches font loading verification errors on older WebView versions.
- Enables native error stack trace interception and diagnostic traceback dialogues if
ludens.debug.errors=trueis set.
Example 4: File Structure Reference
Section titled “Example 4: File Structure Reference”A complete view of the project structure after setup:
Directoryludens/
DirectorycomposeApp/
Directorysrc/
DirectoryandroidMain/
Directoryres/
- mipmap-* (Auto-generated app icons)
DirectorycommonMain/
DirectorycomposeResources/
Directoryfiles/
Directorywww/ Your game (Option B path, or auto-synced output)
- index.html
Directorybuild/
Directoryoutputs/
Directoryapk/
Directorydebug/ Debug APK output
- …
Directoryrelease/ Release APK output
- …
Directoryproject/ Source of truth for custom assets
Directoryassets/
Directoryfonts/ Custom typography fonts (auto-synced)
- …
Directorylanguages/ Translation source of truth (xml files)
- …
Directoryicons/ Master app icon assets (SVG/PNG)
- …
Directorywww/ RPG Maker game files (Option A path, auto-synced)
- …
- ludens.properties Main Ludens configuration
- gradle.properties Gradle build settings
- keystore.properties Signing credentials
- keystore.properties.template Template reference