five-on-it / packages/protocol/src/lobby
packages/protocol/src/lobby
The platform's lobbies (GAME_DESIGN §13, TECHNICAL_SPECS §9.6) as the API takes and answers them and the web client reads them: the requests (POST /lobbies, a team, ready, a vote, a kick, an invitation, Quick play by PLAYLISTS), a lobby as its page shows it (LobbyView: its mission and the rules in a few fields, its teams' slots and each member's party and ready state, the countdown, the run under way, the last run's results and the vote on the next mission), a public lobby as the lists show it (LobbySummary), a mission as the missions' index lists it (MissionEntry), the platform's playlists with their missions and public lobbies (PlaylistView, GET /playlists), and the two events the feed brings a member (LobbyFeedEvent: the lobby changed, its run opened with the member's join URL). A lobby opened from a playlist (Quick play, or the Play together screen) remembers it (playlist): its vote's offers come from it, and an unattended vote moves it on along the playlist. Quick play may seat a player in a lobby's run under way (joinInProgress): its answer then says how to get there (join).
A lobby is for one mission of one game, public (listed, found by Quick play) or private (by its link), led by its host. Its states: gathering (a team under its minimum), ready (every team has its minimum: the ready check), countdown (the run's room opened and warming, the members told their join URLs when it ends), running (the run's id), results (the run's result and the vote on the next mission), then gathering again on the mission the vote picked. These are the API's shapes, not the game server's: nothing here travels on a room's socket, so PROTOCOL_VERSION does not count them.
Type Aliases
- CreateLobbyRequest
- LobbyFeedEvent
- LobbyInvite
- LobbyMember
- LobbyOffer
- LobbyResults
- LobbyRules
- LobbySeatResult
- LobbyState
- LobbySummary
- LobbyTeam
- LobbyView
- LobbyVote
- MissionEntry
- OfferKind
- Playlist
- PlaylistMission
- PlaylistView
Variables
- CreateLobbyRequest
- LOBBY_NOTICES
- LOBBY_OUTCOMES
- LOBBY_STATES
- LOBBY_VISIBILITIES
- LOBBY_WHYS
- LobbyAccountRequest
- LobbyFeedEvent
- LobbyInvite
- LobbyMember
- LobbyOffer
- LobbyReadyRequest
- LobbyResults
- LobbyRules
- LobbySeatResult
- LobbySummary
- LobbyTeam
- LobbyTeamRequest
- LobbyView
- LobbyVote
- LobbyVoteRequest
- MISSION_MODES
- MissionEntry
- OFFER_KINDS
- PlaylistMission
- PLAYLISTS
- PlaylistView
- QuickPlayRequest