Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b84b32486 | ||
|
|
0cf5a23d2e | ||
|
|
13424cce50 |
@@ -1,37 +1,75 @@
|
|||||||
# Red Planet 4.12
|
# Red Planet 4.12 — the Steamification
|
||||||
|
|
||||||
**Red Planet** is the VWE pod-racing game built on the in-house **MUNGA** engine
|
**Red Planet** is VWE's pod-racing game: eight-player VTV races on Mars,
|
||||||
(Win32 / DirectX 9, `MUNGA_L4` platform layer). The **4.12** line is the
|
originally played from inside VWE Tesla cockpit pods. This repo is the
|
||||||
consumer port: a version of Red Planet that can be **sold on Steam** and played
|
third life of that code:
|
||||||
over **internet multiplayer**, without cockpit-pod hardware.
|
|
||||||
|
|
||||||
Forked from [RP411](https://gitea.mysticmachines.com/VWE/RP411.git)
|
| Generation | What it was |
|
||||||
(the arcade/cockpit 4.11 line) with full history preserved.
|
|------------|-------------|
|
||||||
|
| **Red Planet 4.10** | The original game, running on the **Tesla 1** pod platform (DOS-era MUNGA engine, serial RIO cockpit hardware, operator console, batch-file relaunch between missions) |
|
||||||
|
| **Red Planet 4.11** | The **Win32 port** of 4.10 ([RP411](https://gitea.mysticmachines.com/VWE/RP411.git)) — DirectX 9, WinSock TCP, TeslaConsole/TeslaLauncher session control; still runs in pods, still a LAN |
|
||||||
|
| **Red Planet 4.12** | **This repo: the Steamification of 4.11** — the same engine, the same wire protocol, the same missions, made distributable on Steam and playable over the internet with no cockpit hardware |
|
||||||
|
|
||||||
## Goals
|
The architecture is deliberately conservative: the VWE's design survives
|
||||||
|
intact, with each pod-era dependency replaced by a consumer equivalent
|
||||||
|
behind the engine's existing seams.
|
||||||
|
|
||||||
1. **Steam distribution** — Steamworks integration, SteamPipe builds, store-ready packaging.
|
| Arcade (4.10/4.11) | 4.12 replacement |
|
||||||
2. **Internet multiplayer** — take the engine's LAN-era WinSock networking online
|
|--------------------|------------------|
|
||||||
(NAT traversal, matchmaking, latency tolerance).
|
| RIO cockpit board (serial) | **PadRIO** — virtual RIO from XInput pad + keyboard, fully rebindable (`bindings.txt`, vRIO profile format) |
|
||||||
3. **No cockpit required** — keyboard / mouse / gamepad input and on-screen
|
| Seven physical displays | **Single-window cockpit** — all displays composed on a locked 1920×1080 canvas around the viewscreen, with the real button banks lamp-lit and clickable |
|
||||||
replacements for the pod's RIO panel and plasma display, drawing on
|
| Pod button lamps | On-screen lamps, plus an **RGB keyboard mirror** (Windows Dynamic Lighting) |
|
||||||
[vRIO](https://gitea.mysticmachines.com/VWE/VRIO.git).
|
| TeslaConsole operator | **In-game front end** — race setup menu builds the mission egg locally; an in-process console marshals every race (missions still only end on a console stop, exactly as designed in 1994) |
|
||||||
4. **Self-hosted sessions** — in-game race setup/join replacing the operator-driven
|
| TeslaLauncher relaunch-per-mission | **Single binary** — menu → race → results → menu in one process |
|
||||||
[TeslaConsole](https://gitea.mysticmachines.com/VWE/TeslaSuite.git) flow.
|
| WinSock TCP LAN mesh | **NetTransport seam** — the deterministic pod mesh unchanged, running over plain TCP (LAN/dev) or **Steam Networking Sockets** (FakeIP + Steam Datagram Relay) |
|
||||||
|
| Site network / fixed IPs | **Steam lobbies** — lobby owner is the console; members exchange FakeIPs and loadouts as lobby data |
|
||||||
|
|
||||||
See [docs/RP412-ROADMAP.md](docs/RP412-ROADMAP.md) for the plan and the
|
**Status: it works.** Release
|
||||||
Steam-multiplayer logistics.
|
[v4.12.2](https://gitea.mysticmachines.com/VWE/RP412/releases/tag/v4.12.2)
|
||||||
|
carries the first verified end-to-end internet build: three machines, three
|
||||||
|
Steam accounts, lobby → mesh → marshaled five-minute race → deaths and
|
||||||
|
respawns → timed stop → results on every machine → rematch from the same
|
||||||
|
lobby.
|
||||||
|
|
||||||
|
## Playing
|
||||||
|
|
||||||
|
Grab the release zip (or run `pack-dist.ps1` on a build). Single player:
|
||||||
|
run `start-windowed.bat` — the game boots into the race setup menu. Steam
|
||||||
|
multiplayer: see
|
||||||
|
[docs/STEAM-3-MACHINE-TEST.md](docs/STEAM-3-MACHINE-TEST.md) (until RP412
|
||||||
|
has its own AppID it runs under Spacewar, 480).
|
||||||
|
|
||||||
|
The two config files beside the exe are self-documenting: **environ.ini**
|
||||||
|
(every engine option, commented) and **bindings.txt** (every key, pad
|
||||||
|
button, and axis; written with the full default layout on first run).
|
||||||
|
Default controls: numpad flies (8/2/4/6 stick, 7/9 pedals, 0 trigger),
|
||||||
|
Shift/Ctrl throttle, Alt reverse, arrows look, Space fires, letter rows
|
||||||
|
are the MFD button banks as printed on the panel. **Alt+Q** aborts a
|
||||||
|
mission.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Unchanged from 4.11 for now — see [BUILD.md](BUILD.md)
|
**VS 2022 (v143)** + DirectX SDK June 2010 + the vendored Steamworks SDK
|
||||||
(VS 2005/2008 + DirectX SDK June 2010, `Release|Win32`, output `Release\rpl4opt.exe`).
|
(`extern/steamworks_sdk_164`) — see [BUILD.md](BUILD.md). Solution
|
||||||
Toolchain modernization is a roadmap item.
|
`WinTesla.sln`, configuration `Release|Win32`, output
|
||||||
|
`Release\rpl4opt.exe`.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
| Doc | Contents |
|
||||||
|
|-----|----------|
|
||||||
|
| [docs/RP412-ROADMAP.md](docs/RP412-ROADMAP.md) | The original plan and workstreams |
|
||||||
|
| [docs/RP412-FRONTEND-DESIGN.md](docs/RP412-FRONTEND-DESIGN.md) | TeslaConsole analysis, the egg format, the console protocol, and the Steam mapping — with status notes as each layer landed |
|
||||||
|
| [docs/STEAM-3-MACHINE-TEST.md](docs/STEAM-3-MACHINE-TEST.md) | Multiplayer test procedure, Steam Input notes, the abort key |
|
||||||
|
| [BUILD.md](BUILD.md) | Toolchain and build steps |
|
||||||
|
|
||||||
|
Dev tooling: `tools/two-pod-test.ps1` races two pods on loopback,
|
||||||
|
marshaled by a console feeder speaking the arcade Munga protocol.
|
||||||
|
|
||||||
## Related repositories
|
## Related repositories
|
||||||
|
|
||||||
| Repo | Role |
|
| Repo | Role |
|
||||||
|------|------|
|
|------|------|
|
||||||
| [RP411](https://gitea.mysticmachines.com/VWE/RP411.git) | Upstream arcade source (this repo's base) |
|
| [RP411](https://gitea.mysticmachines.com/VWE/RP411.git) | Upstream: the Win32 arcade port this repo Steamifies (full history preserved; remote `rp411` for cross-pulling fixes) |
|
||||||
| [VRIO](https://gitea.mysticmachines.com/VWE/VRIO.git) | Virtual RIO panel + vPLASMA display — input bindings and display emulation to fold in |
|
| [VRIO](https://gitea.mysticmachines.com/VWE/VRIO.git) | Virtual RIO panel + vPLASMA — source of the bindings format, the cockpit layout, and the keyboard lamp mirror |
|
||||||
| [TeslaSuite](https://gitea.mysticmachines.com/VWE/TeslaSuite.git) | TeslaConsole / Launcher / vPOD — the arcade session-control stack 4.12 replaces (and a reference for the Munga control protocol, TCP 1501) |
|
| [TeslaSuite](https://gitea.mysticmachines.com/VWE/TeslaSuite.git) | TeslaConsole / Launcher / vPOD — the arcade session-control stack 4.12 absorbed (and the reference implementation of the Munga control protocol, TCP 1501) |
|
||||||
|
|||||||
+1
-1
@@ -177,7 +177,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_STREAM << "Red Planet 4.12.1" << std::endl << std::flush;
|
DEBUG_STREAM << "Red Planet 4.12.2" << std::endl << std::flush;
|
||||||
DEBUG_STREAM << "L4CONTROLS=" << getenv("L4CONTROLS") << std::endl << std::flush;
|
DEBUG_STREAM << "L4CONTROLS=" << getenv("L4CONTROLS") << std::endl << std::flush;
|
||||||
|
|
||||||
#ifdef RP412_STEAM
|
#ifdef RP412_STEAM
|
||||||
|
|||||||
@@ -665,6 +665,10 @@ int
|
|||||||
gCallDone = False;
|
gCallDone = False;
|
||||||
SteamMatchmaking()->AddRequestLobbyListStringFilter(
|
SteamMatchmaking()->AddRequestLobbyListStringFilter(
|
||||||
kLobbyTagKey, "1", k_ELobbyComparisonEqual);
|
kLobbyTagKey, "1", k_ELobbyComparisonEqual);
|
||||||
|
// the default lobby search is distance-filtered (roughly same
|
||||||
|
// region) - RP412 races are worldwide
|
||||||
|
SteamMatchmaking()->AddRequestLobbyListDistanceFilter(
|
||||||
|
k_ELobbyDistanceFilterWorldwide);
|
||||||
SteamAPICall_t call = SteamMatchmaking()->RequestLobbyList();
|
SteamAPICall_t call = SteamMatchmaking()->RequestLobbyList();
|
||||||
gCalls.listResult.Set(call, &gCalls, &LobbyCalls::OnList);
|
gCalls.listResult.Set(call, &gCalls, &LobbyCalls::OnList);
|
||||||
if (!WaitForCall(15000))
|
if (!WaitForCall(15000))
|
||||||
|
|||||||
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
# ============================================================================
|
# ============================================================================
|
||||||
# pack-dist.ps1 — assemble a runnable Red Planet 4.12 package into dist\
|
# pack-dist.ps1 - assemble a runnable Red Planet 4.12 package into dist\
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
#
|
#
|
||||||
# Collects everything the game needs at run time:
|
# Collects everything the game needs at run time:
|
||||||
# - Release\rpl4opt.exe (+ .pdb for crash debugging)
|
# - Release\rpl4opt.exe (+ .pdb for crash debugging)
|
||||||
# - game data from assets\RP411 (AUDIO, GAUGE, VIDEO, INIs, RPL4.RES,
|
# - game data from assets\RP411 (AUDIO, GAUGE, VIDEO, INIs, RPL4.RES,
|
||||||
# TEST.EGG) — but not the arcade launch scripts or the old 4.10 exe
|
# TEST.EGG) - but not the arcade launch scripts or the old 4.10 exe
|
||||||
# - libsndfile-1.dll beside the exe; OpenAL32.dll copied from the system
|
# - libsndfile-1.dll beside the exe; OpenAL32.dll copied from the system
|
||||||
# when installed, with oalinst.exe included as the fallback installer
|
# when installed, with oalinst.exe included as the fallback installer
|
||||||
# - a desktop environ.ini (PAD;KEYBOARD controls, on-screen plasma)
|
# - a desktop environ.ini (PAD;KEYBOARD controls, on-screen plasma)
|
||||||
@@ -179,7 +179,7 @@ start rpl4opt.exe -windowed -res 1920 1080
|
|||||||
"@
|
"@
|
||||||
|
|
||||||
Set-Content -Path "$dist\README.txt" -Encoding ascii -Value @"
|
Set-Content -Path "$dist\README.txt" -Encoding ascii -Value @"
|
||||||
Red Planet 4.12.1
|
Red Planet 4.12.2
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Run start-windowed.bat (or: rpl4opt.exe -windowed -res 800 600 -egg TEST.EGG).
|
Run start-windowed.bat (or: rpl4opt.exe -windowed -res 800 600 -egg TEST.EGG).
|
||||||
@@ -223,7 +223,7 @@ $size = (Get-ChildItem $dist -Recurse | Measure-Object Length -Sum).Sum
|
|||||||
Write-Host ("dist ready: {0:N1} MB" -f ($size / 1MB))
|
Write-Host ("dist ready: {0:N1} MB" -f ($size / 1MB))
|
||||||
|
|
||||||
if ($Zip) {
|
if ($Zip) {
|
||||||
$zipPath = Join-Path $root 'RedPlanet-4.12.1.zip'
|
$zipPath = Join-Path $root 'RedPlanet-4.12.2.zip'
|
||||||
Write-Host "zipping to $zipPath..."
|
Write-Host "zipping to $zipPath..."
|
||||||
Compress-Archive -Path "$dist\*" -DestinationPath $zipPath -Force
|
Compress-Archive -Path "$dist\*" -DestinationPath $zipPath -Force
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user