GameMaker Studio · GML
Setup
Gamdato provides a complete set of backend services for game developers. Currently we support GameMaker Studio 2.3+ with plans to expand to more engines.
Create an Account
Sign up at gamdato.com. An activation link will be sent to your email (it expires in 24 hours). After verifying your email, log in with your credentials to access the dashboard.
Register a Game
Navigate to your dashboard and create a new game by entering a name. The system will generate a control panel where you can manage game information, leaderboards, achievements and view your player list.
Save the GAME_ID & GAME_KEY, you will need them to establish the connection between your game and the server.
Download & Install the Extension
Download the Gamdato extension and import it into your GameMaker project. The downloadable file contains a basic but complete integration of all Gamdato services. We recommend reviewing how it works before using it in your project.
Controller Setup
Create a persistent object that is instantiated once at the start of your game. Place the following scripts in their corresponding events:
Create Event:
gmda_setController("GAME-ID", "API-KEY");
gmda_setLeaderboard("TABLE-KEY");Step Event:
gmda_Updatefunction();Async HTTP Event:
gmda_HTTPfunction();Reading Results: the Event Queue
You never get data back from the call itself. Almost every gmda_* function is asynchronous: you fire it, then read the result from the event queue with gmda_pollEvent(), the GameMaker stand-in for Godot signals. Drain the queue every Step; each entry is a struct { event, success, ... }. Synchronous getters (gmda_get*, gmda_status) return their value directly.
// Step event, after gmda_Updatefunction()
var e = gmda_pollEvent();
while (!is_undefined(e)) {
switch (e.event) {
case "session_started": show_debug_message("player: " + e.player_name); break;
case "submit_completed": show_debug_message("best: " + string(e.response.score.score)); break;
case "save_loaded": /* e.response.save.data */ break;
case "error": show_debug_message("error: " + string(e.error)); break;
}
e = gmda_pollEvent();
}Utility Functions
Additional helpers available in the extension:
- gmda_status(): true once the session is active AND tables are loaded. Check it before calls that need data.
- gmda_getDate(): the last local date string set by gmda_refreshDate().
- gmda_refreshDate(): update and return the current date/time.
- gmda_reloadinfo(): re-fetch every leaderboard table from the server.