{"id":"game-developer","name":"game-developer","summary":"ゲームシステムの構築、Unity/Unreal Engineの機能実装、ゲームパフォーマンスの最適化に使用します。","body":"# Game Developer\n\n## Core Workflow\n\n1. **Analyze requirements** — Identify genre, platforms, performance targets, multiplayer needs\n2. **Design architecture** — Plan ECS/component systems, optimize for target platforms\n3. **Implement** — Build core mechanics, graphics, physics, AI, networking\n4. **Optimize** — Profile and optimize for 60+ FPS, minimize memory/battery usage\n   - ✅ **Validation checkpoint:** Run Unity Profiler or Unreal Insights; verify frame time ≤16 ms (60 FPS) before proceeding. Identify and resolve CPU/GPU bottlenecks iteratively.\n5. **Test** — Cross-platform testing, performance validation, multiplayer stress tests\n   - ✅ **Validation checkpoint:** Confirm stable frame rate under stress load; run multiplayer latency/desync tests before shipping.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Unity Development | `references/unity-patterns.md` | Unity C#, MonoBehaviour, Scriptable Objects |\n| Unreal Development | `references/unreal-cpp.md` | Unreal C++, Blueprints, Actor components |\n| ECS & Patterns | `references/ecs-patterns.md` | Entity Component System, game patterns |\n| Performance | `references/performance-optimization.md` | FPS optimization, profiling, memory |\n| Networking | `references/multiplayer-networking.md` | Multiplayer, client-server, lag compensation |\n\n## Constraints\n\n### MUST DO\n- Target 60+ FPS on all platforms\n- Use object pooling for frequent instantiation\n- Implement LOD systems for optimization\n- Profile performance regularly (CPU, GPU, memory)\n- Use async loading for resources\n- Implement proper state machines for game logic\n- Cache component references (avoid GetComponent in Update)\n- Use delta time for frame-independent movement\n\n### MUST NOT DO\n- Instantiate/Destroy in tight loops or Update()\n- Skip profiling and performance testing\n- Use string comparisons for tags (use CompareTag)\n- Allocate memory in Update/FixedUpdate loops\n- Ignore platform-specific constraints (mobile, console)\n- Use Find methods in Update loops\n- Hardcode game values (use ScriptableObjects/data files)\n\n## Output Templates\n\nWhen implementing game features, provide:\n1. Core system implementation (ECS component, MonoBehaviour, or Actor)\n2. Associated data structures (ScriptableObjects, structs, configs)\n3. Performance considerations and optimizations\n4. Brief explanation of architecture decisions\n\n## Key Code Patterns\n\n### Object Pooling (Unity C#)\n```csharp\npublic class ObjectPool<T> where T : Component\n{\n    private readonly Queue<T> _pool = new();\n    private readonly T _prefab;\n    private readonly Transform _parent;\n\n    public ObjectPool(T prefab, int initialSize, Transform parent = null)\n    {\n        _prefab = prefab;\n        _parent = parent;\n        for (int i = 0; i < initialSize; i++)\n            Release(Create());\n    }\n\n    public T Get()\n    {\n        T obj = _pool.Count > 0 ? _pool.Dequeue() : Create();\n        obj.gameObject.SetActive(true);\n        return obj;\n    }\n\n    public void Release(T obj)\n    {\n        obj.gameObject.SetActive(false);\n        _pool.Enqueue(obj);\n    }\n\n    private T Create() => Object.Instantiate(_prefab, _parent);\n}\n```\n\n### Component Caching (Unity C#)\n```csharp\npublic class PlayerController : MonoBehaviour\n{\n    // Cache all component references in Awake — never call GetComponent in Update\n    private Rigidbody _rb;\n    private Animator _animator;\n    private PlayerInput _input;\n\n    private void Awake()\n    {\n        _rb = GetComponent<Rigidbody>();\n        _animator = GetComponent<Animator>();\n        _input = GetComponent<PlayerInput>();\n    }\n\n    private void FixedUpdate()\n    {\n        // Use cached references; use deltaTime for frame-independence\n        Vector3 move = _input.MoveDirection * (speed * Time.fixedDeltaTime);\n        _rb.MovePosition(_rb.position + move);\n    }\n}\n```\n\n### State Machine (Unity C#)\n```csharp\npublic abstract class State\n{\n    public abstract void Enter();\n    public abstract void Tick(float deltaTime);\n    public abstract void Exit();\n}\n\npublic class StateMachine\n{\n    private State _current;\n\n    public void TransitionTo(State next)\n    {\n        _current?.Exit();\n        _current = next;\n        _current.Enter();\n    }\n\n    public void Tick(float deltaTime) => _current?.Tick(deltaTime);\n}\n\n// Usage example\npublic class IdleState : State\n{\n    private readonly Animator _animator;\n    public IdleState(Animator animator) => _animator = animator;\n    public override void Enter() => _animator.SetTrigger(\"Idle\");\n    public override void Tick(float deltaTime) { /* poll transitions */ }\n    public override void Exit() { }\n}\n```\n\n[Documentation](https://jeffallan.github.io/claude-skills/skills/specialized/game-developer/)","author":"@Jeffallan","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/Jeffallan/claude-skills/tree/main/skills/game-developer","license":"MIT","category":"testing","lang":"en","tokens":1049,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/ecs-patterns.md","size":10329,"sha256":"5ef2de275b32bcf78a215ac09e101e70c06d5bb64e2577dc61fba811950a49c6"},{"path":"references/multiplayer-networking.md","size":12678,"sha256":"10c22a22749041b99f09a4e365dadbe6e58fc1b56c90407960bb466aa2de8611"},{"path":"references/performance-optimization.md","size":10285,"sha256":"57ce6a6de9b66f4ab5b2b7bd7349fa6694e5eb641e5a94bcf80e1351ad4fd4ed"},{"path":"references/unity-patterns.md","size":6489,"sha256":"0f8b0ffada2a9e997c7db40cc472babf30c670514f01441c3dbd2f25a573fefc"},{"path":"references/unreal-cpp.md","size":8779,"sha256":"b41b68aa1dba6635924a909c4d749ae199bd6ac8fed263598163c9bbbce807e6"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["jeffallan.github.io"]}}