Repository navigation
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.
Feature/network debugging
GET /api/game/routes lists every route of the game server, read from the Express app when asked: method, path, path parameters, whether the engine, the game or a plugin registered it, and whether it only exists in development. Plugins are told apart by wrapping their setup and http hooks. Routes say what they do with describeRoute(), which is optional; the engine's own routes are described. The CLI dashboard gets a Routes tab and the editor a Server tab in the bottom dock, both showing that list as a table.
The activity bar now switches between the scene editor and the server's endpoint list, which takes the whole area next to the bar instead of a tab in the bottom dock. It is laid over the editor, so the viewport and the docks keep their state. The placeholder icons that did nothing are gone.
The activity bar gets a third entry that lists the plugins in the project's mavonengine.json: version, target, description, license, supported engine range and readme, plus the HTTP endpoints and prefabs that come from each one. Plugins that are missing or invalid are listed with the reason. The details come from a new dev server endpoint, GET /__mavonengine/plugins, which reads the config and the packages from disk on every request. Endpoints come from the game server's route list and prefabs from the editor's registry. Readmes are rendered by a small Markdown renderer that builds React elements, drops HTML and loads no images.
GET /api/game/plugins lists the plugins of the server's project: every plugin in mavonengine.json with its version, target and prefabs, plus plugins passed to the server directly, and whether each one's server entry is running. Readmes are left out; the dev server still sends them to the editor. The dashboard fetches the list together with the routes and shows it on a sixth tab: a table of the plugins, and for the selected one its details, prefabs and the HTTP endpoints it registered.
…d and editor plugins.json at the repository root lists the plugins anyone can install, starting with @mavonengine/http-monitoring. It is read from the main branch on GitHub whenever it is asked for: - `mavonengine plugins` prints it, marking what the project has - the dashboard's Plugins tab and the editor's Plugins view show the plugins the project doesn't have yet - the editor shows an available plugin's readme, fetched from the `readme` URL the list gives for it Under `mavonengine dev` those plugins, and from the editor any other package, can be installed without leaving the tool. `mavonengine dev` runs the install, adds plugins to mavonengine.json and restarts the dev script. The editor reaches it through the Vite dev server, which takes install requests only from localhost and from the game's own page, and refuses anything a shell could read as more than a package. Both ask first: installing a package runs its code on the machine, so the dialog says so, links to the source and wants a confirmation that it was checked.
The name follows the connection in a message of its own. The test read the server's players once, right after the browser said it was connected, and failed when the server had the player but not yet its name. It now asks again until the name is there, and says which names it got when it isn't.
Feature/http routes
@mavonengine/chat adds text chat to a multiplayer game. The client entry puts a chat box on screen, built with plain DOM, and passes what is typed to the server over the game's connection. The server entry cleans up what is said, limits its length and rate, keeps muted players quiet and passes it on to everyone, or with a `range` only to players close to the sender. It announces who joins and leaves, sends new clients the recent messages, and has an admin API to read the chat, announce something and mute or unmute players. Every message also reaches the game as a `chat:message` event. Listed second in plugins.json.
A game server now has a single admin token: `adminToken` in its options, or MAVONENGINE_ADMIN_TOKEN. Plugins get `ctx.requireAdmin`, a guard for their admin routes that asks for it as a bearer token and without one only lets localhost through, and `ctx.adminToken.matches()` to check it when it arrives another way. They never see the token itself. The token also reads the metrics endpoints and turns them on in production; the metrics token stays read-only. The dashboard and `mavonengine mcp` fall back to it. Routes behind the guard list who may call them. The chat plugin drops its own admin token and uses the guard. The monitoring dashboard logs in with the admin token as the password or as a bearer token; its htpasswd file stays as an optional login per person, and its own user and password from the environment are deprecated.
`chat(server)` gives a game's server its say in the chat: `intercept` runs before a message goes out and can change it, drop it, answer the sender alone or send it to some players only, and `onMessage` is told every message after it went out, with who got it. Callbacks can be registered before the server starts. `chat(game)` does the same in the browser: listeners for messages, notices and the history, `send`, and the chat box itself. A game that shows the chat itself now gets notices and the history too, which only the built-in box got before. The chat box takes a `position` option, and the README documents the hooks and how to style the box. The hooks live on the global object under a registered symbol, since the game imports the package by name while the engine loads the plugin by path, which can be two copies of the module.
`mavonengine mcp` gets three tools. `list_plugins` shows the plugins in the project's mavonengine.json with the HTTP endpoints each registered. `available_plugins` lists the official plugins from plugins.json with what they do, the command that installs them and whether the project has them, and `plugin_readme` reads one's README, so an assistant can suggest a plugin and set it up instead of building what one already does. The last two read GitHub when they are used. `--plugins-url` or MAVONENGINE_PLUGINS_URL points them at another list, `--no-plugin-list` leaves them out. Everything stays read-only: installing is for the user.
Feature/chat plugin
core 0.0.23, cli 0.0.3, editor 0.0.10, http-monitoring 0.0.2 and the multiplayer template 0.0.5, with its lockfile on the published packages. The CLI's template URL points at the 0.0.17-alpha tag.
The timeline reads the server and the tab one after the other, so the newest state on one side can be missing on the other: compare the newest state and input that both sides have. A runner without a GPU renders a few frames a second, so trace for longer and ask for fewer frames.
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.