# Tecs > Typed entity component system and game engine for Lua. ## Documentation - [Tecs CLI](/cli/llms.txt): The tecs command line tool: project commands, offline reference, and MCP bridge - [Projects](/cli/projects/llms.txt): The tecs.lua project manifest, its fields, and entry-file discovery - [Scope](/cli/scope/llms.txt): The boundary between project commands and the repository build, plus the offline documentation source - [Cooperative I/O](/cooperative-io/llms.txt): How direct Tecs I/O calls suspend systems without blocking the SDL host - [Getting started](/getting-started/llms.txt): Build Tecs, return an application from an entry file, and register a first game plugin - [Tecs](/index.md): Tecs home: a typed entity component system for LuaJIT and the GPU-driven game engine built around it - [tecs.Application](/modules/Application/llms.txt): The application lifecycle, entry plugin, frame, checkpoints, and crash state - [tecs.assets](/modules/assets/llms.txt): Coroutine-native byte, image, sound, and animated glTF loading with skins and morph targets - [tecs.audio](/modules/audio/llms.txt): Clips, voices, groups, limits, entity sounds, snapshots, and audio devices - [tecs.data](/modules/data/llms.txt): Typed stores, JSON, byte encodings, DEFLATE, text transcoding, UTF-8, UUIDs, hashes, and checksums - [tecs.data.utf8](/modules/data/utf8/llms.txt): UTF-8 codepoint decoding, encoding, validation, and truncation - [tecs.debug](/modules/debug/llms.txt): Debugger commands declared once and projected as debug-server tools with input and output schemas - [Archetypes](/modules/ecs/archetype/llms.txt): Archetype storage, column access, relationship lookups, dirty tracking, and lifecycle observers - [Builtins](/modules/ecs/builtins/llms.txt): The components, relationship, events and systems every world registers automatically, all on tecs.ecs - [Component bundles](/modules/ecs/components/bundles/llms.txt): Reusable entity templates with world:newBundle and spawnBundle - [Component construction](/modules/ecs/components/construction/llms.txt): Shared component construction model covering __call, new, fields, defaults, and the init hook - [Dirty tracking](/modules/ecs/components/dirty-tracking/llms.txt): Per-archetype per-component dirty bits set by getMut and set, and the extractor that reads them - [FFI components](/modules/ecs/components/ffi/llms.txt): FFI struct-backed components via newFFIComponent with C field types and defaults - [Components](/modules/ecs/components/llms.txt): Component overview with world get, getMut, set, remove, has, requires, and transient - [Scalar components](/modules/ecs/components/scalar-components/llms.txt): Single-value number, boolean, or string components via newScalarComponent with fast SoA columns - [Component serialization](/modules/ecs/components/serialization/llms.txt): Component serialize and deserialize hooks, transient, and automatic FFI schema fingerprint migration - [Table components](/modules/ecs/components/table-components/llms.txt): Lua-table-backed components via newComponent with fields, init, custom __call, and new - [Tag components](/modules/ecs/components/tag-components/llms.txt): Dataless presence tags via newTagComponent for flags, markers, and query filtering - [Events](/modules/ecs/events/llms.txt): Address-based ECS events: observe, emit, hasObservers, newEvent, newFFIEvent, and the MessageBus router - [tecs.ecs](/modules/ecs/llms.txt): Worlds, entities, components, systems, plugins, queries, archetypes, phases, and resources - [Mutation model](/modules/ecs/mutation-model/llms.txt): Structural transactions, publication barriers, value writes, and visibility guarantees - [Phases](/modules/ecs/phases/llms.txt): Game-loop phase groups and the world methods that control them - [Plugins](/modules/ecs/plugins/llms.txt): Plugins provide the one way into a world: entry arguments, composition, and patterns that scale - [Profiling](/modules/ecs/profiling/llms.txt): LuaJIT sampling profiler and trace-abort tracker through tecs.utils.profile - [Query callbacks](/modules/ecs/queries/callbacks/llms.txt): Batch onEntitiesAdded and onEntitiesRemoved query hooks with row ranges and deferred-drain semantics - [Query grouping](/modules/ecs/queries/grouping/llms.txt): Grouping matching archetypes by integer key with groupBy, groups, group, getGroup, and getGroupCount - [Queries](/modules/ecs/queries/llms.txt): Creating and iterating queries with include, exclude, includeAny, temp, and deferred mutations - [tecs.ecs.random](/modules/ecs/random/llms.txt): Seeded named streams, standalone generators, and snapshot restoration - [FFI relationships](/modules/ecs/relationships/ffi/llms.txt): FFI struct-backed relationships via newFFIRelationship with packed field types and target semantics - [Relationships](/modules/ecs/relationships/llms.txt): Directed entity relationships, storage, deletion, and traversal - [Save games](/modules/ecs/save-games/llms.txt): Snapshot saving, loading, transient components, handlers, filtering, and binary format - [State stack](/modules/ecs/states/llms.txt): The world state stack, lifecycle policies, automatic tags, and transition events - [Systems](/modules/ecs/systems/llms.txt): System configuration, ordering, removal, and tecs.ecs.runif predicates - [World](/modules/ecs/world/llms.txt): World entities, structural transactions, batches, resources, plugins, phases, and stats - [tecs.events](/modules/events/llms.txt): Typed event definitions and address-based message buses - [tecs.gfx.animation](/modules/gfx/animation/llms.txt): Sprite sheets, fixed-step playback, Aseprite slices, pivots, and reloads - [tecs.gfx](/modules/gfx/llms.txt): 2D and 3D cameras, render components, meshes, the GPU renderer, images, shadows, and text - [tecs.gfx.layers](/modules/gfx/layers/llms.txt): Layer bands, sorting, coordinate spaces, parallax, lighting, and clipping - [tecs.gfx.materials](/modules/gfx/materials/llms.txt): Material selection, shader authoring, built-in materials, and reload rules - [tecs.gfx.particles](/modules/gfx/particles/llms.txt): GPU particle effects, emitter playback, pool sizing, and rendering limits - [tecs](/modules/llms.txt): The Tecs root API and every module directly beneath it - [tecs.input](/modules/input/llms.txt): Gameplay input in three tiers behind a layer stack, with gamepads and standalone sensors - [tecs.io.Path](/modules/io/Path/llms.txt): Immutable UTF-8 filesystem paths with platform-native semantics. - [tecs.io.Process](/modules/io/Process/llms.txt): Streaming child processes with cooperative waits and backpressured standard I/O. - [tecs.io.URI](/modules/io/URI/llms.txt): Immutable absolute URIs with component-aware modification. - [tecs.io.files](/modules/io/files/llms.txt): Asset, persistent, and cache paths with direct and worker-backed file operations - [tecs.io.http](/modules/io/http/llms.txt): Cooperative HTTP requests, streaming bodies, connection pools, and ECS request entities - [tecs.io](/modules/io/llms.txt): Synchronous binary streams, cooperative sockets, HTTP, files, and external tools - [tecs.io.mcp](/modules/io/mcp/llms.txt): MCP server setup, world inspection, safe mutation, custom tools, and transport - [tecs.io.watcher](/modules/io/watcher/llms.txt): Development-time polling and reload dispatch for loaded content - [tecs.log](/modules/log/llms.txt): Named loggers, priority filtering, platform output, and JSON Lines files - [tecs.math](/modules/math/llms.txt): Angle wrapping and shortest turns, with two-dimensional geometry beneath them. - [tecs.math.noise](/modules/math/noise/llms.txt): Native procedural scalar fields with configurable algorithms and fractal composition - [tecs.math.vec2](/modules/math/vec2/llms.txt): Allocation-free two-dimensional vector and point operations over separate coordinates - [tecs.physics](/modules/physics/llms.txt): Entity-first Rapier 2D rigid bodies, colliders, queries, contacts, sensors, and snapshots - [tecs.platform.events](/modules/platform/events/llms.txt): Typed platform events delivered through the ECS event bus - [tecs.platform](/modules/platform/llms.txt): Platform events, operating-system services, time, and windows - [tecs.platform.os](/modules/platform/os/llms.txt): Runtime capabilities, process signals, clipboard access, and desktop services - [tecs.platform.time](/modules/platform/time/llms.txt): Platform clocks, calendar conversion, delays, and frame timing - [tecs.platform.window](/modules/platform/window/llms.txt): Creating an OS window, choosing display modes, and using screen coordinates and pixels correctly - [tecs.regex](/modules/regex/llms.txt): Compiled Rust regular expressions over Lua byte strings - [tecs.sequence](/modules/sequence/llms.txt): Snapshot-safe programs, waits, ownership, actions, and tween timelines - [tecs.ui](/modules/ui/llms.txt): Retained layout, clipping, scrolling, and interaction for composed UI entities - [tecs.workers](/modules/workers/llms.txt): Separate Lua states joined by serialized channels, whose results and call replies a system waits for without blocking the frame - [Building interfaces](/ui/llms.txt): Compose retained layout, existing GPU drawing components, scrolling, clipping, and input - [Complete documentation](/llms-full.txt)