Search documentation

Find pages, sections, and content across all docs.

WavedashDocs

Godot

Drop the Wavedash add-on into your Godot project and export for web.

Copy the Godot SDK into your project, register an autoload, and export for web. GDScript calls mirror the JavaScript SDK through the built-in JavaScriptBridge.

View the SDK on GitHub Playtest the example project

Install the SDK

  1. Open the project you want to add the SDK to.
  2. In the AssetStore tab at the top of the editor (labeled AssetLib in Godot 4.4 and earlier), search for "Wavedash SDK", then click Install.
  3. Enable the plugin in Project > Project Settings > Plugins by ticking WavedashGodot.

Enabling the plugin registers WavedashSDK as an autoload singleton automatically. Autoload ordering matters: If any of your own autoloads use WavedashSDK at startup, open Project > Project Settings > Globals > Autoload and drag WavedashSDK above them so it loads first.

Web export settings

  1. Add a Web export preset in Project > Export...
  2. Enable Threads support and VRAM texture compression as needed
  3. Export to the folder you reference as upload_dir

Use the SDK from GDScript

Calling init() is required. It opts your game into Wavedash platform features and is how the SDK confirms you're set up. Call it once your game is ready to play.

func _ready():
    WavedashSDK.backend_connected.connect(_on_connected)
    WavedashSDK.init({"debug": true})

func _on_connected(_payload):
    print("Playing as: ", WavedashSDK.get_username())

Async calls: await or callbacks

Every async WavedashSDK.* function returns the response and also emits a matching signal (e.g. post_leaderboard_scoreposted_leaderboard_score). Pick whichever style suits your code — use await for straight-line flow, or connect a callback to the signal.

Responses come back as a Dictionary with success, data, and message keys:

# Option A: await the return value
func post_score_awaited(leaderboard_id: String, value: int):
    var response = await WavedashSDK.post_leaderboard_score(leaderboard_id, value, true)
    if response.success:
        print("Rank: ", response.data.globalRank)

# Option B: connect once, handle responses in a callback
func _ready():
    WavedashSDK.posted_leaderboard_score.connect(_on_score_posted)

func post_score(leaderboard_id: String, value: int):
    WavedashSDK.post_leaderboard_score(leaderboard_id, value, true)

func _on_score_posted(response):
    if response.success:
        print("Rank: ", response.data.globalRank)

wavedash.toml

game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./exports/web"

[godot]
version = "4.5-stable"