five-on-it / apps/server/src/level-rooms
apps/server/src/level-rooms
The rooms of the levels that ship, opened when somebody asks: a connection to /game?level=<name> (http.ts; the main menu's level selection, ?level= on the client) joins the room of that main-* level, opened the first time it is asked for with the level's bundled game, the same switches as the default room (room-options.ts) and 32 players (opened once its navigation is built off the loop: RoomHost.openWhenReady; the level loaded once and kept, so a room opened again shares it), and closed once it has stood empty for a while like any room. The default room's own level is the default room. A test level is never opened this way (it is the end-to-end tests' own), nor is a name the registry does not know, nor a room the server's admission takes no more of (capacity.ts: the connection is refused as full, or at the server's cap of rooms as rooms); a room on its way is joined once it is ready. FOI_LEVEL_ROOMS=0 turns it off.