programming-architecture

Installation
SKILL.md

Game Programming Architecture

Design Patterns for Games

1. State Machine

Best for: Character states, AI, game flow

// ✅ Production-Ready State Machine
public abstract class State<T> where T : class
{
    protected T Context { get; private set; }
    public void SetContext(T context) => Context = context;
    public virtual void Enter() { }
    public virtual void Update() { }
    public virtual void Exit() { }
}

public class StateMachine<T> where T : class
Related skills
Installs
78
GitHub Stars
22
First Seen
Jan 24, 2026