{"id":47928306,"url":"https://github.com/argadron/stemma-ts","last_synced_at":"2026-04-04T07:02:51.993Z","repository":{"id":342301559,"uuid":"1157758703","full_name":"Argadron/stemma-ts","owner":"Argadron","description":"High-performance reactive headless game engine for TypeScript. Featuring spatial partitioning, intent validation, and deterministic state management.","archived":false,"fork":false,"pushed_at":"2026-03-28T14:44:18.000Z","size":332,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T16:27:06.286Z","etag":null,"topics":["ecs","headless","js-game","reactive","spatial-grid","stemma","stemma-ts","typescript-game","typescript-game-engine"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Argadron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"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-02-14T08:47:23.000Z","updated_at":"2026-03-28T14:44:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Argadron/stemma-ts","commit_stats":null,"previous_names":["argadron/stemma-ts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Argadron/stemma-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argadron%2Fstemma-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argadron%2Fstemma-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argadron%2Fstemma-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argadron%2Fstemma-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Argadron","download_url":"https://codeload.github.com/Argadron/stemma-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argadron%2Fstemma-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31390695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ecs","headless","js-game","reactive","spatial-grid","stemma","stemma-ts","typescript-game","typescript-game-engine"],"created_at":"2026-04-04T07:02:50.559Z","updated_at":"2026-04-04T07:02:51.975Z","avatar_url":"https://github.com/Argadron.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌿 stemma-ts\n\u003e **High-Performance Headless Game Engine**  \n\u003e *Reactive topology and deterministic logic for game worlds.*\n\n`stemma-ts` is an ultra-lightweight Kernel designed for building complex game systems. The engine focuses on **intent validation**, **reactive data access**, and **spatial optimization**.\n\n---\n\n## 🛠 Core Principles\n\n- **📦 Zero Dependencies:** 0 external dependencies. Pure TypeScript. Works everywhere: Node.js, Browser, Bun, Deno.\n- **⚡ Spatial Grid ($O(1)$):** Custom spatial partitioning for instantaneous object lookups.\n- **🔄 Reactive LiveQueries:** Real-time entity indexing. Data \"flows\" into your systems as tags or states change.\n- **🛡 Intent Validation:** A pre-execution hook system (Intents) that eliminates logical bugs before they happen.\n- **💾 Deterministic Snapshots:** Full world state serialization for saves, replays, and network synchronization.\n\n---\n\n## 📖 Integration Layers\n\nThe engine scales with the developer's expertise, offering different tools for different tasks.\n\n### 🟢 Junior: Imperative Scripting\nUsing the engine as a utility library. Direct object manipulation and manual condition checks.\n\n```typescript\n// Create an entity and issue orders directly\nconst hero = manager.create({ name: 'Hero', position: [5, 5] });\n\ngame.on('entityMoved', (o, e, d) =\u003e {\n    console.log('Hero moved!');\n});\n\nhero.move([6, 5]);\nhero.pickUp();\n```\n\n### 🟡 Middle: Declarative Reactivity\nAt this level, developers stop writing manual filter loops. Using **LiveQueries**, the engine automatically maintains up-to-date entity lists, reacting to tag changes or state updates in real-time.\n\n```typescript\nclass ZombieAISystem implements IPlugin {\n    // The engine automatically populates and clears this Set \n    // as entities gain or lose 'dead' or 'frozen' tags.\n    @InjectLiveQuery({ \n        all: ['zombie'], \n        none: ['dead', 'frozen'],\n        where: (e) =\u003e e.health \u003e 50 \n    })\n    private activeZombies!: Set\u003cEntity\u003e;\n\n    @OnTick(20) // Optimized cycle: runs every 20 ticks\n    update(game: Game) {\n        // No .filter() or .find() overhead — data is ready and reactive.\n        this.activeZombies.forEach(zombie =\u003e zombie.think());\n    }\n}\n```\n\n### 🔴 Senior: Architectural Design (Meta-Programming)\nAt this level, developers design **interaction protocols**. Instead of \"zombie code,\" they create **systemic filters** that enforce world rules across all plugins, ensuring architectural integrity.\n\n```typescript\n/**\n * A Senior developer implements a global rule: \"Stunned units cannot use items.\"\n * This rule automatically applies to all code written by Junior and Middle developers.\n */\ngame.registerCustomEvent(`${USE_VALIDATION_EVENT_PREFIX}:${CommandType.USE_ITEM}`, (opts, event, data) =\u003e {\n    const { entity } = data.eventData;\n    \n    // If the entity has the 'stunned' tag, we block any \"intent\" to use an item at the core level\n    if (entity!.hasTag('stunned')) {\n        data.eventData.isAllowed = false;\n        data.eventData.errors.push('ACTION_BLOCKED_BY_STUN');\n    }\n});\n\n/**\n * Utilizing high-level system hooks for complex calculations.\n * Example: Real-time Line-of-Sight (LoS) check considering fog of war or cover.\n */\nconst { isVisible, factor } = useVisibility(game, zombie, player);\n\nif (isVisible \u0026\u0026 factor \u003e 0.5) {\n    // Zombie sees the player clearly — proceed with attack logic\n    zombie.attack();\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargadron%2Fstemma-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargadron%2Fstemma-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargadron%2Fstemma-ts/lists"}