Examples
This content is for the 0.1.0 version. Switch to the latest version for up-to-date documentation.
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 game with the Android / iOS deployment option.
- Copy the
wwwfolder to:composeApp/src/commonMain/composeResources/files/www/ - Edit
gradle.properties:ludens.applicationId=com.example.mygameludens.applicationVersion=1.0ludens.applicationName=My Gameludens.applicationLauncherName=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.
-
Complete the Minimal Setup above.
-
Set a custom icon using Image Asset Studio:
- Right-click
composeApp/src/androidMain/res - Select New > Image Asset
- Import your game icon (recommended: 512×512 px PNG)
- Right-click
-
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.
-
Download
YDP_Ludens.jsfrom 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 to Ludens and rebuild.
Benefits
Section titled “Benefits”- Fixes font loading verification errors on older WebView versions.
- Enables additional client-side features supported by Ludens.
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/
Directorymipmap-mdpi/ App icon (48px)
- …
Directorymipmap-hdpi/ App icon (72px)
- …
Directorymipmap-xhdpi/ App icon (96px)
- …
Directorymipmap-xxhdpi/ App icon (144px)
- …
Directorymipmap-xxxhdpi/ App icon (192px)
- …
DirectorycommonMain/
DirectorycomposeResources/
Directoryfiles/
Directorywww/ Your game
Directoryaudio/
- …
Directorydata/
- …
Directoryfonts/
- …
Directoryimg/
- …
Directoryjs/
Directoryplugins/
- YDP_Ludens.js
- index.html
Directorybuild/
Directoryoutputs/
Directoryapk/
Directorydebug/ Debug APK output
- …
Directoryrelease/ Release APK output
- …
- gradle.properties App configuration
- keystore.properties Signing credentials
- keystore.properties.template Template reference