five-on-it / apps/api/src/playlists
apps/api/src/playlists
The platform's playlists (GAME_DESIGN §13, TECHNICAL_SPECS §9.6): Co-op, Versus, Races and Any, each a rotation of missions across levels, the players moving from one to the next without leaving their group. A playlist's missions are the curated games' multiplayer missions (Riverbend's co-op heist and its robbers and chasers; the test levels' too where the API's debug setting curates them, FOI_DEBUG) and the published games' multiplayer missions whose version qualified for Respect (standing.ts' qualifies: enough distinct qualifying players played it and rated it well enough; never with Respect off). Co-op is the co-op missions, Races the versus missions with a race between the players, Versus the other versus ones, Any all of them (inPlaylist).
The rotation (rotation) takes the levels in turn, by name, one mission of each before the next of any, so a playlist's next mission is on another level whenever one has any. What reads it: Quick play (matchmaking.ts: a new lobby opens on the playlist's next mission, and remembers its playlist), a lobby of a playlist after its run (lobbies.ts: its vote offers the playlist's next mission on another level, and an unattended vote moves it there: nextInRotation), and the phone's Jobs app and the Play together screen (GET /playlists). The numbers are PLAYLIST_LIMITS.
| Route | Who | What |
|---|---|---|
GET /playlists | signed in | Each playlist (@foi/protocol's PlaylistView): its missions in its rotation's order, and the public lobbies of its missions. |