Motivation
Some games might want to have easy-to-remember codes for lobbies. Users can easily share these codes to let others join.
The simplest way to go about this is to let the clients generate these codes and attach them to lobbies. The drawback is potential collisions when the clients use low-entropy sources ( e.g. 3 words - many characters, few points of change between codes ). With collisions, other clients can find lobbies even if they are hidden.
Goals
- Implement
lobby/get-by-code
- Accepts a single param, the join code
- Returns the lobby if found, error otherwise
- Implement
lobby/set-code
- Attaches a join code to the lobby
- The join code must be unique to the game
- Only owners can set join code
- Add config to set maximum join code size, default to 16-ish
Motivation
Some games might want to have easy-to-remember codes for lobbies. Users can easily share these codes to let others join.
The simplest way to go about this is to let the clients generate these codes and attach them to lobbies. The drawback is potential collisions when the clients use low-entropy sources ( e.g. 3 words - many characters, few points of change between codes ). With collisions, other clients can find lobbies even if they are hidden.
Goals
lobby/get-by-codelobby/set-code