engine

Document architectural patterns and APIs for the @repo/engine package.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/ViewableGravy/better-ecs --skill engine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: engine
Source: https://github.com/ViewableGravy/better-ecs/tree/main/.github/skills/engine
Command: npx skills add https://github.com/ViewableGravy/better-ecs --skill engine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides the essential architectural guidelines, API references, and best practices for effectively utilizing the core @repo/engine package within the Better ECS workspace, ensuring type safety and standardized system design.

Core Features & Use Cases

  • Enforces Type Safety: Guides users on augmenting the global Register interface for robust type inference.
  • Standardizes System Design: Details the canonical layout for defining systems using createSystem, including schema definition and phase assignment.
  • Documents Context API: Lists and explains crucial context hooks like useWorld, useSystem, and useDelta for accessing engine state.
  • Guides World Interaction: Demonstrates how to query entities, access components, and leverage component utilities for state manipulation.
  • Use Case: When developing a new game feature, use this Skill to understand how to correctly define a new system, access entity data, and integrate it into the game loop according to established engine conventions.

Quick Start

Use the engine skill to define a new system for handling player input.

Frequently Asked Questions about engine

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

FAQPage Schema
How do I define a new system in a TypeScript ECS game engine?

To define a system in a TypeScript ECS, use the `createSystem` API to standardize schema definition and assign execution phases within the game loop. This approach enforces type safety and standardizes architectural conventions.

How do I access engine state and entity data in an ECS architecture?

Access engine state and entity data in an ECS architecture by using context hooks like `useWorld`, `useSystem`, and `useDelta`. The `useWorld` hook specifically enables querying entities and manipulating component state.

How do I ensure type safety for custom components in a TypeScript game engine?

Ensure type safety for custom components in a TypeScript game engine by augmenting the global `Register` interface in your userland application. This module augmentation technique provides robust type inference for component access.

What is the canonical way to structure game engine source files?

The canonical way to structure game engine source files is by enforcing aliased imports throughout the codebase. This convention maintains architectural consistency and standardized system design across the ECS workspace.

Can I integrate player input handling into the game loop using ECS conventions?

Yes, you can integrate player input handling into the game loop by defining a new system with `createSystem`, accessing engine state via context hooks, and querying entities to manipulate component state according to established engine conventions.