Ren'Py supports web builds through its Emscripten-based HTML5 export. The output is a folder of HTML, JS, WASM, and game data that Wavedash can host.
Build for web
- Open the Ren'Py launcher
- Select your project and click Build Distributions
- Check Web (requires Ren'Py 8+ or the web build module for 7.x)
- Build to a destination folder (e.g.
build/web)
The output includes index.html, renpy.wasm, and your packaged game data.
SDK integration
Wavedash injects WavedashJS into the page before Ren'Py's loader runs. Call it from Python using Ren'Py's JavaScript bridge:
init python:
import emscripten
def wavedash_get_username():
return emscripten.run_script_string("WavedashJS.getUser()?.username || ''")
def wavedash_submit_score(board_id, score):
emscripten.run_script(
'WavedashJS.uploadLeaderboardScore("{}", {}, true)'.format(board_id, score)
)
def wavedash_unlock_achievement(achievement_id):
emscripten.run_script(
'WavedashJS.setAchievement("{}"); WavedashJS.storeStats()'.format(achievement_id)
)
Usage in script
label start:
$ username = wavedash_get_username()
"Welcome back, [username]!"
# After completing a chapter
$ wavedash_unlock_achievement("chapter_1_complete")
Load progress
Ren'Py's web build has its own loading screen. To integrate with the Wavedash shell, add a script tag to web/index.html (in your project's web/ override directory) that patches the loader:
var _original = window.setProgress;
window.setProgress = function(value) {
WavedashJS.updateLoadProgressZeroToOne(value);
if (_original) _original(value);
};
Call WavedashJS.loadComplete() from your splashscreen label or when the main menu appears.
wavedash.toml
game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./build/web"
entrypoint = "index.html"
Ren'Py web builds can be large (50MB+) depending on audio and image assets. Consider compressing audio to OGG and resizing images for web before building.