Skip to content

Feature/network debugging - #35

Merged
mattvb91 merged 5 commits into
devfrom
feature/network-debugging
Nov 10, 2026
Merged

mattvb91 merged 5 commits into
devfrom
feature/network-debugging

Conversation

@mattvb91

Copy link
Copy Markdown
Member

No description provided.

…rk panel

Stamp every sv_state with the server tick, server time and the receiver's
last processed input (ack), so clients and tools can tell states apart.

Record the traffic of both sides in development: every message through
the game socket with its size, and events such as connect, disconnect,
dropped, sync_enter / sync_leave, state_gap and state_out_of_order.
Nothing is recorded in production and the socket is left untouched there.

- core: NetRecorder, geckos taps, Server.syncSnapshot(), the client's
  serverView, GET /api/game/dev/net/* and the packets / packet bridge queries
- cli: network_packets, network_packet, network_sync, network_timeline,
  client_packets and client_packet MCP tools
- editor: Network panel with packet list, timeline and state sync, and a
  viewport overlay with server ghosts and sync radius rings
The fifth dashboard tab shows the game socket while developing: each
player's state sync, the traffic of the last 5 seconds by message, and
every packet and network event, newest first. A click or the arrow keys
open a packet's payload next to the list.

Packets are only fetched while the tab shows. The simulator produces
packets, sync data and payloads, so `--sim` fills the tab too.

The network debug endpoints are left out of the HTTP request log: the
dashboard and the editor poll them several times a second.
…heck

The server stringified every sv_state and every incoming command only to
count bytes, on top of geckos.io serializing them to send. Bandwidth is
now read from the WebRTC connections' own byte counters at each metrics
sample, and a state is only serialized by the server while the network
recorder is on.

Bandwidth figures now cover everything on the connection rather than
only sv_state and command payloads.

The actor change check serializes once per update instead of twice and
no longer base64 encodes the result, which also threw on characters
outside Latin-1.
The Network tab added packets, packetsAvailable, sync and packetDetail to
DashboardState. This one hand-built state was missed, which failed the
cli type check.
On the Windows runner the Network tab never showed up within the 30s of
a click, and nothing told why: page errors are only checked at the end
and the job kept no screenshots.

The test now waits for the editor's UI on its own, for up to 120s, and
logs how long it took. A page error while waiting fails it right away.
On any failure it prints page errors, console errors, failed requests,
the state of each page and the end of the server's output, and saves a
screenshot per page, which CI uploads.

The editor logs when its UI can't be loaded instead of staying blank.
@mattvb91
mattvb91 merged commit 8eb7c56 into dev Nov 10, 2026
2 checks passed
@mattvb91
mattvb91 deleted the feature/network-debugging branch November 10, 2026 18:52
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