Lobby system specifications

Specifications of the lobby client/server system.
Everything listed here is still a draft and open for change.

Use cases

Client to server messages

Update name


{
    "type": "user-info",
    "data": {
        "name": {{user's new name}}
    }
}
            

Send chat message


{
    "type": "chat-message",
    "data": {
        "message": {{message}}
    }
}
            

Select game mode


{
    "type": "lobby-gamemode",
    "data": {
        "gamemode": {{gamemode's name}}
    }
}
            

Change setting value


{
    "type": "lobby-setting",
    "data": {
        "setting-binding": {{setting's binding value}},
        "value": {{what the setting will be set to}}
    }
}
            

Kick/ban player


{
    "type": "lobby-kick",
    "data": {
        "player": {{player's id}},
        "type": "kick"/"ban"/"mute"
    }
}
            

Connect to lobby


{
    "type": "lobby-connect",
    "data": {
        "name": {{player's name}},
        "password": {{lobby's password, if one exists}}
    }
}
            

Server to client messages

Add a new lobby to the list


{
    "type": "lobbylist-add",
    "data": {
        "name": {{lobby name}},
        "creator": {{lobby's creator's name}},
        "playerLimit": {{lobby's player limit}},
        "playerCount": {{lobby's player count}},
        "gameMode": {{lobby's gamemode}},
        "requirePassword": {{is the lobby password protected}},
        "id": {{id of the lobby}}
    }
}
            

Update a lobby on the list


{
    "type": "lobbylist-update",
    "data": {
        "name": {{lobby name}},
        "creator": {{lobby's creator's name}},
        "playerLimit": {{lobby's player limit}},
        "playerCount": {{lobby's player count}},
        "gameMode": {{lobby's gamemode}},
        "requirePassword": {{is the lobby password protected}},
        "id": {{id of the lobby}},
        "address": {{ip address of the lobby}},
        "port": {{port of the lobby}}
    }
}
            

Remove a lobby from the list


{
    "type": lobbylist-remove",
    "data": {
        "id": {{lobby's id to remove}}
    }
}
            

Add a new player to the list


{
    "type": "playerlist-add",
    "data": {
        "name": {{player's name}},
        "id": {{player's id}}
    }
}
            

Update a player's info


    {
    "type": "playerlist-update",
    "data": {
        "name": {{player's name}},
        "champion": {{player's selected champion}},
        "ready": {{player's ready state}},
        "isMuted": {{player's mute state}}
    }
}
            

Remove a player from the list


{
    "type": "playerlist-remove",
    "data": {
        "id": {{player's id}}
    }
}
            

Add a new chat message to the chat


{
    "type": "chat-message",
    "data": {
        "sender": {{sender's name}},
        "message": {{message contents}}
    }
}
            

Add a batch of chat messages to the chat


{
    "type": "chat-message-batch",
    "data": {
        "messages": [
            {
                "sender": {{sender's name}},
                "message": {{message contents}}
            },
            ...
        ]
    }
}
            

Lobby settings update


{
    "type": "lobby-settings",
    "data": {
        "gameMode": {{selected game mode}},
        "hostSettings": [
            {
                "name": "Gold generation rate",
                "help": "How much gold is generated per 5 seconds in game",
                "field": "text",
                "type": "float",
                "default": "5",
                "binding": "gold-generation-rate"
            },
            {
                "name": "Enable gold generation",
                "help": "Should gold generation be enabled?",
                "field": "checkbox",
                "type": "boolean",
                "default": "true", //should allow "true" and "false" only
                "binding": "gold-generation-enabled"
            },
            {
                "name": "Lives",
                "help": "How many times a player can respawn (-1 for unlimited)",
                "field": "text",
                "type": "integer",
                "default": "-1",
                "binding": "lives"
            },
            {
                "name": "Damage multiplier",
                "help": "Global damage multiplier",
                "field": "select",
                "type": "integer",
                "options": [
                    "1x": "1",
                    "2x": "2",
                    "4x": "4",
                    "8x": "8"
                ],
                "default": "1", // index of selected option
                "binding": "damage-multiplier"
            },
            {
                "name": "Map",
                "help": "The map the game is to be played on",
                "field": "mapSelect",
                "options": "*",
                "binding": "map",
            },
            {
                "name": "Enabled champions",
                "help": "Allowed champions",
                "field": "championSelectMulti",
                "options": "*",
                "default": "*",
                "binding": "enabled-champions"
            },
            {
                "name": "Enabled summoner spells",
                "help": "Allowed summoner spells",
                "field": "spellSelectMulti",
                "options": "*",
                "default": "*",
                "binding": "enabled-spells"
            }
        ],
        "playerSettings": [
            {
                "name": "Champion",
                "help": "Champion you want to play",
                "field": "championSelect",
                "type": "championSelect",
                "options": "{enabled-champions}"
            },
            {
                "name": "Summoner spells",
                "help": "The summoner spells you want to use",
                "field": "summonerSpellSelect",
                "options": "{enabled-spells}",
            }
        ]
    }
}
            

Gamemode list update


{
    "type": "lobby-gamemode",
    "data": {
        "LeagueSandbox-Default": [
            "Dev",
            "1.0.2",
            "1.0.1",
            "1.0.0"
        ],
        "Mythic-Dev": [
            "Dev"
        ],
        "SomeGuy-SomeMode": [
            "0.0.2",
            "0.0.1"
        ]
    }
}
            

Kicked from lobby


{
    "type": "lobby-kicked",
    "data": {
        "type": "kick"/"ban"
    }
}
            

Lobby server to master lobby server messages

Heartbeat


{
    "type": "heartbeat",
    "data": {
        "name": {{lobby name}},
        "creator": {{lobby's creator's name}},
        "playerLimit": {{lobby's player limit}},
        "playerCount": {{lobby's player count}},
        "gameMode": {{lobby's gamemode}},
        "requirePassword": {{is the lobby password protected}},
    }
}