{"id":51011668,"url":"https://github.com/svermeulen/trecs","last_synced_at":"2026-06-21T03:30:48.609Z","repository":{"id":351764438,"uuid":"1192370010","full_name":"svermeulen/trecs","owner":"svermeulen","description":"ECS framework for Unity with full game state serialization, input recording/playback, and Burst/Jobs support","archived":false,"fork":false,"pushed_at":"2026-06-05T06:43:11.000Z","size":10250,"stargazers_count":79,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-05T07:27:44.231Z","etag":null,"topics":["burst","csharp","deterministic","ecs","entity-component-system","game-development","serialization","unity","unity-package"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svermeulen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T06:31:29.000Z","updated_at":"2026-06-03T06:31:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/svermeulen/trecs","commit_stats":null,"previous_names":["svermeulen/trecs"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/svermeulen/trecs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svermeulen%2Ftrecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svermeulen%2Ftrecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svermeulen%2Ftrecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svermeulen%2Ftrecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svermeulen","download_url":"https://codeload.github.com/svermeulen/trecs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svermeulen%2Ftrecs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34593128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["burst","csharp","deterministic","ecs","entity-component-system","game-development","serialization","unity","unity-package"],"created_at":"2026-06-21T03:30:47.857Z","updated_at":"2026-06-21T03:30:48.594Z","avatar_url":"https://github.com/svermeulen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Trecs\n\n\u003cimg src=\"docs/assets/logo.png\" alt=\"Trecs\" width=\"300\" align=\"right\" /\u003e\n\n[![Source Generator](https://github.com/svermeulen/trecs/actions/workflows/sourcegen.yml/badge.svg)](https://github.com/svermeulen/trecs/actions/workflows/sourcegen.yml)\n[![Unity](https://github.com/svermeulen/trecs/actions/workflows/unity.yml/badge.svg)](https://github.com/svermeulen/trecs/actions/workflows/unity.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n![Unity 6000.3+](https://img.shields.io/badge/Unity-6000.3%2B-black)\n\nA high-performance Entity Component System framework for Unity, designed for **deterministic simulation, recording/playback, and Burst/Jobs**.\n\n**Full docs: [svermeulen.github.io/trecs](https://svermeulen.github.io/trecs)** \n\n[Getting Started](https://svermeulen.github.io/trecs/getting-started/) · [Glossary](https://svermeulen.github.io/trecs/glossary/) · [Samples](https://svermeulen.github.io/trecs/samples/) · [FAQ](https://svermeulen.github.io/trecs/guides/faq/) · [Trecs vs Unity ECS](https://svermeulen.github.io/trecs/guides/trecs-vs-unity-ecs/)\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003e **Status:** Trecs is a `0.x` release. While it is functional and reasonably well-tested, the API is still evolving and future updates are likely to include many breaking changes.\n\n## Features\n\n- **Cache-friendly storage.** Components live in contiguous structure-of-arrays buffers grouped by tag set.\n- **Composable building blocks.** Aspects bundle component access; sets give sparse subsets without restructuring storage; templates declare entity blueprints with inheritance and partitions; `SharedPtr` / `UniquePtr` let components reference heap data.\n- **Burst and Jobs out of the box.** A source generator emits job structs and chains `JobHandle` dependencies from the components you read and write — no manual wiring.\n- **Deterministic by construction.** Fixed-timestep simulation, seeded RNG, isolated input, and built-in snapshot / record / replay with desync detection.\n- **Editor tooling.** A live entity inspector and a record / scrub / fork timeline window for diagnosing transient bugs.\n\n## Quick Start\n\n```csharp\n// 1. Components — unmanaged structs holding per-entity data\npublic partial struct Position : IEntityComponent { public float3 Value; }\npublic partial struct Velocity : IEntityComponent { public float3 Value; }\n\n// 2. A tag — a zero-cost marker\npublic struct PlayerTag : ITag { }\n\n// 3. A template — the entity blueprint\npublic partial class PlayerEntity : ITemplate, ITagged\u003cPlayerTag\u003e\n{\n    Position Position;\n    Velocity Velocity;\n}\n\n// 4. A system — logic that runs over matching entities\npublic partial class MovementSystem : ISystem\n{\n    [ForEachEntity(typeof(PlayerTag))]\n    void Execute(ref Position position, in Velocity velocity)\n    {\n        position.Value += velocity.Value * World.DeltaTime;\n    }\n}\n\n// 5. Build and run\nvar world = new WorldBuilder()\n    .AddTemplate(PlayerEntity.Template)\n    .AddSystem(new MovementSystem())\n    .BuildAndInitialize();\n\n// In a MonoBehaviour:\nvoid Update()    =\u003e world.Tick();\nvoid OnDestroy() =\u003e world.Dispose();\n```\n\n`World` inside a system body is a source-generated property — your access into the running world for that phase. See [Getting Started](https://svermeulen.github.io/trecs/getting-started/) for the full walkthrough, or the [Glossary](https://svermeulen.github.io/trecs/glossary/) for a one-stop reference of the terminology.\n\n## Installation\n\nRequires Unity 6000.3+.\n\n### Via OpenUPM (recommended)\n\nWith the [openupm-cli](https://openupm.com/):\n\n```bash\nopenupm add com.trecs.core\n```\n\nOr add the scoped registry to `Packages/manifest.json` manually:\n\n```json\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"package.openupm.com\",\n      \"url\": \"https://package.openupm.com\",\n      \"scopes\": [\"com.trecs\"]\n    }\n  ],\n  \"dependencies\": {\n    \"com.trecs.core\": \"0.2.0\"\n  }\n}\n```\n\n### Via Git URL\n\nIn **Window → Package Manager**, click **+ → Add package from git URL** and enter:\n\n```\nhttps://github.com/svermeulen/trecs.git?path=UnityProject/Trecs/Assets/com.trecs.core\n```\n\n## Samples\n\nThe project includes 17 samples covering everything from basic entity creation to complex simulations with Burst jobs. To try them, clone the repo, open `UnityProject/Trecs` in Unity 6000.3+, and run `Assets/Samples/Core/Main.unity`. See the [samples docs](https://svermeulen.github.io/trecs/samples/) for details.\n\n| Sample | Concepts |\n|--------|----------|\n| 01 Hello Entity | Components, tags, templates, systems, world setup |\n| 02 Spawn \u0026 Destroy | Entity lifecycle, dynamic spawning, timed destruction |\n| 03 Aspects | Bundled component access for clean iteration |\n| 04 Predator Prey | Cross-entity references, template inheritance, event cleanup |\n| 05 Job System | Burst compilation, parallel jobs, WrapAsJob |\n| 06 Partitions | Template partitions, partition transitions, partition-filtered iteration |\n| 07 Feeding Frenzy | Complex simulation, visual smoothing, multiple interacting systems |\n| 08 Sets | Dynamic entity subsets, overlapping membership |\n| 09 Interpolation | Fixed-to-variable timestep interpolation |\n| 10 Dynamic Collections | Five trail-storage strategies: UniquePtr Queue, FixedArray, FixedList, TrecsList, TrecsArray |\n| 11 Snake | Complete grid-based game with input handling and recording/playback |\n| 12 Feeding Frenzy Benchmark | Performance benchmark comparing partition approaches and iteration styles |\n| 13 Aspect Interfaces | Shared aspect contracts via `partial interface` for reusable cross-species helpers |\n| 14 Blob Seed Pattern | Content-pipeline-stable `BlobId`s for shared immutable assets on the heap |\n| 15 Reactive Events | `OnAdded` / `OnRemoved` observers for cleanup and stat tracking |\n| 16 Multiple Worlds | Two independent `World` instances ticking side by side |\n| 17 Heightmap Blobs | Content-derived `BlobId`s via `UniqueHashGenerator`, plus a `NativeSharedPtr` Burst-job variant |\n\n## Acknowledgments\n\nTrecs was originally based on [Svelto.ECS](https://github.com/sebas77/Svelto.ECS) by Sebastiano Mandalà.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvermeulen%2Ftrecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvermeulen%2Ftrecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvermeulen%2Ftrecs/lists"}