Files
CydandClaude Fable 5 18c6f05cf1 Members get the score sheet: owner publishes results through the lobby
Round seven was the first complete Steam race: three machines, five
minutes, wall deaths respawning, the console ending the race on time,
and rematches launched from the same lobby. The one gap the run showed:
only the owner saw scores - members went straight back to the room.

The owner now publishes its console results (host, score, name, keyed
by the race nonce) into lobby data right after teardown; members pull
the sheet (waiting up to 8s for it to land), inject it into the local
results intake, and the same RACE RESULTS screen shows on every
machine before the room.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 00:34:34 -05:00

58 lines
2.1 KiB
C

#pragma once
#include "..\munga\style.h"
//########################################################################
//########################### RPL4 Steam Lobby ###########################
//########################################################################
//
// The multiplayer front door (docs/RP412-FRONTEND-DESIGN.md section 3):
// an ISteamMatchmaking lobby stands in for the arcade's Site Management
// screen. Every member publishes its FakeIP + fake ports + persona +
// loadout as lobby member data; the owner is the console. Launching
// writes a "go" roster into lobby data - each pod registers every
// peer with the Steam transport and enters the race, the owner
// through the hosted-race path (it builds the egg and marshals), the
// members as network pods waiting for the owner's console connection.
//
// The lobby OBJECT outlives races - that is the point of the single
// binary. After a race everyone lands back in the room for the next
// launch.
//
// Compiled to stubs without RP412_STEAM.
//
enum RPL4LobbyOutcome
{
LobbyRoomLeft = 0, // player left the lobby - back to the menu
LobbyRoomClosed, // window went away - quit
LobbyLaunchHost, // owner launched: hosted-race path is primed
LobbyLaunchMember // owner launched: enter the race as a pod
};
// True when the Steam transport is up (lobby UI is offered).
Logical
RPL4Lobby_Available();
// True while we sit in a lobby (races return to the room).
Logical
RPL4Lobby_InRoom();
// Create a lobby / find-and-join one, then run the room screen.
int
RPL4Lobby_Host(HINSTANCE instance, HWND main_window);
int
RPL4Lobby_Join(HINSTANCE instance, HWND main_window);
// Re-enter the room of the lobby we are already in (post-race).
int
RPL4Lobby_Room(HINSTANCE instance, HWND main_window);
// Post-race score sheet: the owner publishes its console's results
// into lobby data; members pull them into the local results intake so
// the same results screen shows everywhere. Both are no-ops when not
// in a lobby (or not the respective role).
void
RPL4Lobby_PushRaceResults();
void
RPL4Lobby_PullRaceResults();