Open World Games

Open world games have seamless multiplayer experiences without discrete rooms. Players can move between areas, zones, or instances without loading screens, making traditional room-based invitation systems unsuitable.

What Are Open World Games?

Open world / seamless world games include:

  • MMORPGs (World of Warcraft, Final Fantasy XIV)
  • Survival games (Rust, Valheim)
  • Open-world adventures ( GTA Online, DayZ)
  • Sandbox games (Minecraft-style)
  • Persistent world games

How Invitations Work

Invitation Flow for Open World Games

  1. Player is in the world - No concept of "room" to join
  2. Host sends invitation - Includes location/data to teleport friend
  3. Friend receives notification - Shows who invited and what world/location
  4. Friend accepts - Gets teleported/summoned to friend's location
Key Difference: Instead of joining a room, friends are transported to the sender's current location in the world.

Custom Location Data

Open world invitations use custom data to store location information:

{
    "worldName": "Elden Realm",
    "zoneId": "forest_01",
    "position": { "x": 100.5, "y": 25.0, "z": -45.2 },
    "instanceId": "abc123",
    "dimension": "main"
}

Your game should parse this custom data and handle the teleport/summon logic.

Configuration

Setting Up Open World Games

  1. Set Default Game Type on FriendManager to OpenWorld
  2. Configure OpenWorldGameTypeSettings:
    • Default world name
    • Supported dimensions/zones
    • Teleport validation settings
  3. Implement OnInvitationReceived to handle location data

Developer Details

OpenWorldGameTypeHandler

The OpenWorldGameTypeHandler handles seamless world operations:

// Send invitation with current location
var customData = new Dictionary<string, string> {
    { "worldName", _currentWorld },
    { "zoneId", _currentZone },
    { "position", JsonUtility.ToJson(transform.position) }
};

var invitation = _openWorldHandler.PrepareInvitation(
    targetUserId: "friend123",
    message: "Join me in the forest!",
    customData: customData
);

// Handle incoming teleport invitation
public void OnInvitationReceived(FriendInvitation invitation) {
    if (invitation.CustomData.TryGetValue("position", out var posJson)) {
        var position = JsonUtility.FromJson<Vector3>(posJson);
        TeleportPlayerTo(position);
    }
}