Skip to content

Reference patterns for structuring browser games with Three.js or Phaser around a core loop, event bus, and centralized state.

CCM score
52 of 100
skills.sh installs
1.3K
GitHub stars
380
last updated
Jul 14, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers core principles: build the minimal input, movement, fail, scoring, and restart loop before any polish
  • Includes guidance on EventBus messaging, a single GameState singleton, and centralizing values in Constants.js
  • Enforces zero hardcoded balance, asset path, spawn, or timing values inside game logic files
  • Designed for browser games built with Three.js or Phaser, with companion system-patterns.md covering pooling and spawn systems

Install

$ npx -y skills add playableintelligence/game-creator --skill game-architecture -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Game Architecture Patterns

Reference knowledge for building well-structured browser games. These patterns apply to both Three.js (3D) and Phaser (2D) games.

Reference Files

For detailed reference, see companion files in this directory:

  • system-patterns.md — Object pooling, delta-time normalization, resource disposal, wave/spawn systems, buff/powerup system, haptic feedback, asset management

Core Principles

  1. Core Loop First: Implement the minimum gameplay loop before any polish. The order is: input -> movement -> fail condition -> scoring -> restart. Only after the core loop works should you add visuals, audio, or juice. Keep initial scope small: 1 scene/level, 1 mechanic, 1 fail condition.

  2. Event-Driven Communication: Modules never import each other for communication. All cross-module messaging goes through a singleton EventBus with predefined event constants.

  3. Centralized State: A single GameState singleton holds all game state. Systems read state directly and modify it through events. No scattered state across modules.

Details

Repository
github.com/playableintelligence/game-creator
Categories
Game Development, Frontend & UI Code
First seen
Jun 3, 2026

More from playableintelligence/game-creator

All 26

Similar to Game Architecture

More Game Development