Commit graph

10 commits

Author SHA1 Message Date
a0481ed867 Route gameCommand traffic through WebRTC unreliable DataChannel
Socket.IO (TCP) holds back later packets while it retransmits a lost
one, which stalls worldUpdate delivery on lossy long-distance links —
exactly the pattern game state suffers worst from. WebRTC DataChannels
in unreliable mode (ordered:false, maxRetransmits:0) drop late packets
instead of queueing them, which is what we want for high-frequency
state sync.

Adds a per-user WebRTCTransport on top of the existing Socket.IO
connection. Socket.IO stays in charge of bootstrap, signaling
(SDP/ICE exchange), and control messages — only gameCommand payloads
get routed onto the unreliable channel once it's open. If WebRTC
fails to negotiate, gameCommand transparently falls back to
Socket.IO, so the game keeps working unchanged.

A new StatsLogger writes per-session JSONL events (session_start,
webrtc_ready with negotiation time, per-second stats with transport,
RTT samples, recv/send rates, seq gaps) so we can compare real-world
runs (e.g. Germany server <-> Korea client) instead of guessing.
URL flag ?webrtc=0 forces fallback for A/B testing.

scripts/webrtc-browser-test.js spins up a headless Chromium against
a freshly-started server and asserts the unreliable channel opens
and gameCommand traffic actually rides it.
2026-05-11 00:38:18 +00:00
logsol
3cb2e39a18 Makes singleton variable name of NotificationCenter lowercase
When we require a singleton, its instance name should be named
by lowercase, since it is not a class.

Relates to #128
2016-10-10 22:11:55 +02:00
logsol
6b472dc134 added max user and refactored coordinator/serveruser a bit fixes #105 2015-03-03 23:43:15 +01:00
logsol
3138509a57 added current channel user playing to list. fixes #106 2015-02-22 19:30:37 +01:00
logsol
2b186be8af use strict; fixes #83 2014-12-22 01:43:21 +01:00
logsol
76d9450257 Finished nc (notification center topic style refactoring) - fixes #60 2014-03-17 23:12:08 +01:00
logsol
4f4bbf73e8 nc refuckulating 2014-03-17 21:46:19 +01:00
Jeena
39bdac0d7b fixed #57 2014-03-02 01:15:33 +01:00
Jeena
810a74a28b fixed #58 2014-03-01 23:11:36 +01:00
Jeena
d83376d5c7 refactored Server and Lobby 2014-03-01 14:07:03 +01:00
Renamed from app/Lobby/User.js (Browse further)