$npx -y skills add One-Man-Company/Skills-ContextManager --skill game-developmentGame development orchestrator. Routes to platform-specific skills based on project needs.
| 1 | # Game Development |
| 2 | |
| 3 | > **Orchestrator skill** that provides core principles and routes to specialized sub-skills. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## When to Use This Skill |
| 8 | |
| 9 | You are working on a game development project. This skill teaches the PRINCIPLES of game development and directs you to the right sub-skill based on context. |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## Sub-Skill Routing |
| 14 | |
| 15 | ### Platform Selection |
| 16 | |
| 17 | | If the game targets... | Use Sub-Skill | |
| 18 | |------------------------|---------------| |
| 19 | | Web browsers (HTML5, WebGL) | `game-development/web-games` | |
| 20 | | Mobile (iOS, Android) | `game-development/mobile-games` | |
| 21 | | PC (Steam, Desktop) | `game-development/pc-games` | |
| 22 | | VR/AR headsets | `game-development/vr-ar` | |
| 23 | |
| 24 | ### Dimension Selection |
| 25 | |
| 26 | | If the game is... | Use Sub-Skill | |
| 27 | |-------------------|---------------| |
| 28 | | 2D (sprites, tilemaps) | `game-development/2d-games` | |
| 29 | | 3D (meshes, shaders) | `game-development/3d-games` | |
| 30 | |
| 31 | ### Specialty Areas |
| 32 | |
| 33 | | If you need... | Use Sub-Skill | |
| 34 | |----------------|---------------| |
| 35 | | GDD, balancing, player psychology | `game-development/game-design` | |
| 36 | | Multiplayer, networking | `game-development/multiplayer` | |
| 37 | | Visual style, asset pipeline, animation | `game-development/game-art` | |
| 38 | | Sound design, music, adaptive audio | `game-development/game-audio` | |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | ## Core Principles (All Platforms) |
| 43 | |
| 44 | ### 1. The Game Loop |
| 45 | |
| 46 | Every game, regardless of platform, follows this pattern: |
| 47 | |
| 48 | ``` |
| 49 | INPUT → Read player actions |
| 50 | UPDATE → Process game logic (fixed timestep) |
| 51 | RENDER → Draw the frame (interpolated) |
| 52 | ``` |
| 53 | |
| 54 | **Fixed Timestep Rule:** |
| 55 | - Physics/logic: Fixed rate (e.g., 50Hz) |
| 56 | - Rendering: As fast as possible |
| 57 | - Interpolate between states for smooth visuals |
| 58 | |
| 59 | --- |
| 60 | |
| 61 | ### 2. Pattern Selection Matrix |
| 62 | |
| 63 | | Pattern | Use When | Example | |
| 64 | |---------|----------|---------| |
| 65 | | **State Machine** | 3-5 discrete states | Player: Idle→Walk→Jump | |
| 66 | | **Object Pooling** | Frequent spawn/destroy | Bullets, particles | |
| 67 | | **Observer/Events** | Cross-system communication | Health→UI updates | |
| 68 | | **ECS** | Thousands of similar entities | RTS units, particles | |
| 69 | | **Command** | Undo, replay, networking | Input recording | |
| 70 | | **Behavior Tree** | Complex AI decisions | Enemy AI | |
| 71 | |
| 72 | **Decision Rule:** Start with State Machine. Add ECS only when performance demands. |
| 73 | |
| 74 | --- |
| 75 | |
| 76 | ### 3. Input Abstraction |
| 77 | |
| 78 | Abstract input into ACTIONS, not raw keys: |
| 79 | |
| 80 | ``` |
| 81 | "jump" → Space, Gamepad A, Touch tap |
| 82 | "move" → WASD, Left stick, Virtual joystick |
| 83 | ``` |
| 84 | |
| 85 | **Why:** Enables multi-platform, rebindable controls. |
| 86 | |
| 87 | --- |
| 88 | |
| 89 | ### 4. Performance Budget (60 FPS = 16.67ms) |
| 90 | |
| 91 | | System | Budget | |
| 92 | |--------|--------| |
| 93 | | Input | 1ms | |
| 94 | | Physics | 3ms | |
| 95 | | AI | 2ms | |
| 96 | | Game Logic | 4ms | |
| 97 | | Rendering | 5ms | |
| 98 | | Buffer | 1.67ms | |
| 99 | |
| 100 | **Optimization Priority:** |
| 101 | 1. Algorithm (O(n²) → O(n log n)) |
| 102 | 2. Batching (reduce draw calls) |
| 103 | 3. Pooling (avoid GC spikes) |
| 104 | 4. LOD (detail by distance) |
| 105 | 5. Culling (skip invisible) |
| 106 | |
| 107 | --- |
| 108 | |
| 109 | ### 5. AI Selection by Complexity |
| 110 | |
| 111 | | AI Type | Complexity | Use When | |
| 112 | |---------|------------|----------| |
| 113 | | **FSM** | Simple | 3-5 states, predictable behavior | |
| 114 | | **Behavior Tree** | Medium | Modular, designer-friendly | |
| 115 | | **GOAP** | High | Emergent, planning-based | |
| 116 | | **Utility AI** | High | Scoring-based decisions | |
| 117 | |
| 118 | --- |
| 119 | |
| 120 | ### 6. Collision Strategy |
| 121 | |
| 122 | | Type | Best For | |
| 123 | |------|----------| |
| 124 | | **AABB** | Rectangles, fast checks | |
| 125 | | **Circle** | Round objects, cheap | |
| 126 | | **Spatial Hash** | Many similar-sized objects | |
| 127 | | **Quadtree** | Large worlds, varying sizes | |
| 128 | |
| 129 | --- |
| 130 | |
| 131 | ## Anti-Patterns (Universal) |
| 132 | |
| 133 | | Don't | Do | |
| 134 | |-------|-----| |
| 135 | | Update everything every frame | Use events, dirty flags | |
| 136 | | Create objects in hot loops | Object pooling | |
| 137 | | Cache nothing | Cache references | |
| 138 | | Optimize without profiling | Profile first | |
| 139 | | Mix input with logic | Abstract input layer | |
| 140 | |
| 141 | --- |
| 142 | |
| 143 | ## Routing Examples |
| 144 | |
| 145 | ### Example 1: "I want to make a browser-based 2D platformer" |
| 146 | → Start with `game-development/web-games` for framework selection |
| 147 | → Then `game-development/2d-games` for sprite/tilemap patterns |
| 148 | → Reference `game-development/game-design` for level design |
| 149 | |
| 150 | ### Example 2: "Mobile puzzle game for iOS and Android" |
| 151 | → Start with `game-development/mobile-games` for touch input and stores |
| 152 | → Use `game-development/game-design` for puzzle balancing |
| 153 | |
| 154 | ### Example 3: "Multiplayer VR shooter" |
| 155 | → `game-development/vr-ar` for comfort and immersion |
| 156 | → `game-development/3d-games` for rendering |
| 157 | → `game-development/multiplayer` for networking |
| 158 | |
| 159 | --- |
| 160 | |
| 161 | > **Remember:** Great games come from iteration, not perfection. Prototype fast, then polish. |