# Glitchless: game observability for Three.js, Phaser, Unity and Godot

> Vibe debugging for your games. Glitchless shows where your game lags, crashes and loses players, then gives your coding agent the data to fix it.

Website: https://www.glitchless.gg · Source: https://github.com/glitchless-gg/glitchless (MIT) · Pricing: https://www.glitchless.gg/pricing.md · Start free: https://app.glitchless.gg · Privacy: https://www.glitchless.gg/privacy.md · Terms: https://www.glitchless.gg/terms.md

## What it does

- **Frame time.** Every frame is timed on every player's device, by level and release. Each hitch comes with its likely cause: a long script, a shader compile, garbage collection or an asset load.
- **Crashes.** Errors are grouped into issues, each with what the player did just before it.
- **Where players give up.** Level funnels, death heatmaps and rage-quit detection.
- **Findings.** Problems ranked worst first, each with its evidence and a suggested fix.
- **Your coding agent.** The MCP server (`glitchless-mcp`) gives Claude Code, Codex, Cursor or any MCP client the same data you see. WebMCP tools in the running game let the agent load a level, reproduce a bug and measure it.
- **Playtest bots.** `glitchless-playtest` plays the old build and the new one with the same seeds, then compares frame time, draw calls, errors and deaths. A regression exits with code 1, so it can block a pull request. Agents can run it with the `glitchless_playtest` tool.
- **Privacy.** Anonymous by default: no player IDs, no device fingerprints and no positions. Full mode, for heatmaps and replays, is opt-in.
- **Overhead.** About 30 ns of work a frame, and one small gzipped request every 15 seconds.

Engines: Three.js (and React Three Fiber or plain WebGL) and Phaser 3 and 4 in the browser, Unity 2022.3 LTS and Unity 6, and Godot 4.5+ on desktop and mobile. It can also send the same data to Datadog or any OpenTelemetry backend.

## A bug it found and fixed

Zoomies is a Three.js platformer. Every tennis ball the player picked up fired 800 confetti meshes, each drawn twice for its shadow, and the game never removed them, so it slowed down with every pickup.

1. Glitchless flagged it: frame-time spikes on level 2, p95 51 ms against a 16.7 ms budget, with 74% of hitches within 1.5 s of a powerup and the particle count stuck at 1,600.
2. Claude Code read that finding over MCP, reproduced it with WebMCP (3,494 draw calls a frame) and replaced the confetti with one reusable InstancedMesh.
3. Playtest bots played both builds, three runs each with the same seeds: draw calls went from 4,652 to 286 a frame, render time from 12.3 ms to 1.3 ms, and p95 frame time from 33.1 ms to 16.8 ms, which is 60 fps.

## Set it up

Paste the setup prompt into your coding agent and it does the rest: https://github.com/glitchless-gg/glitchless/blob/main/docs/agent-setup-prompt.md

Or by hand, for a web game:

```bash
npm install glitchless                    # the SDK
npx -y glitchless-mcp                     # the MCP server, added to your agent's MCP settings
npx glitchless-playtest --save baseline   # save a baseline, then run `npx glitchless-playtest` after a change
```

For Phaser 3 or 4, install the same package and call `instrumentPhaser(glitchless, { game, Phaser })` from `glitchless/phaser` after creating the game.

For Unity 2022.3 or 6, open Package Manager, choose **Add package from git URL** and paste `https://github.com/glitchless-gg/glitchless.git?path=unity/Packages/gg.glitchless.sdk`.

For Godot 4.5+, copy `godot/addons/glitchless` from the repository into your project.

## Questions

### How do I find performance problems in my Three.js game?
Add the Glitchless SDK. It times every frame on your players' machines, groups slow frames by level and release, and names the likely cause of each hitch. The findings page ranks the worst problems with their evidence.

### Can my coding agent see how real players experience my game?
Yes. Add the `glitchless-mcp` server to Claude Code, Codex, Cursor or any MCP client. Your agent can then triage findings, read errors with the gameplay before them, compare releases and run playtest bots.

### How do I check that a fix didn't make the game worse?
Run `npx glitchless-playtest --save baseline` before the change and `npx glitchless-playtest` after it. Bots play both builds with the same seeds and the run fails if anything got worse.

### Does it work with Godot?
Yes, with Godot 4.5 and later. The addon sends the same events as the web SDK, including errors from Godot's loggers.

### Does it work with Unity?
Yes, with Unity 2022.3 LTS and Unity 6. The package times update, physics and render for every frame, reads Unity's profiler counters for draw calls and memory, and catches errors from Unity's log.

### Does it work with Phaser?
Yes, with Phaser 3 and 4. One call hooks Phaser's game loop, treats each scene as a level and reports a game that freezes after an uncaught error.

### Is it free?
The open-source version is free (MIT) and runs on a laptop or in your own AWS account. The hosted version is free for 5,000 play sessions a month; paid plans start at $19 a month.
