Zvessa docs

Game lobbies

A games page that looks and feels like a real game app, made only of blocks. It is how the Business starter's Game Night page is built, and any AI can build the same thing (or an apps page, a class's activities, a menu of challenges) from the same parts.

Code: convex/lib/lobby/ (descriptions, checks, art names, palettes, words, ready page), convex/kits/lobby/lobby.ts (one server read), src/kits/lobby/ (screens), tests/lobby.test.ts.

The blocks #

KindWhat it isHolds
posterOne bright card: art on a gradient, the name in big letters, a badge (HOT, NEW, LIVE), a corner hook, a line. A game poster opens a sheet (how to play, players, time, your best, big Play) and then the game full screen; a link poster opens its href.
postersThe main shelf: a grid of posters in small (3 across), medium (2) or large (1, wide) with a switch. Cards pop in one after another.poster
showcaseThe featured carousel: big wide cards with a PLAY button, moves on by itself every every seconds.poster
game.liveGames people started that others can still join, with how many are in and a Join button. Hidden when nothing is on.
game.winnersThe latest winners scrolling by.
game.recordEach person's own plays, wins and best score per game.
lobby.headerLogo square, a line under the page title, and the person's coins counting up (Ledger).
lobby.rowA chat-list row that opens the games page: a 2×2 mosaic of its posters' art, the name, the games, a count.poster (optional, extra)
game.frameOne game's play screen on a page. Posters open the same screen by themselves.

Every prop is described once in convex/lib/lobby/blocks.ts; HQ, the page editor and the AI read the same descriptions.

Looks are settings #

The play screen #

Intro splash (one second, tap skips; off with reduced motion), then a start screen (art, players / rounds / time, how to play, name, Start or Join · CODE, a code box). In the game: a header in the game's colours with the round and a timer, a progress bar, a chip per turn with what you scored, the game itself (the Rounds engine's GamePlay), and confetti when you win.

Light on the device #

For the AI #

The guide part is LOBBY_GUIDE() in convex/lib/lobby/guide.ts. Typical page, top to bottom: lobby.header, showcase, game.live, posters "House games", posters "Quick play" (small, hrefs), game.winners, game.record, ledger.leaderboard. gamesLobbyPage() in convex/lib/lobby/page.ts builds exactly that from a list of games. When the AI makes a new game it also adds a poster for it.

A poster for a game that was taken out (its kit removed) is not an error: it hides for members and shows greyed to people who manage the space.