Game Developer
Core Workflow
- Analyze requirements — Identify genre, platforms, performance targets, multiplayer needs
- Design architecture — Plan ECS/component systems, optimize for target platforms
- Implement — Build core mechanics, graphics, physics, AI, networking
- Optimize — Profile and optimize for 60+ FPS, minimize memory/battery usage
- ✅ Validation checkpoint: Run Unity Profiler or Unreal Insights; verify frame time ≤16 ms (60 FPS) before proceeding. Identify and resolve CPU/GPU bottlenecks iteratively.
- Test — Cross-platform testing, performance validation, multiplayer stress tests
- ✅ Validation checkpoint: Confirm stable frame rate under stress load; run multiplayer latency/desync tests before shipping.
Reference Guide
Load detailed guidance based on context:
| Topic |
Reference |
Load When |
| Unity Development |
references/unity-patterns.md |
Unity C#, MonoBehaviour, Scriptable Objects |
| Unreal Development |
references/unreal-cpp.md |
Unreal C++, Blueprints, Actor components |
| ECS & Patterns |
references/ecs-patterns.md |
Entity Component System, game patterns |
| Performance |
references/performance-optimization.md |
FPS optimization, profiling, memory |
| Networking |
references/multiplayer-networking.md |
Multiplayer, client-server, lag compensation |
Constraints
MUST DO
- Target 60+ FPS on all platforms
- Use object pooling for frequent instantiation
- Implement LOD systems for optimization
- Profile performance regularly (CPU, GPU, memory)
- Use async loading for resources
- Implement proper state machines for game logic
- Cache component references (avoid GetComponent in Update)
- Use delta time for frame-independent movement
MUST NOT DO
- Instantiate/Destroy in tight loops or Update()
- Skip profiling and performance testing
- Use string comparisons for tags (use CompareTag)
- Allocate memory in Update/FixedUpdate loops
- Ignore platform-specific constraints (mobile, console)
- Use Find methods in Update loops
- Hardcode game values (use ScriptableObjects/data files)
Output Templates
When implementing game features, provide:
- Core system implementation (ECS component, MonoBehaviour, or Actor)
- Associated data structures (ScriptableObjects, structs, configs)
- Performance considerations and optimizations
- Brief explanation of architecture decisions
Key Code Patterns
Object Pooling (Unity C#)
public class ObjectPool<T> where T : Component
{
private readonly Queue<T> _pool = new();
private readonly T _prefab;
private readonly Transform _parent;
public ObjectPool(T prefab, int initialSize, Transform parent = null)
{
_prefab = prefab;
_parent = parent;
for (int i = 0; i < initialSize; i++)
Release(Create());
}
public T Get()
{
T obj = _pool.Count > 0 ? _pool.Dequeue() : Create();
obj.gameObject.SetActive(true);
return obj;
}
public void Release(T obj)
{
obj.gameObject.SetActive(false);
_pool.Enqueue(obj);
}
private T Create() => Object.Instantiate(_prefab, _parent);
}
Component Caching (Unity C#)
public class PlayerController : MonoBehaviour
{
// Cache all component references in Awake — never call GetComponent in Update
private Rigidbody _rb;
private Animator _animator;
private PlayerInput _input;
private void Awake()
{
_rb = GetComponent<Rigidbody>();
_animator = GetComponent<Animator>();
_input = GetComponent<PlayerInput>();
}
private void FixedUpdate()
{
// Use cached references; use deltaTime for frame-independence
Vector3 move = _input.MoveDirection * (speed * Time.fixedDeltaTime);
_rb.MovePosition(_rb.position + move);
}
}
State Machine (Unity C#)
public abstract class State
{
public abstract void Enter();
public abstract void Tick(float deltaTime);
public abstract void Exit();
}
public class StateMachine
{
private State _current;
public void TransitionTo(State next)
{
_current?.Exit();
_current = next;
_current.Enter();
}
public void Tick(float deltaTime) => _current?.Tick(deltaTime);
}
// Usage example
public class IdleState : State
{
private readonly Animator _animator;
public IdleState(Animator animator) => _animator = animator;
public override void Enter() => _animator.SetTrigger("Idle");
public override void Tick(float deltaTime) { /* poll transitions */ }
public override void Exit() { }
}
Documentation
1---2name: game-developer3description: "Use when building game systems, implementing Unity/Unreal Engine features, or optimizing game performance. Invoke to implement ECS architecture, configure physics systems and colliders, set up multiplayer networking with lag compensation, optimize frame rates to 60+ FPS targets, develop shaders, or apply game design patterns such as object pooling and state machines. Trigger keywords: Unity, Unreal Engine, game development, ECS architecture, game physics, multiplayer networking, game optimization, shader programming, game AI."4license: MIT5metadata:6 source: https://skillmd.com/skills/jeffallan/game-developer7 author: https://github.com/Jeffallan8 version: "1.1.0"9 domain: specialized10 triggers: Unity, Unreal Engine, game development, ECS architecture, game physics, multiplayer networking, game optimization, shader programming, game AI11 role: specialist12 scope: implementation13 output-format: code14 related-skills: 15---1617# Game Developer1819## Core Workflow20211. **Analyze requirements** — Identify genre, platforms, performance targets, multiplayer needs222. **Design architecture** — Plan ECS/component systems, optimize for target platforms233. **Implement** — Build core mechanics, graphics, physics, AI, networking244. **Optimize** — Profile and optimize for 60+ FPS, minimize memory/battery usage25 - ✅ **Validation checkpoint:** Run Unity Profiler or Unreal Insights; verify frame time ≤16 ms (60 FPS) before proceeding. Identify and resolve CPU/GPU bottlenecks iteratively.265. **Test** — Cross-platform testing, performance validation, multiplayer stress tests27 - ✅ **Validation checkpoint:** Confirm stable frame rate under stress load; run multiplayer latency/desync tests before shipping.2829## Reference Guide3031Load detailed guidance based on context:3233| Topic | Reference | Load When |34|-------|-----------|-----------|35| Unity Development | `references/unity-patterns.md` | Unity C#, MonoBehaviour, Scriptable Objects |36| Unreal Development | `references/unreal-cpp.md` | Unreal C++, Blueprints, Actor components |37| ECS & Patterns | `references/ecs-patterns.md` | Entity Component System, game patterns |38| Performance | `references/performance-optimization.md` | FPS optimization, profiling, memory |39| Networking | `references/multiplayer-networking.md` | Multiplayer, client-server, lag compensation |4041## Constraints4243### MUST DO44- Target 60+ FPS on all platforms45- Use object pooling for frequent instantiation46- Implement LOD systems for optimization47- Profile performance regularly (CPU, GPU, memory)48- Use async loading for resources49- Implement proper state machines for game logic50- Cache component references (avoid GetComponent in Update)51- Use delta time for frame-independent movement5253### MUST NOT DO54- Instantiate/Destroy in tight loops or Update()55- Skip profiling and performance testing56- Use string comparisons for tags (use CompareTag)57- Allocate memory in Update/FixedUpdate loops58- Ignore platform-specific constraints (mobile, console)59- Use Find methods in Update loops60- Hardcode game values (use ScriptableObjects/data files)6162## Output Templates6364When implementing game features, provide:651. Core system implementation (ECS component, MonoBehaviour, or Actor)662. Associated data structures (ScriptableObjects, structs, configs)673. Performance considerations and optimizations684. Brief explanation of architecture decisions6970## Key Code Patterns7172### Object Pooling (Unity C#)73```csharp74public class ObjectPool<T> where T : Component75{76 private readonly Queue<T> _pool = new();77 private readonly T _prefab;78 private readonly Transform _parent;7980 public ObjectPool(T prefab, int initialSize, Transform parent = null)81 {82 _prefab = prefab;83 _parent = parent;84 for (int i = 0; i < initialSize; i++)85 Release(Create());86 }8788 public T Get()89 {90 T obj = _pool.Count > 0 ? _pool.Dequeue() : Create();91 obj.gameObject.SetActive(true);92 return obj;93 }9495 public void Release(T obj)96 {97 obj.gameObject.SetActive(false);98 _pool.Enqueue(obj);99 }100101 private T Create() => Object.Instantiate(_prefab, _parent);102}103```104105### Component Caching (Unity C#)106```csharp107public class PlayerController : MonoBehaviour108{109 // Cache all component references in Awake — never call GetComponent in Update110 private Rigidbody _rb;111 private Animator _animator;112 private PlayerInput _input;113114 private void Awake()115 {116 _rb = GetComponent<Rigidbody>();117 _animator = GetComponent<Animator>();118 _input = GetComponent<PlayerInput>();119 }120121 private void FixedUpdate()122 {123 // Use cached references; use deltaTime for frame-independence124 Vector3 move = _input.MoveDirection * (speed * Time.fixedDeltaTime);125 _rb.MovePosition(_rb.position + move);126 }127}128```129130### State Machine (Unity C#)131```csharp132public abstract class State133{134 public abstract void Enter();135 public abstract void Tick(float deltaTime);136 public abstract void Exit();137}138139public class StateMachine140{141 private State _current;142143 public void TransitionTo(State next)144 {145 _current?.Exit();146 _current = next;147 _current.Enter();148 }149150 public void Tick(float deltaTime) => _current?.Tick(deltaTime);151}152153// Usage example154public class IdleState : State155{156 private readonly Animator _animator;157 public IdleState(Animator animator) => _animator = animator;158 public override void Enter() => _animator.SetTrigger("Idle");159 public override void Tick(float deltaTime) { /* poll transitions */ }160 public override void Exit() { }161}162```163164[Documentation](https://jeffallan.github.io/claude-skills/skills/specialized/game-developer/)