ecs-architecture

Designs and reviews deterministic Entity Component System architectures for RTS-scale TypeScript simulations.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/Ohmnia/site-build --skill ecs-architecture-ohmnia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ecs-architecture
Source: https://github.com/Ohmnia/site-build/tree/main/.opencode/skills/ecs-architecture
Command: npx skills add https://github.com/Ohmnia/site-build --skill ecs-architecture-ohmnia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building real-time strategy simulations with thousands of entities often leads to rigid inheritance hierarchies, non-deterministic behavior, and performance bottlenecks. This Skill provides a complete rule set for designing, reviewing, and refactoring Entity Component System architectures that scale, stay deterministic, and remain maintainable. ## Core Features & Use Cases - Architecture Design Guidance: Enforces composition over inheritance, small serializable components, single-responsibility systems, and event-queue-based inter-system communication. - Determinism & Performance Rules: Covers fixed timesteps, seeded randomness, typed arrays (Float32Array/Int32Array), object pooling, and deferred entity destruction with ID recycling. - Code Review with Prioritized Violations: Reports violations grouped by RTS priority impact (scalability, determinism, maintainability) with one concrete refactor path per issue. - Use Case: You are building a multiplayer RTS in TypeScript and your Unit class hierarchy has become unmanageable. Use this Skill to refactor toward flat components, deterministic systems, and lockstep-safe networking. ## Quick Start Ask the assistant to review your TypeScript ECS simulation code for determinism and scalability violations using the ecs-architecture skill.

Frequently Asked Questions about ecs-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design an ECS architecture for an RTS game in TypeScript?

Use flat entities composed of small serializable components processed by single-responsibility systems in a deterministic order. Prefer typed arrays like Float32Array for component data, a fixed timestep, and an event buffer for inter-system communication instead of direct system calls.

How should systems communicate in an ECS architecture?

Systems should communicate through an event queue component such as an EventBufferComponent, written by producing systems and consumed by subscribing systems in a deterministic order. Never call one system's methods directly from another system.

How do I make an ECS simulation deterministic for multiplayer?

Use a fixed timestep, deterministic iteration order, seeded random generators, and integer math where appropriate. Avoid frame-rate-dependent logic, unordered object iteration, and non-deterministic async operations inside the simulation.

Why avoid inheritance hierarchies in ECS game architecture?

Deep inheritance trees like Unit extends Character extends Actor become rigid, hard to debug, and expensive to scale in RTS environments. Composition of small components keeps behavior flexible, testable, and cache-friendly.

When should performance optimization take priority in ECS design?

Performance ranks below scalability, determinism, maintainability, and debuggability in RTS priorities. Prefer simpler allocation-heavy approaches when they serve higher priorities, then optimize hot loops with pooling and typed arrays later.