
Game Developer
Apply Entity Component System patterns in C# so gameplay logic stays data-oriented, testable, and scalable for indie game prototypes and jam expansions.
Install
npx skills add https://github.com/jeffallan/claude-skills --skill game-developerWhat is this skill?
- Separates components (data), entities (IDs), and systems (logic over spans)
- C# examples: Position, Velocity, Health, PlayerTag marker components
- MovementSystem batch-updates positions from velocities with deltaTime
- World helper sketch for create entity, add/get component by ID
Adoption & trust: 3k installs on skills.sh; 9.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Game Enginegithub/awesome-copilot
Godot Gdscript Patternswshobson/agents
Unity Ecs Patternswshobson/agents
Game Developmentsickn33/antigravity-awesome-skills
Unity Developerrmyndharis/antigravity-skills
Godot Best Practicesjwynia/agent-skills
Journey fit
Common Questions / FAQ
Is Game Developer safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Game Developer
# ECS Architecture and Game Patterns ## Entity Component System (ECS) ```csharp // Component = pure data (no logic) public struct PositionComponent { public float X; public float Y; public float Z; } public struct VelocityComponent { public float X; public float Y; public float Z; } public struct HealthComponent { public int Current; public int Max; } public struct PlayerTag { } // Marker component // Entity = just an ID public struct Entity { public int Id; } // System = logic operating on components public class MovementSystem { public void Update(float deltaTime, Span<PositionComponent> positions, Span<VelocityComponent> velocities) { for (int i = 0; i < positions.Length; i++) { positions[i].X += velocities[i].X * deltaTime; positions[i].Y += velocities[i].Y * deltaTime; positions[i].Z += velocities[i].Z * deltaTime; } } } // Simple ECS World public class World { private int nextEntityId = 0; private Dictionary<int, PositionComponent> positions = new(); private Dictionary<int, VelocityComponent> velocities = new(); private Dictionary<int, HealthComponent> healths = new(); public Entity CreateEntity() { return new Entity { Id = nextEntityId++ }; } public void AddComponent<T>(Entity entity, T component) { // Store component by entity ID } public T GetComponent<T>(Entity entity) { // Retrieve component for entity return default; } } ``` ## Object Pool Pattern ```csharp public class ObjectPool<T> where T : class, new() { private readonly Stack<T> pool = new(); private readonly Func<T> createFunc; private readonly Action<T> resetAction; private readonly int maxSize; public ObjectPool(Func<T> createFunc, Action<T> resetAction, int initialSize = 10, int maxSize = 100) { this.createFunc = createFunc; this.resetAction = resetAction; this.maxSize = maxSize; // Pre-populate pool for (int i = 0; i < initialSize; i++) { pool.Push(createFunc()); } } public T Get() { if (pool.Count > 0) return pool.Pop(); return createFunc(); } public void Return(T obj) { if (pool.Count < maxSize) { resetAction?.Invoke(obj); pool.Push(obj); } } } // Usage example public class BulletManager { private ObjectPool<Bullet> bulletPool; public void Initialize() { bulletPool = new ObjectPool<Bullet>( createFunc: () => new Bullet(), resetAction: (bullet) => bullet.Reset(), initialSize: 50, maxSize: 200 ); } public Bullet SpawnBullet() { Bullet bullet = bulletPool.Get(); bullet.Activate(); return bullet; } public void ReturnBullet(Bullet bullet) { bullet.Deactivate(); bulletPool.Return(bullet); } } ``` ## State Machine Pattern ```csharp public interface IState { void Enter(); void Update(float deltaTime); void Exit(); } public class StateMachine { private IState currentState; public void ChangeState(IState newState) { currentState?.Exit(); currentState = newState; currentState?.Enter(); } public void Update(float deltaTime) { currentState?.Update(deltaTime); } } // Example: Enemy AI States public class IdleState : IState { private readonly EnemyController enemy; public IdleState(EnemyController enemy) => this.enemy = enemy; public void Enter() { enemy.PlayAnimation("Idle"); } public void Update(float deltaTime) { if (enemy.PlayerInRange()) enemy.StateMachine.ChangeState(new ChaseState(enemy)); } public void Exit() { } } public class ChaseState : IState { pri