Inspiration
Visual bugs are the most common defects in games: textures that fail to load, objects that fall through floors, characters sliding in a T-pose, shadows that vanish, normal maps lit upside down, LOD pops, NaN pixels from shaders. People find them by watching the screen. Small studios can't afford that, and tools that diff screenshots or ask an AI "does this frame look wrong?" never tell a developer which commit broke it or whether the fix works.
What it does
GlitchHunter plays the scenarios of a game's test plan and reads every frame with 19 OpenCV 5 detectors, then investigates like a QA engineer. Every next step is chosen from what OpenCV measured:
- Weak evidence → move closer. It ray-casts into the scene, moves the game camera 2-3x closer and measures again (a 121-px flicker at confidence 0.10 became a 900-px z-fighting region at 0.99).
- Other screen sizes. UI is replayed at 4:3 and 21:9, where anchored panels fall off the screen.
- Replay. Identical evidence on every run means 1 capture per commit; a random glitch gets more, computed from its reproduction rate.
- Visual git bisect. The OpenCV detector is the pass/fail test. Broken builds are skipped, merged branches are searched inside, and findings with the same culprit are one root cause.
- Fix and verify. It reverts the culprit on a branch and re-checks every scenario and screen size.
- A human approves before anything is filed; rejecting deletes the branch. Every decision is logged with its evidence.
It works with any engine: web games (three.js and others) in headless Chromium, Godot 4 natively over a small bridge, Unity and Unreal through the same 9-command protocol, or just a gameplay recording.
How we built it
- OpenCV 5.0, five detector families:
- classic: missing textures, z-fighting, freezes, flashes, exploded meshes, UI text read with the new OpenCV 5 DNN engine
- motion: DIS optical flow for physics jitter, stutter, LOD/culling pops, T-posing characters
- compare (vs the approved build): colour/gamma shifts, shadow acne, blurry textures, objects that fell through the floor
- lighting: inverted normal maps (windowed NCC of relief detail), missing shadows
- pixels: NaN blocks, off-screen UI
- Agent: 15 tools, a deterministic planner, and Claude on Amazon Bedrock as an LLM planner that sees the evidence images, with automatic fallback to the deterministic planner.
- Three test games, 28 planted bugs: Crypt Runner and Ironworks (three.js), and Hangar 9 (Godot 4) with CCD physics, an animation player, LOD, normal maps, particles and custom culling bounds.
- AWS: a CloudFormation stack (Graviton EC2, S3, Bedrock, CloudWatch, least-privilege IAM) and a one-command
deploy. - Dashboard, MCP server for developer agents, 111 tests, CI.
Challenges we ran into
- Several bugs at once: a desaturated grade made a painted line look like a "missing object". Tone normalisation plus a "same surface, different light" test fixed it.
- OpenCV's DIS optical flow keeps parameters tuned to the first small image it sees, so results depended on what ran before. One engine per image size fixed it and doubled speed.
- Under a moving camera, flow fails at every occlusion edge, so a pop must also be a one-frame step against the approved build's identical camera path.
- Making native engines deterministic enough to bisect: fixed time steps, seeded particles, input that only lands on advanced frames.
Accomplishments that we're proud of
| Game | Found + right culprit + verified fix (full agent) | Detection only (no agent) | False alarms on clean builds |
|---|---|---|---|
| Crypt Runner (three.js) | 100% | 79%, no culprits | 0 |
| Ironworks (three.js) | 90% | 80%, no culprits | 0 |
| Hangar 9 (Godot 4) | 82% | 82%, no culprits | 0 |
Ablations show the agent matters: without camera zoom Crypt drops to 86%, and without the screen-size sweep the cut-off HUD is missed. Lighting bugs (inverted normal map, missing shadow) and physics bugs (tunnelling, T-pose) were found and bisected on a native Godot build, including one hidden inside a merged branch.
What we learned
Letting the agent gather more evidence when it is unsure (move the camera, replay, add captures) beats tuning thresholds. Comparing with the approved build is what makes hard 3D bugs visible. Determinism is the contract that makes visual bisect work on any engine.
What's next
Run the Unity bridge in a real project and write the Unreal subsystem, add more physics detectors (clipping, floating objects), and let the LLM write targeted patches instead of reverts.
Built With
- amazon-bedrock
- amazon-cloudwatch
- amazon-ec2
- amazon-web-services
- aws-cloudformation
- aws-graviton
- claude
- docker
- fastapi
- godot
- opencv
- playwright
- python
- three.js
- unity
Log in or sign up for Devpost to join the conversation.