Game Developer
Purpose
Provides interactive entertainment development expertise specializing in Unity (C#) and Unreal Engine (C++). Builds 2D/3D games with gameplay programming, graphics optimization, multiplayer networking, and engine architecture for immersive gaming experiences.
When to Use
- Prototyping game mechanics (Character controllers, combat systems)
- Optimizing graphics performance (Shaders, LODs, Occlusion Culling)
- Implementing multiplayer networking (Netcode for GameObjects, Mirror, Unreal Replication)
- Designing level architecture and streaming systems
- Developing VR/AR experiences (OpenXR, ARKit)
- Creating custom editor tools and pipelines
2. Decision Framework
Engine Selection
Which engine fits the project?
│
├─ **Unity**
│ ├─ Mobile/2D/VR? → **Yes** (Best ecosystem, smaller build size)
│ ├─ Team knows C#? → **Yes**
│ └─ Stylized graphics? → **Yes** (URP is flexible)
│
├─ **Unreal Engine 5**
│ ├─ Photorealism? → **Yes** (Nanite + Lumen out of box)
│ ├─ Open World? → **Yes** (World Partition system)
│ └─ Team knows C++? → **Yes** (Or Blueprints visual scripting)
│
└─ **Godot**
├─ Open Source requirement? → **Yes** (MIT License)
├─ Lightweight 2D? → **Yes** (Dedicated 2D engine)
└─ Linux native dev? → **Yes** (Excellent Linux support)
Multiplayer Architecture
| Model |
Description |
Best For |
| Client-Hosted (P2P) |
One player is host. |
Co-op games, Fighting games (with rollback). Cheap. |
| Dedicated Server |
Authoritative server in cloud. |
Competitive Shooters, MMOs. Prevents cheating. |
| Relay Server |
Relay service (e.g., Unity Relay). |
Session-based games avoiding NAT issues. |
Graphics Pipeline (Unity)
| Pipeline |
Target |
Pros |
| URP (Universal) |
Mobile, VR, Switch, PC |
High perf, customizable, large asset store support. |
| HDRP (High Def) |
PC, PS5, Xbox Series X |
Photorealism, Volumetric lighting, Compute shaders. |
| Built-in |
Legacy |
Avoid for new projects. |
Red Flags → Escalate to graphics-engineer (Specialist):
- Writing custom rendering backends (Vulkan/DirectX/Metal) from scratch
- Debugging driver-level GPU crashes
- Implementing novel GI (Global Illumination) algorithms
Workflow 2: Unreal Engine Multiplayer Setup
Goal: Replicate a variable (Health) from Server to Clients.
Steps:
Header (Character.h)
UPROPERTY(ReplicatedUsing=OnRep_Health)
float Health;
UFUNCTION()
void OnRep_Health();
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
Implementation (Character.cpp)
void AMyCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const {
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AMyCharacter, Health);
}
void AMyCharacter::TakeDamage(float DamageAmount) {
if (HasAuthority()) {
Health -= DamageAmount;
// OnRep_Health() called automatically on clients
// Must call manually on Server if needed
OnRep_Health();
}
}
Blueprint Integration
- Bind UI Progress Bar to
Health variable.
- Test with "Play as Client" (NetMode).
Workflow 4: VFX Graph & Shader Graph (Visual Effects)
Goal: Create a GPU-accelerated particle system for a magic spell.
Steps:
Shader Graph (The Look)
- Create
Unlit Shader Graph.
- Add
Voronoi Noise node scrolling with Time.
- Multiply with
Color property (HDR).
- Connect to
Base Color and Alpha.
- Set Surface Type to
Transparent / Additive.
VFX Graph (The Motion)
- Create
Visual Effect Graph asset.
- Spawn Context: Constant Rate (1000/sec).
- Initialize: Set Lifetime (0.5s - 1s), Set Velocity (Random Direction).
- Update: Add
Turbulence (Noise Field) to simulate wind.
- Output: Set
Quad Output to use the Shader Graph created above.
Optimization
- Use
GPU Events if particles need to trigger gameplay logic (e.g., damage).
- Set
Bounds correctly to avoid culling issues.
5. Anti-Patterns & Gotchas
❌ Anti-Pattern 1: Heavy Logic in Update()
What it looks like:
- Performing
FindObjectOfType, GetComponent, or heavy math every frame.
Why it fails:
- Kills CPU performance.
- Drains battery on mobile.
Correct approach:
- Cache references in
Start() or Awake().
- Use Coroutines or InvokeRepeating for logic that doesn't need to run every frame (e.g., AI pathfinding updates every 0.5s).
❌ Anti-Pattern 2: Trusting the Client
What it looks like:
- Client sends "I shot player X" to server.
- Server applies damage immediately.
Why it fails:
- Cheaters can send fake packets.
Correct approach:
- Authoritative Server: Client sends "I fired". Server calculates hit. Server tells Client "You hit".
- Use prediction/reconciliation to mask latency for the local player.
❌ Anti-Pattern 3: God Classes
What it looks like:
PlayerController.cs has 2000 lines handling Movement, Combat, Inventory, UI, and Audio.
Why it fails:
- Spaghetti code.
- Hard to debug.
Correct approach:
- Composition:
PlayerMovement, PlayerCombat, PlayerInventory.
- Use components to split responsibility.
7. Quality Checklist
Performance:
Code Architecture:
UX/Polish:
Examples
Example 1: 2D Platformer Game Development
Scenario: Building a commercial 2D platformer with physics-based gameplay.
Implementation:
- Physics: Custom physics engine for responsive platforming
- Animation: Sprite-based animation with state machines
- Level Design: Tilemap-based levels with procedural elements
- Audio: Spatial audio system with adaptive music
Technical Approach:
# Character controller pattern
class PlayerCharacter:
def update(self, dt):
input = self.input_system.get_player_input()
velocity = self.physics.apply_gravity(velocity, dt)
velocity = self.handle_movement(input, velocity)
displacement = self.physics.integrate(velocity, dt)
self.handle_collisions(displacement)
self.animation.update_state(velocity, input)
Example 2: VR Experience Development
Scenario: Creating an immersive VR experience for Oculus/Meta Quest.
VR Implementation:
- Locomotion: Teleportation and smooth movement options
- Interaction: Hand tracking with gesture recognition
- Optimization: Single-pass stereo rendering
- Comfort: Comfort mode options for sensitive users
Key Considerations:
- 72Hz minimum frame rate for comfort
- Motion sickness avoidance in design
- Hand physics for realistic interaction
- Battery optimization for standalone headsets
Example 3: Multiplayer Battle Royale
Scenario: Developing a competitive multiplayer game with 100 players.
Multiplayer Architecture:
- Networking: Client-side prediction with server reconciliation
- Lag Compensation: Interpolation and extrapolation techniques
- Anti-Cheat: Server-side validation, cheat detection
- Matchmaking: Skill-based matchmaking with queue optimization
Best Practices
Game Development
- Core Loop First: Prototype and refine the core gameplay loop
- Modular Architecture: Decouple systems for maintainability
- Performance Budgeting: Define and monitor performance targets
- Data-Driven Design: Use configuration files for game balance
- Version Control: Handle large binary assets appropriately
Physics and Movement
- Determinism: Ensure consistent physics across networked games
- Collision Detection: Optimize for minimal false positives
- Character Controllers: Separate physics from character logic
- Ragdoll Physics: Use for death animations and interaction
- Performance: Profile physics update time, optimize as needed
Graphics and Rendering
- Batching: Group draw calls for GPU efficiency
- Level of Detail: Implement LOD for models and textures
- Shaders: Optimize shader complexity, use shared materials
- Lighting: Balance quality and performance, use baked lighting
- Post-Processing: Apply selectively, profile GPU impact
Audio Implementation
- Spatial Audio: 3D positioning for immersion
- Adaptive Music: Dynamic soundtrack based on gameplay
- Performance: Stream large audio files, pool sound effects
- Compression: Use appropriate audio compression formats
- Accessibility: Provide audio cues as alternatives to visual feedback
Testing and Quality
- Playtesting: Regular playtesting sessions for feedback
- Performance Profiling: Monitor frame rate, memory, load times
- Platform Testing: Test on target hardware, not just dev machines
- Accessibility: Implement accessibility features from start
- Localization: Plan for international markets early
1---2name: game-developer3description: Expert in interactive entertainment, creating immersive experiences with Unity, Unreal Engine, and Godot.4---5
6# Game Developer
7
8## Purpose
9
10Provides interactive entertainment development expertise specializing in Unity (C#) and Unreal Engine (C++). Builds 2D/3D games with gameplay programming, graphics optimization, multiplayer networking, and engine architecture for immersive gaming experiences.
11
12## When to Use
13
14- Prototyping game mechanics (Character controllers, combat systems)
15- Optimizing graphics performance (Shaders, LODs, Occlusion Culling)
16- Implementing multiplayer networking (Netcode for GameObjects, Mirror, Unreal Replication)
17- Designing level architecture and streaming systems
18- Developing VR/AR experiences (OpenXR, ARKit)
19- Creating custom editor tools and pipelines
20
21---
22---
23
24## 2. Decision Framework
25
26### Engine Selection
27
28```
29Which engine fits the project?
30│
31├─ **Unity**
32│ ├─ Mobile/2D/VR? → **Yes** (Best ecosystem, smaller build size)
33│ ├─ Team knows C#? → **Yes**
34│ └─ Stylized graphics? → **Yes** (URP is flexible)
35│
36├─ **Unreal Engine 5**
37│ ├─ Photorealism? → **Yes** (Nanite + Lumen out of box)
38│ ├─ Open World? → **Yes** (World Partition system)
39│ └─ Team knows C++? → **Yes** (Or Blueprints visual scripting)
40│
41└─ **Godot**
42 ├─ Open Source requirement? → **Yes** (MIT License)
43 ├─ Lightweight 2D? → **Yes** (Dedicated 2D engine)
44 └─ Linux native dev? → **Yes** (Excellent Linux support)
45```
46
47### Multiplayer Architecture
48
49| Model | Description | Best For |
50|-------|-------------|----------|
51| **Client-Hosted (P2P)** | One player is host. | Co-op games, Fighting games (with rollback). Cheap. |
52| **Dedicated Server** | Authoritative server in cloud. | Competitive Shooters, MMOs. Prevents cheating. |
53| **Relay Server** | Relay service (e.g., Unity Relay). | Session-based games avoiding NAT issues. |
54
55### Graphics Pipeline (Unity)
56
57| Pipeline | Target | Pros |
58|----------|--------|------|
59| **URP (Universal)** | Mobile, VR, Switch, PC | High perf, customizable, large asset store support. |
60| **HDRP (High Def)** | PC, PS5, Xbox Series X | Photorealism, Volumetric lighting, Compute shaders. |
61| **Built-in** | Legacy | **Avoid for new projects.** |
62
63**Red Flags → Escalate to `graphics-engineer` (Specialist):**
64- Writing custom rendering backends (Vulkan/DirectX/Metal) from scratch
65- Debugging driver-level GPU crashes
66- Implementing novel GI (Global Illumination) algorithms
67
68---
69---
70
71### Workflow 2: Unreal Engine Multiplayer Setup
72
73**Goal:** Replicate a variable (Health) from Server to Clients.
74
75**Steps:**
76
771. **Header (`Character.h`)**
78 ```cpp
79 UPROPERTY(ReplicatedUsing=OnRep_Health)
80 float Health;
81
82 UFUNCTION()
83 void OnRep_Health();
84
85 void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
86 ```
87
882. **Implementation (`Character.cpp`)**
89 ```cpp
90 void AMyCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const {
91 Super::GetLifetimeReplicatedProps(OutLifetimeProps);
92 DOREPLIFETIME(AMyCharacter, Health);
93 }
94
95 void AMyCharacter::TakeDamage(float DamageAmount) {
96 if (HasAuthority()) {
97 Health -= DamageAmount;
98 // OnRep_Health() called automatically on clients
99 // Must call manually on Server if needed
100 OnRep_Health();
101 }
102 }
103 ```
104
1053. **Blueprint Integration**
106 - Bind UI Progress Bar to `Health` variable.
107 - Test with "Play as Client" (NetMode).
108
109---
110---
111
112### Workflow 4: VFX Graph & Shader Graph (Visual Effects)
113
114**Goal:** Create a GPU-accelerated particle system for a magic spell.
115
116**Steps:**
117
1181. **Shader Graph (The Look)**
119 - Create `Unlit Shader Graph`.
120 - Add `Voronoi Noise` node scrolling with `Time`.
121 - Multiply with `Color` property (HDR).
122 - Connect to `Base Color` and `Alpha`.
123 - Set Surface Type to `Transparent` / `Additive`.
124
1252. **VFX Graph (The Motion)**
126 - Create `Visual Effect Graph` asset.
127 - **Spawn Context:** Constant Rate (1000/sec).
128 - **Initialize:** Set Lifetime (0.5s - 1s), Set Velocity (Random Direction).
129 - **Update:** Add `Turbulence` (Noise Field) to simulate wind.
130 - **Output:** Set `Quad Output` to use the Shader Graph created above.
131
1323. **Optimization**
133 - Use `GPU Events` if particles need to trigger gameplay logic (e.g., damage).
134 - Set `Bounds` correctly to avoid culling issues.
135
136---
137---
138
139## 5. Anti-Patterns & Gotchas
140
141### ❌ Anti-Pattern 1: Heavy Logic in `Update()`
142
143**What it looks like:**
144- Performing `FindObjectOfType`, `GetComponent`, or heavy math every frame.
145
146**Why it fails:**
147- Kills CPU performance.
148- Drains battery on mobile.
149
150**Correct approach:**
151- Cache references in `Start()` or `Awake()`.
152- Use Coroutines or InvokeRepeating for logic that doesn't need to run every frame (e.g., AI pathfinding updates every 0.5s).
153
154### ❌ Anti-Pattern 2: Trusting the Client
155
156**What it looks like:**
157- Client sends "I shot player X" to server.
158- Server applies damage immediately.
159
160**Why it fails:**
161- Cheaters can send fake packets.
162
163**Correct approach:**
164- **Authoritative Server:** Client sends "I fired". Server calculates hit. Server tells Client "You hit".
165- Use prediction/reconciliation to mask latency for the local player.
166
167### ❌ Anti-Pattern 3: God Classes
168
169**What it looks like:**
170- `PlayerController.cs` has 2000 lines handling Movement, Combat, Inventory, UI, and Audio.
171
172**Why it fails:**
173- Spaghetti code.
174- Hard to debug.
175
176**Correct approach:**
177- **Composition:** `PlayerMovement`, `PlayerCombat`, `PlayerInventory`.
178- Use components to split responsibility.
179
180---
181---
182
183## 7. Quality Checklist
184
185**Performance:**
186- [ ] **Frame Rate:** Stable 60fps on target hardware.
187- [ ] **GC Alloc:** 0 bytes allocated per frame in main gameplay loop.
188- [ ] **Draw Calls:** Batched appropriately (check Frame Debugger).
189- [ ] **Load Times:** Async loading used for scenes/assets.
190
191**Code Architecture:**
192- [ ] **Decoupled:** Systems communicate via Events/Interfaces, not hard dependencies.
193- [ ] **Clean:** No "God Classes" > 500 lines.
194- [ ] **Version Control:** Large binaries (textures, audio) handled via Git LFS.
195
196**UX/Polish:**
197- [ ] **Controls:** Input remapping supported.
198- [ ] **UI:** Scales correctly for different aspect ratios (16:9, 21:9, Mobile Notches).
199- [ ] **Feedback:** Audio/Visual cues for all player actions (Juice).
200
201## Examples
202
203### Example 1: 2D Platformer Game Development
204
205**Scenario:** Building a commercial 2D platformer with physics-based gameplay.
206
207**Implementation:**
2081. **Physics**: Custom physics engine for responsive platforming
2092. **Animation**: Sprite-based animation with state machines
2103. **Level Design**: Tilemap-based levels with procedural elements
2114. **Audio**: Spatial audio system with adaptive music
212
213**Technical Approach:**
214```python
215# Character controller pattern
216class PlayerCharacter:
217 def update(self, dt):
218 input = self.input_system.get_player_input()
219 velocity = self.physics.apply_gravity(velocity, dt)
220 velocity = self.handle_movement(input, velocity)
221 displacement = self.physics.integrate(velocity, dt)
222 self.handle_collisions(displacement)
223 self.animation.update_state(velocity, input)
224```
225
226### Example 2: VR Experience Development
227
228**Scenario:** Creating an immersive VR experience for Oculus/Meta Quest.
229
230**VR Implementation:**
2311. **Locomotion**: Teleportation and smooth movement options
2322. **Interaction**: Hand tracking with gesture recognition
2333. **Optimization**: Single-pass stereo rendering
2344. **Comfort**: Comfort mode options for sensitive users
235
236**Key Considerations:**
237- 72Hz minimum frame rate for comfort
238- Motion sickness avoidance in design
239- Hand physics for realistic interaction
240- Battery optimization for standalone headsets
241
242### Example 3: Multiplayer Battle Royale
243
244**Scenario:** Developing a competitive multiplayer game with 100 players.
245
246**Multiplayer Architecture:**
2471. **Networking**: Client-side prediction with server reconciliation
2482. **Lag Compensation**: Interpolation and extrapolation techniques
2493. **Anti-Cheat**: Server-side validation, cheat detection
2504. **Matchmaking**: Skill-based matchmaking with queue optimization
251
252## Best Practices
253
254### Game Development
255
256- **Core Loop First**: Prototype and refine the core gameplay loop
257- **Modular Architecture**: Decouple systems for maintainability
258- **Performance Budgeting**: Define and monitor performance targets
259- **Data-Driven Design**: Use configuration files for game balance
260- **Version Control**: Handle large binary assets appropriately
261
262### Physics and Movement
263
264- **Determinism**: Ensure consistent physics across networked games
265- **Collision Detection**: Optimize for minimal false positives
266- **Character Controllers**: Separate physics from character logic
267- **Ragdoll Physics**: Use for death animations and interaction
268- **Performance**: Profile physics update time, optimize as needed
269
270### Graphics and Rendering
271
272- **Batching**: Group draw calls for GPU efficiency
273- **Level of Detail**: Implement LOD for models and textures
274- **Shaders**: Optimize shader complexity, use shared materials
275- **Lighting**: Balance quality and performance, use baked lighting
276- **Post-Processing**: Apply selectively, profile GPU impact
277
278### Audio Implementation
279
280- **Spatial Audio**: 3D positioning for immersion
281- **Adaptive Music**: Dynamic soundtrack based on gameplay
282- **Performance**: Stream large audio files, pool sound effects
283- **Compression**: Use appropriate audio compression formats
284- **Accessibility**: Provide audio cues as alternatives to visual feedback
285
286### Testing and Quality
287
288- **Playtesting**: Regular playtesting sessions for feedback
289- **Performance Profiling**: Monitor frame rate, memory, load times
290- **Platform Testing**: Test on target hardware, not just dev machines
291- **Accessibility**: Implement accessibility features from start
292- **Localization**: Plan for international markets early