Repository navigation
Feature/network debugging - #35
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.