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:
- Open
samples/gamemaker/windows-auth-achievements/project/IGP.WindowsAuthAchievements.yyp - Press F5 to run it
- Focus on these fields on screen:
InitializedConnectionAuthorizationPending eventsLatest resultLatest errorLatest event
- Press F1 to trigger an achievement unlock
- 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.
Scenario B: debug inside your own project
Section titled “Scenario B: debug inside your own project”In your own project, the most important thing is not the UI. It is whether these calls actually happen in the right order:
igp_init(app_id, options)runs once at startupigp_update()keeps running in Step or the equivalent timingigp_poll_event()keeps draining the event queueigp_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.
Which state fields matter most
Section titled “Which state fields matter most”When debugging your own project, the most useful approach is to inspect the fields returned by igp_get_state_snapshot():
connection_statedesktop_channel_statedesktop_attach_statedesktop_attach_sourceauthorization_stateauthorization_requiredbridge_loadedbridge_errorlast_errorlast_resultpending_events
Two especially useful extra fields are:
bridge_loaded: whether the native bridge DLL was actually loadedbridge_error: the most direct reason when the DLL failed to load
When you need active checks
Section titled “When you need active checks”Besides waiting for state changes, you can also actively trigger two useful checks:
1. Request game authorization explicitly
Section titled “1. Request game authorization explicitly”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.
2. Inspect desktop capabilities
Section titled “2. Inspect desktop capabilities”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.
Common pitfalls
Section titled “Common pitfalls”APP_ID_REQUIRED:app_idwas 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_errorhas a value: read it first. It is usually closer to the real reason than guesswork.Connectionstays atconnectingfor too long: the desktop client is not running, attach did not succeed, or auto-launch is still pending.Authorizationstays atpending: usually not an authorization-logic problem. More often the earlier desktop connection steps are not done yet, origp_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.
When to go back to installation
Section titled “When to go back to installation”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