GameMaker Native Bridge
The Native Bridge is the local bridge library built specifically for GameMaker on Windows 10 and later.
Responsibility split
Section titled “Responsibility split”IGP.GamemakerDesktopBridge.Native.dll- owns the actual desktop connection, event queue, results, and state- GameMaker runtime scripts - wrap the DLL C API into GameMaker function calls
How it is used
Section titled “How it is used”Inside a GameMaker project:
- Add
IGP.GamemakerDesktopBridge.Native.dllas an Included File - Import the GML runtime script shipped by the adapter (see the
windows-auth-achievementssample project) - Call initialize / update / poll_event on a steady rhythm from an object such as
obj_controller
Exported functions
Section titled “Exported functions”| Function | Purpose |
|---|---|
igp_gms2_bridge_initialize | Initialize the bridge |
igp_gms2_bridge_update | Per-frame driver, usually in Step |
igp_gms2_bridge_poll_event | Read the next event from the queue |
igp_gms2_bridge_request_game_authorization | Trigger game authorization |
igp_gms2_bridge_get_desktop_capabilities | Query desktop capabilities |
igp_gms2_bridge_unlock_achievement | Unlock an achievement |
igp_gms2_bridge_report_achievement_progress | Report achievement progress |
igp_gms2_bridge_get_state_snapshot | Read the current state snapshot |
igp_gms2_bridge_shutdown | Shut down the bridge |
Extension rule
Section titled “Extension rule”If game authorization or capability queries need to be extended later, continue adding exports at the Native Bridge layer.