unsupported.
Install
1
Add the dependency
In Then choose Project → Fetch Libraries.
game.project, under Project → Dependencies, add: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’sinit(). That script’s timer delivers the answers, so use one that lives as long as your game:
{ 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’sbuiltins/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
@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).
