Skip to content
gd-design-game-loop logo

Game Loop Design

gd-design-game-loop

Core gameplay loop design documentation. Use when defining the core gameplay loop, mapping the player experience over time, designing session structures, or identifying pacing issues.

SKILL.md

Full skill instructions

Game Loop Design

Core Loop Template

# Core Loop Specification v[X.X]
**Last Updated:** YYYY-MM-DD
**Owners:** [Designers]

## Loop Overview

[PRE-GAME] → [SESSION] → [POST-GAME] → [LOOP BACK]


## Session Structure

### Pre-Game Phase
**Duration:** [Target time]

**Player Actions:**
1. [Action 1]
2. [Action 2]
3. [Action 3]

**Emotional Beat:** [Feeling player has]

**Objectives:**
- [Goal 1]
- [Goal 2]

---

### Session Start (0:00 - [X:XX])

**State:** Players [enter spawn/​start]
**Objectives:** [Initial goals]
**Threats:** [What can hurt players]
**Emotional Beat:** [Feeling]

**Key Events:**
- [X:XX] - [Event 1]
- [Y:YY] - [Event 2]

---

### Early Game ([X:XX] - [Y:YY])

**State:** [Game state description]
**Objectives:** [What players should do]
**Threats:** [What challenges exist]
**Emotional Beat:** [Feeling]

---

### Mid Game ([Y:YY] - [Z:ZZ])

**State:** [Game state description]
**Objectives:** [What players should do]
**Threats:** [What challenges exist]
**Emotional Beat:** [Feeling]

---

### Late Game ([Z:ZZ] - [End])

**State:** [Game state description]
**Objectives:** [Final objectives]
**Threats:** [Maximum challenges]
**Emotional Beat:** [Feeling]

---

### End Game

**Victory Conditions:**
- [Condition 1]
- [Condition 2]

**Defeat Conditions:**
- [Condition 1]
- [Condition 2]

**Rewards:**
- [What players earn]
- [Progression updates]

---

## Post-Game Phase

**Duration:** [Target time]

**Player Actions:**
1. [Action 1]
2. [Action 2]

**Emotional Beat:** [Feeling]

**Session Loop:** [What brings players back]

Loop Design Principles

Engagement

Keep players engaged by:

  • Immediate action - Something to do right away
  • Clear goals - Know what to do next
  • Meaningful choices - Decisions that matter
  • Feedback - See results of actions

Pacing

Create tension through:

  • Buildup - Escalate towards climax
  • Variation - Mix fast/​slow moments
  • Surprises - Unexpected events
  • Release - Tension breaks

Progression

Enable growth through:

  • Learning - Skills improve over time
  • Unlocking - New content available
  • Building - Accumulate resources
  • Advancing - Move through content

Session Flow Diagrams

Text-Based Flow

┌─────────┐
│ LOBBY   │
└────┬────┘
     │
     ▼
┌─────────┐
│ MATCH   │◄──────────────────────┐
└────┬────┘                        │
     │                            │
     ├──────────┬─────────┐      │
     │          │         │      │
     ▼          ▼         ▼      ▼
┌────────┐ ┌───────┐ ┌──────┐ ┌──────┐
│EXPLORE│ │FIGHT  │ │LOOT  │ │OBJ   │
└────────┘ └───────┘ └──────┘ └──────┘
     │          │         │      │
     └──────────┴─────────┴──────┘
                    │
                    ▼
              ┌─────────┐
              │EXTRACT  │
              └─────────┘
                    │
                    ▼
              ┌─────────┐
              │ SUMMARY │
              └────┬────┘
                   │
                   ▼
              ┌─────────┐
              │  LOBBY  │
              └─────────┘

Common Loop Patterns

Round-Based

Discrete turns with planning phases:

  1. Plan phase
  2. Execution phase
  3. Resolution phase
  4. Reward phase

Real-Time

Continuous action with moments:

  1. Constant engagement
  2. Peaks and valleys
  3. No pausing
  4. Immediate feedback

Session-Based

Complete matches with:

  1. Preparation phase
  2. Main gameplay
  3. Conclusion phase
  4. Summary/​rewards

Loop Review Checklist

Before finalizing the core loop:

  • Minute-by-minute flow documented
  • Session phases defined
  • Emotional beats mapped
  • Pacing is appropriate
  • Engagement maintained
  • Goals are clear
  • Feedback is immediate
  • Win/​lose conditions defined
  • Progression tied to loop
  • Technical feasibility confirmed

Multiplayer State Synchronization (NEW - 2026-01-28)

Design considerations for server-authoritative multiplayer games.

State Authority Model

┌─────────────────────────────────────────────────────────────┐
│                      SERVER AUTHORITATIVE                     │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐     │
│  │  Game State │◄───│   Physics   │◄───│   Player    │     │
│  │   (Truth)   │    │  Simulation │    │   Inputs    │     │
│  └─────────────┘    └─────────────┘    └─────────────┘     │
└─────────────────────────────────────────────────────────────┘
         │                                          │
         │ State sync (20Hz)                        │ Input (client)
         ▼                                          ▼
┌─────────────────┐                     ┌─────────────────────┐
│  CLIENT STATE   │                     │   PREDICTED STATE   │
│  (Display only) │                     │   (Immediate feedback)│
└─────────────────┘                     └─────────────────────┘

State Design Principles

Server State (Authoritative):

  • Player positions (x, y, z, rotation)
  • Health, armor, weapon state
  • Match state (lobby, playing, ended)
  • Projectile positions and velocities

Client State (Predicted):

  • Local player position (client-side prediction)
  • Visual effects (immediate feedback)
  • UI state (local only)

Shared State (Synced):

  • Match scores
  • Leaderboard
  • Player alive/​dead status

State Update Categories

CategoryUpdate RateAuthorityRollback
Player InputClient → Server (immediate)ClientNo
Player PositionServer → Client (20Hz)ServerYes
Health/​ArmorServer → Client (on change)ServerYes
Visual EffectsClient onlyClientNo
Match StateServer → Client (on change)ServerNo

Prediction vs Reconciliation

Client sends input → Client predicts result → Display immediately
                      ↓
                      Server processes input → Sends correction
                      ↓
                      Client reconciles (smooth correction)

Design Checklist for Multiplayer Features

Before adding gameplay features:

  • Is this feature server-authoritative or client-authoritative?
  • What happens if state sync is delayed (100ms+ latency)?
  • Can this feature exploit prediction/​reconciliation?
  • What visual feedback is needed during network delays?
  • Does this feature need rollback support?

State Management for Multiplayer

Store Structure:

src/​store/
├── connectionStore.ts  - Server connection status
├── playerStore.ts      - Local player state (predicted)
├── matchStore.ts       - Match/​server state (authoritative)
└── uiStore.ts          - UI state (local only)

Integration Points:

  • connectionStore.sessionId - Unique player identifier
  • playerStore.position - Predicted local position
  • matchStore.players - Server-authoritative player list
  • matchStore.leaderboard - Synced match state

Sources:

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View