Commit graph

21 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
5b3bfd4370 Makes singleton variable name of OptionsHelper 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 23:11:18 +02:00
logsol
05c4e4de81 Refactoring of Options. Renamed to OptionsHelper
Because that is what it is.
2016-10-10 23:10:43 +02: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
5f5fec5b10 added optimizer scripts and some code style improvements 2015-03-09 04:56:28 +01: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
06351e5828 reenabled all maps 2015-02-19 18:52:57 +01:00
Jeena
e404ad3598 fixes #78 revisited weight handycap 2015-02-15 01:38:16 +01:00
logsol
5caa21f453 fixed item throw interface of ragdoll fixes #93 2015-02-07 14:30:55 +01:00
logsol
340f05b8d9 fixed some bugs related to use strict 2014-12-22 02:43:12 +01:00
logsol
2b186be8af use strict; fixes #83 2014-12-22 01:43:21 +01:00
logsol
1a71fa38f9 added background, still needs parallax style scrolling though! - fixes #89 2014-07-23 23:43:36 +02:00
Jeena
cc8cf6c5f9 sort maps in api 2014-07-03 20:35:12 +02:00
Jeena
6bc9b7e32b api getMaps for create channel 2014-07-03 20:28:18 +02:00
logsol
55256ada95 work in progress... worked on channel attributes and game goal. fixes #45 and references #48 2014-03-30 00:12:04 +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