Rechercher

PythonReactSEOPDF
OpenClaw

game-quality-gates

Game development quality gates and mandatory checks. Activate when building, reviewing, debugging, or deploying any game project (H5/Canvas/WebGL/Phaser/Three.js/2D/3D). Covers state cleanup, lifecycle management, input handling, audio, persistence, networking, anti-cheat, and performance. Use as pre-deploy checklist or when diagnosing game-specific bugs (state leaks, phantom timers, buff conflicts, memory growth, touch issues).

abczsl5200 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install abczsl520/game-quality-gates

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Game Quality Gates

Mandatory quality standards for all game projects. Based on 70+ real bugs and industry best practices.

Core Principle

Bugs come from cross-state interactions, not individual features. Each feature works alone; they break in combination.

12 Universal Rules (all games)

1. Single Cleanup Entry Point 🔄

All exit paths (death/level-complete/quit/pause/scene-switch) call ONE cleanup method with options.

cleanupGameState(opts) {
  // Fixed order: sub-objects → buffs+timers → UI → projectiles → (optional) enemies/controls/events
}
// Every exit: resetBall(), levelComplete(), gameOver(), onShutdown() → calls this

New feature = add one line here. Never scatter cleanup across exits.

2. Respect Active Buffs ⚡

Any code modifying attributes (speed/attack/size/defense) must check for active temporary effects first.

// ❌ speed = Math.max(speed, BASE_SPEED);  // ignores slow buff
// ✅ speed = Math.max(speed, this._currentBaseSpeed);  // buff-aware baseline
3. Cache Before Destroy 📦

Extract all needed data before destroy()/dispose()/remove().

const { x, y } = obj; const color = obj.getData('color');
obj.destroy();
spawnParticles(x, y, color);
4. Timers Follow Lifecycle ⏰

Track all setTimeout/setInterval/delayedCall/rAF. Cancel in cleanup.

this.activeTimers.push(this.time.delayedCall(10000, cb));
// In cleanup: this.activeTimers.forEach(t => t.remove(false));
5. Frame-Rate Independent Logic 🖥️

Multiply all time-dependent logic by delta. Never assume 60fps.

// ✅ player.x += speed * (delta / 1000);
  • Phaser update(time, delta): delta in ms, divide by 1000
  • Three.js clock.getDelta(): returns seconds
  • Physics: prefer fixed timestep (accumulate delta, step every 16.67ms)
6. Scene Transition = Full Cleanup 🚪

On scene/level switch, clean: event listeners, timers, rAF, audio nodes, object pools, WebGL resources (geometry/material/texture d...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/abczsl520/game-quality-gates
Version
—
Commit
d9237dc2eafb2b5285997087ab0efe67c348eb02
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

README

🎮 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...

Contenu extrait

SKILL.md
# Game Quality Gates

Mandatory quality standards for all game projects. Based on 70+ real bugs and industry best practices.

## Core Principle

> Bugs come from **cross-state interactions**, not individual features.
> Each feature works alone; they break in combination.

## 12 Universal Rules (all games)

### 1. Single Cleanup Entry Point 🔄
All exit paths (death/level-complete/quit/pause/scene-switch) call ONE cleanup method with options.

```js
cleanupGameState(opts) {
  // Fixed order: sub-objects → buffs+timers → UI → projectiles → (optional) enemies/controls/events
}
// Every exit: resetBall(), levelComplete(), gameOver(), onShutdown() → calls this
```

**New feature = add one line here. Never scatter cleanup across exits.**

### 2. Respect Active Buffs ⚡
Any code modifying attributes (speed/attack/size/defense) must check for active temporary effects first.

```js
// ❌ speed = Math.max(speed, BASE_SPEED);  // ignores slow buff
// ✅ speed = Math.max(speed, this._currentBaseSpeed);  // buff-aware baseline
```

### 3. Cache Before Destroy 📦
Extract all needed data before `destroy()`/`dispose()`/`remove()`.

```js
const { x, y } = obj; const color = obj.getData('color');
obj.destroy();
spawnParticles(x, y, color);
```

### 4. Timers Follow Lifecycle ⏰
Track all `setTimeout`/`setInterval`/`delayedCall`/`rAF`. Cancel in cleanup.

```js
this.activeTimers.push(this.time.delayedCall(10000, cb));
// In cleanup: this.activeTimers.forEach(t => t.remove(false));
```

### 5. Frame-Rate Independent Logic 🖥️
Multiply all time-dependent logic by delta. Never assume 60fps.

```js
// ✅ player.x += speed * (delta / 1000);
```
- Phaser `update(time, delta)`: delta in ms, divide by 1000
- Three.js `clock.getDelta()`: returns seconds
- Physics: prefer fixed timestep (accumulate delta, step every 16.67ms)

### 6. Scene Transition = Full Cleanup 🚪
On scene/level switch, clean: event listeners, timers, rAF, audio nodes, object pools, WebGL resources (geometry/material/texture d...
README
# 🎮 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](https://img.shields.io/badge/ClawHub-game--quality--gates-blue?style=flat-square)](https://clawhub.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)
[![Wiki](https://img.shields.io/badge/📖_Wiki-8_pages-purple?style=flat-square)](https://github.com/abczsl520/game-quality-gates/wiki)
[![OpenClaw Skill](https://img.shields.io/badge/OpenClaw-Agent_Skill-orange?style=flat-square)](https://github.com/openclaw/openclaw)

---

## 💀 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...

Skills associés

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...