# GDevelop

Export GDevelop 5 projects to HTML5 and ship them to Wavedash.

Source: https://docs.wavedash.com/engines/gdevelop

<GithubLink href="https://github.com/wvdsh/examples/tree/main/example-gdevelop" />
<PlaytestLink href="https://wavedash.com/playtest/gdevelop-example/bcf577b5-0ef1-408f-bc4f-9c98a224ba8f" />

[GDevelop](https://gdevelop.io) is a no-code / low-code 2D engine with a first-class HTML5 export. The exporter writes a static folder of HTML, JS, and asset files that Wavedash can host directly.

## Export from GDevelop

1. Open your project in GDevelop 5.
2. **File → Export**.
3. In the dialog that opens, pick **Browser → HTML5**.
4. Export to a local folder (the example uses `./build`).

The output is a self-contained folder with `index.html` at its root. Point `upload_dir` at that folder.

## SDK integration

GDevelop lets you run arbitrary JavaScript from an event via the **JavaScript code** action. Add one at scene start — wrap it in a guard so it only runs once, and await `window.Wavedash` so the SDK is resolved before you call `init`:

<Urgent>
**Calling `Wavedash.init()` is required.** Your game stays hidden behind the Wavedash loading screen until you do. Call it once your game is ready to play.
</Urgent>

```javascript
const scene = runtimeScene;
const sv = scene.getVariables();
const initialized = sv.get('initialized');

if (!initialized.getAsBoolean()) {
  initialized.setBoolean(true);

  try {
    const Wavedash = window.Wavedash;
    Wavedash.updateLoadProgressZeroToOne(0.5);  // scene variables initialized
    Wavedash.updateLoadProgressZeroToOne(1.0);
    Wavedash.init({ debug: true });
  } catch (e) {
    console.warn('[wavedash] init failed:', e);
  }
}
```

For anything beyond init — leaderboards, achievements, cloud saves — add more JavaScript events that read/write scene variables and call into `window.Wavedash` the same way. The [Functions reference](/sdk/functions) lists every public SDK method.

## wavedash.toml

```toml
game_id = "YOUR_GAME_ID_HERE"
upload_dir = "./build"
entrypoint = "index.html"
```

<Note>
The GDevelop `build/` directory is an exporter output — it isn't committed to source control. Re-export from GDevelop whenever you change the project before running `wavedash dev` or `wavedash build push`.
</Note>
