Back to directory
abczsl520 avatar
abczsl520 / game-quality-gates

game-quality-gates

๐ŸŽฎ Game dev quality gates โ€” 12 universal rules + Phaser/Three.js guides + anti-cheat patterns + pre-deploy checklist. Born from fixing 70+ real bugs. OpenClaw Agent Skill.

4

Stars

0

Forks

0

Watchers

MIT

License

๐ŸŽฎ Game Quality Gates

Stop shipping games with phantom timers, memory leaks, and double-spend exploits. A battle-tested quality standard for H5/Canvas/WebGL games.

ClawHub License: MIT Wiki OpenClaw Skill


๐Ÿ’€ The Problem

Every feature works fine alone. They break in combination:

Feature A + Feature B = Bug
Slow powerup Paddle collision Speed value overwritten
Multi-ball Main ball death Orphan sub-balls still scoring
Power-up falling Player dies Ghost objects after game over
Game over Buff timers Phantom timer modifies destroyed object ๐Ÿ’ฅ

These aren't edge cases โ€” they're the #1 cause of game bugs. After fixing 70+ of these bugs in production H5 games, we encoded the prevention patterns into 12 universal rules.

๐Ÿ“‹ The 12 Universal Rules

# Rule Prevents
1 ๐Ÿ”„ Single Cleanup Entry Point "Fixed in A, forgot in B"
2 โšก Respect Active Buffs Buff silently overwritten
3 ๐Ÿ“ฆ Cache Before Destroy Reading dead object props
4 โฐ Timers Follow Lifecycle Phantom timers after game over
5 ๐Ÿ–ฅ๏ธ Frame-Rate Independent 30fps device = half speed
6 ๐Ÿšช Scene Switch = Full Cleanup Memory grows per restart
7 ๐Ÿ”Š Audio Lifecycle iOS silent, background still playing
8 ๐Ÿ‘† Input Safety Double-buy, rapid-fire exploits
9 ๐Ÿ’พ Save State Versioning Broken saves after update
10 ๐ŸŒ Network Fault Tolerance Game freezes on bad network
11 ๐Ÿ“ฆ Asset Loading Strategy White screen, missing textures
12 ๐Ÿ›ก๏ธ Anti-Cheat Baseline Score injection, payment bypass

๐Ÿ‘‰ Read full details in the Wiki โ†’

๐ŸŽฏ Engine-Specific Guides

Phaser 3 (Arcade Physics)

  • Multi-touch pointer.id tracking (the finger-swap bug)
  • physics.pause() โ‰  time pause (the phantom timer gotcha)
  • OVERLAP_BIAS tuning (3-4 recommended)
  • Physics group clear(true, true) between levels

Three.js (WebGL/3D)

  • The dispose trio: geometry + material + texture (VRAM leak prevention)
  • GLB compression pipeline: 14MB โ†’ 800KB (94% reduction)
  • gltf-transform prune Skin deletion pitfall on rigged models
  • Animation crossfade state machine

Anti-Cheat

  • One-time raid tokens (link start โ†’ submit)
  • Duration + score sanity checks
  • Atomic purchase endpoints (no split deduct/grant)

โšก Install

OpenClaw users:

clawhub install game-quality-gates

Manual:

git clone https://github.com/abczsl520/game-quality-gates.git ~/.openclaw/skills/game-quality-gates

Not using OpenClaw? The wiki is pure knowledge โ€” useful for any game developer. Just read the docs.

โœ… Pre-Deploy Checklist (Quick)

๐Ÿ”ด Universal (every game)
  โ–ก New objects in cleanupGameState()?
  โ–ก New timers cancelled in cleanup?
  โ–ก Buffs respected when modifying attributes?
  โ–ก Data cached before destroy()?
  โ–ก Delta time used for movement?
  โ–ก No memory leaks across scenes?
  โ–ก Audio pauses on background?
  โ–ก Purchase has click-lock?
  โ–ก Saves have version + migration?
  โ–ก Network has timeout + fallback?
  โ–ก Asset failure degrades gracefully?
  โ–ก Critical ops server-validated?

๐ŸŸก Mobile: multi-touch IDs, iOS audio resume, WeChat WebView compat
๐Ÿ”ต Phaser: clear(true,true), OVERLAP_BIAS, time+physics pause sync
๐ŸŸฃ Three.js: dispose trio, Draco loader, fadeIn/fadeOut transitions

๐Ÿ‘‰ Full checklist with details โ†’

๐Ÿ“š Documentation

๐Ÿ“– Full Wiki โ†’

Page What You'll Learn
Universal Rules The 12 core rules with code examples
Phaser Guide Phaser 3 specific patterns
Three.js Guide WebGL/3D specific patterns
Anti-Cheat Patterns Server-side validation
Pre-Deploy Checklist Copy-paste before every release
Real Bug Examples Actual production bugs & fixes
Installation Setup guide

๐Ÿ“ Skill Structure

game-quality-gates/
โ”œโ”€โ”€ SKILL.md                    # 12 rules + checklists (auto-loaded by OpenClaw)
โ””โ”€โ”€ references/
    โ”œโ”€โ”€ phaser.md               # Phaser-specific (loaded on demand)
    โ”œโ”€โ”€ threejs.md              # Three.js-specific (loaded on demand)
    โ””โ”€โ”€ anti-cheat.md           # Anti-cheat patterns (loaded on demand)

๐Ÿ“Š Origin

  • Source: Pixel Bounce (ๅƒ็ด ๅผน็ƒ็Ž‹) โ€” 70+ bugs across 10 audit rounds
  • Source: Tripo 3D Demo (ๆŸฏๅŸบ่ท‘้…ท3D) โ€” GLB compression + animation
  • References: Phaser forum best practices, Three.js dispose docs, web game anti-cheat literature (2024-2025)

๐Ÿ”— Part of the AI Dev Quality Suite

Skill Purpose Install
bug-audit Dynamic bug hunting, 200+ pitfall patterns clawhub install bug-audit
codex-review Three-tier code review with adversarial testing clawhub install codex-review
debug-methodology Root-cause debugging, prevents patch-chaining clawhub install debug-methodology
nodejs-project-arch AI-friendly architecture, 70-93% token savings clawhub install nodejs-project-arch
game-quality-gates (this) 12 universal game dev quality checks clawhub install game-quality-gates

๐Ÿค Contributing

Found a missing pattern? Have engine-specific rules for PixiJS, Babylon.js, or Unity WebGL? Open an issue or submit a PR!

๐Ÿ“„ License

MIT โ€” Use freely, attribution appreciated.


โญ If this saved you from a production bug, star the repo โ€” help other game devs find it!