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. Download the add-on folder on GitHub
  2. Place it at res://addons/wavedash/ in your project
  3. In Project > Project Settings > Autoload, add res://addons/wavedash/WavedashSDK.gd as WavedashSDK
  4. Autoload ordering matters: Make sure the WavedashSDK Autoload is listed above any other scripts that use the WavedashSDK

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"