LocalConsole: the in-process marshal that ends missions

Domain correction from playtest: hand-fed eggs are a developer shortcut
- a mission only ends on a console command, so the clock hits 00:00 and
counts up forever. Even single-player games need a console marshal.

RPL4CONSOLE is that console. Like the real one it lives on its own
thread: it owns the mission clock and raises the stop request at the
selected length; the app-manager per-frame hook (new gPerFrameHook seam
in APPMGR, called while the application global is live - the loop
condition NULLs it on exit, which ate the first attempt) executes the
engine-safe part, dispatching the same StopMissionMessage TeslaConsole
sent. Final scores flow in through a new RP-layer sink
(gConsoleScoreSink in RPCNSL): RPPlayer feeds it the same score it
sends a real console at mission end.

It also inherits the launcher role: the application tears down after a
stop (arcade pods were relaunched per mission by TeslaLauncher), so
WinMain respawns the process when the console ended the mission,
landing back on the race-setup screen. L4NetworkManager grows
FeedLocalEgg (the single-user egg-inject path, callable mid-session)
for the future in-process loop.

Verified end to end: menu -> 3:00 race -> stop dispatched exactly on
time -> final score collected (host 1 = 4113) -> process respawned with
the front end up. -egg runs stay unmarshaled (the dev shortcut).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-12 18:10:02 -05:00
co-authored by Claude Fable 5
parent 58eb25a792
commit 9f79508257
15 changed files with 351 additions and 0 deletions
+13
View File
@@ -84,6 +84,19 @@ so press-feedback works like the real button field.
`RPMission.ToEggString` port incl. GDI-rendered plasma name bitmaps)
and feeds the standard egg-load path. Verified end to end: menu →
LAUNCH → generated egg → racing in the cockpit.
-**LocalConsole marshal** (`RP_L4/RPL4CONSOLE.cpp`): hand-fed eggs are
a dev shortcut — a mission only ends on a console command, otherwise
the clock rolls past 00:00 and counts up forever. Front-end games are
now marshaled by an in-process console **on its own thread** (like the
real one): it owns the mission clock, dispatches the arcade's
`StopMissionMessage` at expiry, and collects the final scores through
the same intake `RPPlayer` fed the real console (`gConsoleScoreSink`).
It also plays the **launcher role**: after a marshaled mission end the
process respawns (the arcade launcher restarted pods per mission),
landing back on the setup screen. Verified: 3:00 race ends at 3:00,
score collected, fresh instance boots to the menu. `-egg` runs stay
unmarshaled (the dev shortcut, timer counts up as before).
Results SCREEN (showing the collected scores) is the next brick.
- See [RP412-FRONTEND-DESIGN.md](RP412-FRONTEND-DESIGN.md) for the
TeslaConsole control-code analysis and the Steam lobby mapping this
builds toward (lobby owner = console, SteamID list = pilot list,