Files
RP412/RP_L4/RPL4FE.h
T
CydandClaude Fable 5 c66cb00a7e Network races: the local console marshals remote pods over the wire
The lobby-owner-as-console architecture, in-engine. RPL4CONSOLE gains
RPL4LocalConsole_InstallNetworkRace: the owner pod switches to network
mode and meshes like any pod (egg fed locally via FeedLocalEgg, which
now opens the ConsoleOnly state gate), while the console tick also
marshals REMOTE pods over NetTransport speaking the exact arcade
protocol - egg chunks with 5s-retry-until-ACK, 1Hz state polling,
RunMission once every pod stages at WaitingForLaunch, StopMission at
expiry (remotes first, local pod holds until their EndMission scores
land), score intake labeled with [pilots]-order names on the results
screen.

The front end builds the multi-pilot egg: RP412HOSTPODS lists member
console channels (lobby stand-in; the Steam lobby feeds the same
path), RP412HOSTPORT/RP412HOSTADDR set the owner side.

Winsock Connect now redials with a fresh socket per attempt (a refused
TCP socket is dead; the old loop reused it) bounded at 120s - needed
whenever a peer boots after the caller, which is the normal Steam
lobby launch order.

Verified on loopback: member pod in -net, owner hosting from its menu;
mesh completed both sides, 30s race, remote score collected over the
wire (host 3), local stop after the drain, results screen shows both
pilots by name in one process that returns to the menu.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 21:08:18 -05:00

46 lines
1.6 KiB
C

#pragma once
#include "..\munga\style.h"
//########################################################################
//############################ RPL4 Front End ############################
//########################################################################
//
// The in-game race setup: shown when the game starts with no egg, no
// network, and no mission-review mode. Presents the Death Race catalog
// (track / vehicle / color / badge / time / weather / length + pilot
// name), builds the mission egg locally - the same NotationFile text
// TeslaConsole generated, including the pre-rendered plasma name
// bitmaps - and hands its path back for the standard egg-load path.
//
// Returns True with egg_path_out filled when the player launches;
// False if they close the window instead.
//
Logical
RPL4FrontEnd_Run(
HINSTANCE instance,
HWND main_window,
char *egg_path_out,
int egg_path_size
);
// The race length (seconds; 0 = endless) selected at the last
// successful launch - the local console marshals the mission with it.
int
RPL4FrontEnd_LastMissionSeconds();
// [pilots]-order pilot names of the last launched race (owner first),
// comma separated - labels for the network console's results intake.
const char *
RPL4FrontEnd_LastPilotNames();
// The between-races results screen: shows the last mission's final
// scores (from the local console) with a CONTINUE button. Returns
// immediately when there are no results (first boot). False only if
// the player closed the window instead of continuing.
Logical
RPL4FrontEnd_ShowResults(
HINSTANCE instance,
HWND main_window
);