Skip to content

GameMaker Debugging

This page only covers debugging for the currently available first-release GameMaker capabilities:

  • game authorization
  • achievement unlock
  • achievement progress reporting

Scenario A: debug the official sample directly

Section titled “Scenario A: debug the official sample directly”

If you only want to confirm whether the main SDK path is working at all, start with the sample project included in the release package:

  1. Open
    samples/gamemaker/windows-auth-achievements/project/IGP.WindowsAuthAchievements.yyp
  2. Press F5 to run it
  3. Focus on these fields on screen:
    • Initialized
    • Connection
    • Authorization
    • Pending events
    • Latest result
    • Latest error
    • Latest event
  4. Press F1 to trigger an achievement unlock
  5. Press F2 to trigger progress reporting

If the sample runs but your own game does not show successful results, first confirm that you are no longer using the demo appId = 10 and demo achievement keys.

In your own project, the most important thing is not the UI. It is whether these calls actually happen in the right order:

  1. igp_init(app_id, options) runs once at startup
  2. igp_update() keeps running in Step or the equivalent timing
  3. igp_poll_event() keeps draining the event queue
  4. igp_shutdown() is called when the runtime should stop

If any one of those segments is missing, the state often looks like it is “doing something” without ever really becoming ready.

When debugging your own project, the most useful approach is to inspect the fields returned by igp_get_state_snapshot():

  • connection_state
  • desktop_channel_state
  • desktop_attach_state
  • desktop_attach_source
  • authorization_state
  • authorization_required
  • bridge_loaded
  • bridge_error
  • last_error
  • last_result
  • pending_events

Two especially useful extra fields are:

  • bridge_loaded: whether the native bridge DLL was actually loaded
  • bridge_error: the most direct reason when the DLL failed to load

Besides waiting for state changes, you can also actively trigger two useful checks:

var result = igp_request_game_authorization(global.igp_app_id);
show_debug_message(json_stringify(result));

This call gives you the request result immediately, but the final truth still lives in authorization_state.

var capabilities = igp_get_desktop_capabilities();
show_debug_message(json_stringify(capabilities));

If this call already fails, do not blame achievement logic first. Debug the desktop connection itself.

  • APP_ID_REQUIRED: app_id was empty, not positive, or initialization never completed.
  • bridge_loaded = false: the DLL was not added as an Included File, or it was added but still failed to load at runtime.
  • bridge_error has a value: read it first. It is usually closer to the real reason than guesswork.
  • Connection stays at connecting for too long: the desktop client is not running, attach did not succeed, or auto-launch is still pending.
  • Authorization stays at pending: usually not an authorization-logic problem. More often the earlier desktop connection steps are not done yet, or igp_update() is not being called continuously.
  • F1 / F2 triggers but you never get a success result: most commonly the achievement key is still a sample key, or that achievement has not been configured in the backend.

If you are currently hitting one of these, stop debugging gameplay logic and go back to GameMaker Installation:

  • the project does not contain igp_gms2_windows_runtime
  • Included Files does not contain IGP.GamemakerDesktopBridge.Native.dll
  • startup fails immediately because the script or DLL is missing