Rooms
Feature description
Section titled “Feature description”Rooms are the base capability for Multiplayer lobby. Realtime messaging, state and RPC, and Mirror transport all depend on the room flow.
Room support covers entering a room, ready, start, finish, rematch, leave, and player join / leave events. The room flow usually requires the IGP desktop client to launch the game through the local testing or formal launch flow.
Supported engines
Section titled “Supported engines”| Engine | Status | Notes |
|---|---|---|
| Unity | Preview | Complete main room flow is available. |
| GameMaker | Not supported | The first GameMaker release does not include room capabilities. |
| Godot | In development | The preview runtime already has room lifecycle calls. |
Prerequisites
Section titled “Prerequisites”- Startup and connection is complete.
- The game is launched by the IGP desktop client and receives multiplayer launch information.
- Unity scene keeps exactly one
IGPRuntimeManager. - Godot project has registered
IGPGodotAutoload.
By engine
Section titled “By engine”using UnityEngine;using IGP.Multiplayer;
public sealed class IGPRoomDriver : MonoBehaviour{ [SerializeField] private IGPMultiplayerRuntime runtimeManager;
private void OnEnable() { runtimeManager.RoomChanged += OnRoomChanged; runtimeManager.ConnectionChanged += OnRealtimeConnectionChanged; }
private void OnDisable() { runtimeManager.RoomChanged -= OnRoomChanged; runtimeManager.ConnectionChanged -= OnRealtimeConnectionChanged; }
private void OnRoomChanged(IGPRoomChangedEvent change) { Debug.Log($"Room {change.Kind}, flags={change.Changes}, id={change.Room?.id}"); }
private async void OnRealtimeConnectionChanged(IGPMultiplayerConnectionChangedEvent change) { if (change.IsReady && runtimeManager.CurrentRoomData.hostId == runtimeManager.PlayerId) { await runtimeManager.SetSceneGateAsync("arena-ready"); } }
public async void StartGame() { await runtimeManager.StartHostedGameAsync(); }
public async void FinishGame() { await runtimeManager.FinishHostedGameAsync(); }
public async void LeaveRoom() { await runtimeManager.LeaveHostedRoomAsync(); }
}SceneGate is KCP state owned by the current RoomNode runtime room, not a hosted room-snapshot field. Every client can read CurrentSceneGate and listen for RoomChanged with the SceneGate flag; the host calls SetSceneGateAsync after realtime connects. Late-joining or reconnecting clients call GetSceneGateAsync after realtime is ready, and the Owner’s targeted response updates the cached value asynchronously. The value naturally disappears when the RoomNode runtime room is destroyed.
GameMaker currently does not support room capabilities.
Godot currently should call room capabilities through autoload.
using Godot;using IGP.GodotSDK.Autoload;
public partial class RoomPanel : Control{ private IGPGodotAutoload IGP => GetNode<IGPGodotAutoload>("/root/IGP");
public override void _Ready() { IGP.RoomSnapshotReceived += OnRoomSnapshotReceived; IGP.RoomEventReceived += OnRoomEventReceived; }
public async void Ready() { await IGP.SetReadyAsync(true); }
public async void StartGame() { await IGP.StartHostedGameAsync(); }
public async void FinishGame() { await IGP.FinishHostedGameAsync(); }
private void OnRoomSnapshotReceived(string connectionStatus) {} private void OnRoomEventReceived(int eventType, string roomId) {}}Godot is still in development. The current example is primarily for evaluation and integration alignment.
Self-test
Section titled “Self-test”| Engine | Checkpoint |
|---|---|
| Unity | After realtime connects, the host calls SetSceneGateAsync("arena-ready"); every client receives the updated value through KCP. |
| GameMaker | Room validation is not performed currently. |
| Godot | RoomSnapshotReceived is received and SetReadyAsync(true) succeeds. |
Troubleshooting
Section titled “Troubleshooting”- Cannot enter a room: first confirm the game is launched by the IGP desktop client.
- Unity room disconnects after a scene switch: check whether a second
IGPRuntimeManagerwas created. - Unity SceneGate does not update: confirm the caller is the current host and realtime/KCP is connected.
- Godot does not receive room snapshots: confirm bootstrap is complete and the room multiplayer connection is established.