Skip to content

Play with up to 10 consoles through an in-editor relay - #228

Merged
rixnobis merged 2 commits into
mainfrom
net-relay
Oct 20, 2026
Merged

rixnobis merged 2 commits into
mainfrom
net-relay

Conversation

@rixnobis

Copy link
Copy Markdown
Contributor

Play boots 1 to 10 consoles. With 3 or more (or 2 with "Use the Relay") each Redux connects as an SIO1 client to a relay in the editor, a C++ port of psnl_server's default relay: slots 1..10 per scene hash, Event ack and fan-out, ObjectState/AppData, Ping/Pong and 30 Hz snapshots byte-equal to psnl's Room.build_snapshot. Console k starts once the relay accepted connection k, so relay slot k is console k.

The Game view shows a grid with each console's slot, and the Play output popup gets a Network tab listing routed packets by console and type, with Pause.

Tests: testRelay* in editor_tests (CRC, framing, Redux's protobuf wire, rooms, snapshots checked against psnl's Python), relayviewcheck.py with 4 fake consoles in CI, and relayplaycheck.py where 3 real Redux reach Connected as slots 1, 2 and 3 (needs Redux, so it runs by hand).

editor/relay ports psnl_server's default relay to C++: PSNL frames,
redux's SIO1 protobuf wire, rooms by scene hash with slots 1..10,
Event ack/dedupe/fan-out, ObjectState/AppData relay, Ping/Pong, a
30 Hz snapshot byte-identical to psnl's, and an unsolicited HelloAck
on every room change so player counts stay current. Play boots 1-10
consoles (2 link directly unless Use the Relay is on), starts console
k only after the relay accepted connection k, lays them out in a
grid, and the output popup gains a Network view of routed packets.
@rixnobis
rixnobis merged commit b0a825d into main Oct 20, 2026
5 checks passed
@rixnobis
rixnobis deleted the net-relay branch October 20, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant