Implement direct P2P session scaffolding
CI / build-and-test (pull_request) Successful in 1m14s

This commit is contained in:
2026-09-17 16:22:59 +02:00
parent 0454ca9e8a
commit c390f4945f
5 changed files with 320 additions and 32 deletions
+20
View File
@@ -10,3 +10,23 @@ A Bevy game, editable in the [jackdaw](https://github.com/jbuehler23/jackdaw) ed
in `assets/*.bsn`.
- Components you derive `Reflect` on appear in the editor's inspector
automatically; no registration code is needed.
## Direct P2P Debugging
The debug match can be run as two processes over UDP. Each process uses a
different local port, and remote player declarations are keyed by the GGRS
player handle:
```text
# Process 1 owns player 0 and listens on 7000.
cargo run -- --debug-match --players 2 --local-port 7000 \
--net-player 0=local --net-player 1=127.0.0.1:7001
# Process 2 owns player 1 and listens on 7001.
cargo run -- --debug-match --players 2 --local-port 7001 \
--net-player 0=127.0.0.1:7000 --net-player 1=local
```
Without `--net-player`, all requested players are local. This direct UDP
configuration is intentionally separate from match selection so a future
lobby provider can supply the same player roles and addresses.