ECS System Design

Design deterministic ECS system lifecycles and execution ordering for Godot 4.x and .NET 8.

2|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/Xyrces/godot-ecs-gamedev-playbook --skill ecs-system-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ECS System Design
Source: https://github.com/Xyrces/godot-ecs-gamedev-playbook/tree/main/skills/ecs_system_design
Command: npx skills add https://github.com/Xyrces/godot-ecs-gamedev-playbook --skill ecs-system-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design ECS systems that are deterministic, testable, and safe to run inside a fixed-timestep game loop without leaking Godot dependencies into Core logic.

Core Features & Use Cases

  • System lifecycle design: Define Initialize, Update, PostTick, Shutdown, and SetTick behavior for clean system ownership.
  • Execution ordering: Organize systems into groups such as Init, FixedTick, RenderSync, and Cleanup with predictable sequencing.
  • Dependency validation: Declare read/write access with ComponentAccessAttribute so conflicting systems can be detected before runtime.
  • Zero-allocation iteration: Use struct-based handlers for hot-path entity iteration to avoid per-frame heap allocations.
  • Deferred structural changes: Route entity creation, destruction, and component edits through a CommandBufferSystem.
  • Use case: An AI movement system can read input, update velocity, defer destruction of dead entities, and remain fully unit-testable in the Core project.

Quick Start

Ask the AI to design a new ECS system for your Godot project using the lifecycle, ordering, and dependency rules from this skill.

Frequently Asked Questions about ECS System Design

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

FAQPage Schema
How do I design a deterministic ECS game loop in Godot 4?

To design a deterministic ECS game loop in Godot 4, define system lifecycles with Initialize, Update, PostTick, and Shutdown phases. Organize execution into Init, FixedTick, RenderSync, and Cleanup groups to ensure predictable sequencing and safe fixed-tick simulation.

How do I prevent Godot type dependencies in Core ECS systems?

Prevent Godot type dependencies in Core ECS systems by isolating simulation logic from rendering. Use struct-based handlers for zero-allocation iteration and route structural changes through a CommandBufferSystem, keeping the Core project fully unit-testable.

How does component access validation work in an ECS?

Component access validation in an ECS works by declaring read and write permissions using a ComponentAccessAttribute. This mechanism detects conflicting systems before runtime, preventing race conditions during fixed-timestep execution.

What's the best way to handle entity destruction in a fixed-timestep simulation?

The best way to handle entity destruction in a fixed-timestep simulation is deferring structural changes via a CommandBufferSystem. Route entity creation, destruction, and component edits through this system to execute safely during cleanup passes without breaking active iteration.

Can I run zero-allocation entity iteration in a .NET 8 game project?

Yes, you can run zero-allocation entity iteration in a .NET 8 game project by using struct-based handlers for hot-path entity processing. This approach avoids per-frame heap allocations during the fixed-tick simulation loop.

Why do my ECS systems have unpredictable execution ordering?

ECS systems have unpredictable execution ordering when they lack structured lifecycle grouping. Enforce predictable sequencing by organizing systems into distinct Init, FixedTick, RenderSync, and Cleanup groups with defined SetTick behavior.