Commit graph

32 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
ce01c8888e Makes singleton variable name of PointerLockManager 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:42:22 +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
Jeena
a8adbcf140 fixes position state update and removes dev graphs for better fps 2015-08-02 16:06:32 +02:00
Jeena
aff23e8de0 better handling of dangerousnes, etc. fixes #107 2015-04-02 22:49:43 +02:00
logsol
f9d97c5a47 trying a new approach to calculating damager 2015-04-02 19:35:10 +02:00
Jeena
16826b174a fixed debug view and ragdoll start positioning 2015-03-16 01:50:41 +01:00
logsol
5f5fec5b10 added optimizer scripts and some code style improvements 2015-03-09 04:56:28 +01:00
logsol
67507333c4 added ping histograph and made disconnect clear with page reload. fixes #104 fixes #122 2015-03-03 15:34:43 +01:00
Jeena
f4c7d9edeb cleanup debug canvas #36 2015-03-01 15:09:14 +01:00
logsol
20a974124e added new debug draw 2015-02-28 21:27:42 +01:00
logsol
13af9ecb9c worked a bit on menu top bar 2015-02-28 19:57:05 +01:00
logsol
60eae208a2 Added PointerLockManagement, Fixed layer positioning, added fps chart. fixes #120, fixes #121, fixes #123 2015-02-27 18:44:30 +01:00
Jeena
e452399caf added menuBar 2015-02-22 18:39:35 +01:00
logsol
2b186be8af use strict; fixes #83 2014-12-22 01:43:21 +01:00
Jeena
9e6c42f221 removed game.html, fixes #85 2014-06-28 23:43:58 +02:00
Jeena
c2033b34c4 removed reset level button, fixes #68 2014-06-07 20:01:17 +02:00
Jeena
9ec3324c29 not removing canvas from DOM anymore, fixes #63 2014-06-07 12:07:54 +02:00
logsol
f7ca9d2393 nc merge 2014-03-17 21:58:54 +01:00
logsol
4f4bbf73e8 nc refuckulating 2014-03-17 21:46:19 +01:00
Jeena
96bf9bffbd NC refactoring 2014-03-17 21:45:40 +01:00
logsol
672a46efa8 replaced NotificationCenter with Nc 2014-03-01 11:07:23 +01:00
Jeena
d84fb20f90 fixes #12 and added health 2014-02-10 14:21:26 +01:00
Jeena
4afc39081d debug draw overlay, fullscreen 2014-01-16 16:09:17 +01:00
jeena
764220675b added joints 2013-12-28 02:39:32 +01:00
logsol
067114eaf5 improved the view management 2013-12-18 01:09:12 +01:00
logsol
907ef49a53 checked paths for inheritance in client 2013-12-09 16:48:37 +01:00
logsol
551fc943c9 replaced ){ with ) { 2012-07-28 15:00:59 +02:00
logsol
7e5eeb0a27 changed function( to function ( 2012-07-28 13:38:31 +02:00
logsol
26f3d22db7 replaced all tabs with 4 spaces 2012-07-28 13:26:05 +02:00
logsol
1a536f0fea altered define paths 2012-07-21 22:11:01 +02:00
logsol
bd45f538c7 some more renaming 2012-07-21 21:37:24 +02:00
Renamed from app/game/Client/View/DomController.js (Browse further)