netcode-revival: document Phase 1 status + two-instance test recipe
This commit is contained in:
parent
dbe8afaa57
commit
2bc46451fc
1 changed files with 25 additions and 7 deletions
|
|
@ -40,13 +40,31 @@ Implemented in `rexglue-sdk/src/kernel/xam/xam_net.cpp`:
|
||||||
- `getsockopt`: real basic reads off the native socket.
|
- `getsockopt`: real basic reads off the native socket.
|
||||||
- `XNetSetSystemLinkPort`: accept.
|
- `XNetSetSystemLinkPort`: accept.
|
||||||
|
|
||||||
## Phase 1 — relay game-transport + session registry (next)
|
## Phase 1 — relay game-transport + session registry (done, built)
|
||||||
- Extend `ghost_relay` to forward game UDP between room members + expose the
|
- v5 relay: `kTypeGame` (opaque game UDP, unicast or room-broadcast) +
|
||||||
session list that `XNetQosLookup` reads.
|
`kTypeSessionQuery`/`Reply` (discovery). JoinPayload carries the virtual IP.
|
||||||
- Give rexglue `XSocket` a relay-transport mode (recognize `10.80.0.x`
|
- rexglue `XNetTransport`: joins the same relay + room as the ghost client,
|
||||||
virtual destinations; route via the relay outbound).
|
routes `sendto` to `10.80.0.x` peers through the relay, injects inbound
|
||||||
- Test: two game instances on one machine (loopback through the relay) reach
|
game datagrams into the game's sockets, and serves session discovery to
|
||||||
a joined session.
|
`XNetQosLookup`.
|
||||||
|
- Wire structs byte-verified against the game's proto (sizes 7/31/1410/25/801)
|
||||||
|
with `static_assert`s on both sides.
|
||||||
|
|
||||||
|
## Test recipe (two instances on one machine, local relay)
|
||||||
|
1. Build: `cmake --build out/build/linux-relwithdebinfo --target ghost_relay skate3 -j$(nproc)`
|
||||||
|
2. Start the local relay: `./out/build/linux-relwithdebinfo/ghost_relay --port 40001`
|
||||||
|
3. Launch instance A: `./out/build/linux-relwithdebinfo/skate3`
|
||||||
|
Launch instance B (same machine; the relay loops them via 127.0.0.1).
|
||||||
|
4. In each instance's M menu: set `skate3_ghost_server = 127.0.0.1`, enable
|
||||||
|
multiplayer, join the SAME room code. The relay then routes both the ghost
|
||||||
|
poses and the game's own netcode traffic.
|
||||||
|
5. Verify in the log (stdout): `xnet transport: connecting to relay ...`,
|
||||||
|
`xnet transport: relay joined`, and on session search
|
||||||
|
`xnet transport: session reply with N session(s)`. Enable the game's
|
||||||
|
online flow (invite/join) and check whether RakNet establishes a session.
|
||||||
|
6. Two instances bind the same UDP data port → the second may fail to bind.
|
||||||
|
If so, the game's socket bind must become relay-aware (bind to an
|
||||||
|
ephemeral port in relay mode) — a known Phase 3 item.
|
||||||
|
|
||||||
## Phase 2 — invite UI
|
## Phase 2 — invite UI
|
||||||
- `XamShowGameInviteUI` / `XamShowFriendsUI` as ImGui `XamDialog`s backed by
|
- `XamShowGameInviteUI` / `XamShowFriendsUI` as ImGui `XamDialog`s backed by
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue