Skip to main content
A Defold library for the HTML5 build. It’s pure Lua with no native extension, so it doesn’t need Defold’s build server. On desktop and mobile builds, calls report unsupported.

Install

1

Add the dependency

In game.project, under Project → Dependencies, add:
Then choose Project → Fetch Libraries.
2

Register your page

At developer.gamavas.fun, connect your listing to get a client ID, and add your game’s page under Where sign-in returns. To test from Defold (Project → Build HTML5), add the local address it opens too, for example http://localhost:51234/ (your port).

Sign players in

Start once, from a script’s init(). That script’s timer delivers the answers, so use one that lives as long as your game:
Every call reports to your callback with a table: { ok, value, error, message }. Once gamavas.is_ready() is true, gamavas.is_signed_in() and gamavas.player() say who’s signed in.

Achievements, progress and selling

Faster sign-in popup (optional)

The library loads the Gamavas script itself. To make the sign-in popup close before your game starts loading in it, copy Defold’s builtins/manifests/web/engine_template.html into your project, set it as HTML5 → Html File in game.project, and add this to its <head>:

Your server

Verify it on your server with @gamavas/pass-server.

Options

Errors

error is one of popup_closed or access_denied (signing in), popup_blocked, signed_out, forbidden, not_found, rate_limited, network, not_initialized (call gamavas.init first) or unsupported (not an HTML5 build).