{"id":34917355,"url":"https://github.com/esengine/esengine","last_synced_at":"2026-03-09T13:46:05.114Z","repository":{"id":38250008,"uuid":"270497268","full_name":"esengine/esengine","owner":"esengine","description":"ESEngine - High-performance TypeScript ECS Framework for Game Development","archived":false,"fork":false,"pushed_at":"2026-01-16T08:31:32.000Z","size":65110,"stargazers_count":754,"open_issues_count":0,"forks_count":139,"subscribers_count":18,"default_branch":"master","last_synced_at":"2026-01-18T08:23:54.864Z","etag":null,"topics":["2d-game-engine","behavior-tree","ecs","entity-component-system","esengine","game-development","game-engine","game-framework","physics","sprite","tilemap","typescript","wasm","webgl"],"latest_commit_sha":null,"homepage":"http://esengine.github.io/esengine/","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/esengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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},"funding":{"github":null,"patreon":"esengine","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://github.com/esengine/esengine/blob/master/sponsor/alipay.jpg","https://github.com/esengine/esengine/blob/master/sponsor/wechatpay.png"]}},"created_at":"2020-06-08T02:17:13.000Z","updated_at":"2026-01-18T06:18:46.000Z","dependencies_parsed_at":"2025-07-08T13:33:22.142Z","dependency_job_id":"9b1f08de-eeb1-47b6-854a-9f004ec54cb1","html_url":"https://github.com/esengine/esengine","commit_stats":null,"previous_names":["esengine/esengine"],"tags_count":263,"template":false,"template_full_name":null,"purl":"pkg:github/esengine/esengine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esengine%2Fesengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esengine%2Fesengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esengine%2Fesengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esengine%2Fesengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esengine","download_url":"https://codeload.github.com/esengine/esengine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esengine%2Fesengine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28630938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["2d-game-engine","behavior-tree","ecs","entity-component-system","esengine","game-development","game-engine","game-framework","physics","sprite","tilemap","typescript","wasm","webgl"],"created_at":"2025-12-26T12:49:00.395Z","updated_at":"2026-01-21T09:02:39.635Z","avatar_url":"https://github.com/esengine.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/esengine/esengine/master/docs/public/logo.svg\" alt=\"ESEngine\" width=\"180\"\u003e\n  \u003cbr\u003e\n  ESEngine\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eModular Game Framework for TypeScript\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@esengine/ecs-framework\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@esengine/ecs-framework?style=flat-square\u0026color=blue\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/esengine/esengine/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/esengine/esengine/ci.yml?branch=master\u0026style=flat-square\" alt=\"build\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/esengine/esengine/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green?style=flat-square\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/esengine/esengine/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/esengine/esengine?style=flat-square\" alt=\"stars\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.0+-blue?style=flat-square\u0026logo=typescript\u0026logoColor=white\" alt=\"TypeScript\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eEnglish\u003c/b\u003e | \u003ca href=\"./README_CN.md\"\u003e中文\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://esengine.github.io/esengine/\"\u003eDocumentation\u003c/a\u003e ·\n  \u003ca href=\"https://esengine.github.io/esengine/api/README\"\u003eAPI Reference\u003c/a\u003e ·\n  \u003ca href=\"./examples/\"\u003eExamples\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## What is ESEngine?\n\nESEngine is a collection of **engine-agnostic game development modules** for TypeScript. Use them with Cocos Creator, Laya, Phaser, PixiJS, or any JavaScript game engine.\n\nThe core is a high-performance **ECS (Entity-Component-System)** framework, accompanied by optional modules for AI, networking, physics, and more.\n\n```bash\nnpm install @esengine/ecs-framework\n```\n\n## Features\n\n| Module | Description | Engine Required |\n|--------|-------------|:---------------:|\n| **ECS Core** | Entity-Component-System framework with reactive queries | No |\n| **Behavior Tree** | AI behavior trees with visual editor support | No |\n| **Blueprint** | Visual scripting system | No |\n| **FSM** | Finite state machine | No |\n| **Timer** | Timer and cooldown systems | No |\n| **Spatial** | Spatial indexing and queries (QuadTree, Grid) | No |\n| **Pathfinding** | A* and navigation mesh pathfinding | No |\n| **Procgen** | Procedural generation (noise, random, sampling) | No |\n| **RPC** | High-performance RPC communication framework | No |\n| **Server** | Game server framework with rooms, auth, rate limiting | No |\n| **Network** | Client networking with prediction, AOI, delta compression | No |\n| **Transaction** | Game transaction system with Redis/Memory storage | No |\n| **World Streaming** | Open world chunk loading and streaming | No |\n\n\u003e All framework modules can be used standalone with any rendering engine.\n\n## Quick Start\n\n### Using CLI (Recommended)\n\nThe easiest way to add ECS to your existing project:\n\n```bash\n# In your project directory\nnpx @esengine/cli init\n```\n\nThe CLI automatically detects your project type (Cocos Creator 2.x/3.x, LayaAir 3.x, or Node.js) and generates the necessary integration code.\n\n### Manual Setup\n\n```typescript\nimport {\n    Core, Scene, Entity, Component, EntitySystem,\n    Matcher, Time, ECSComponent, ECSSystem\n} from '@esengine/ecs-framework';\n\n// Define components (data only)\n@ECSComponent('Position')\nclass Position extends Component {\n    x = 0;\n    y = 0;\n}\n\n@ECSComponent('Velocity')\nclass Velocity extends Component {\n    dx = 0;\n    dy = 0;\n}\n\n// Define system (logic)\n@ECSSystem('Movement')\nclass MovementSystem extends EntitySystem {\n    constructor() {\n        super(Matcher.all(Position, Velocity));\n    }\n\n    protected process(entities: readonly Entity[]): void {\n        for (const entity of entities) {\n            const pos = entity.getComponent(Position);\n            const vel = entity.getComponent(Velocity);\n            pos.x += vel.dx * Time.deltaTime;\n            pos.y += vel.dy * Time.deltaTime;\n        }\n    }\n}\n\n// Initialize\nCore.create();\nconst scene = new Scene();\nscene.addSystem(new MovementSystem());\n\nconst player = scene.createEntity('Player');\nplayer.addComponent(new Position());\nplayer.addComponent(new Velocity());\n\nCore.setScene(scene);\n\n// Integrate with your game loop\nfunction gameLoop(currentTime: number) {\n    Core.update(currentTime / 1000);\n    requestAnimationFrame(gameLoop);\n}\nrequestAnimationFrame(gameLoop);\n```\n\n## Using with Other Engines\n\nESEngine's framework modules are designed to work alongside your preferred rendering engine:\n\n### With Cocos Creator\n\n```typescript\nimport { Component as CCComponent, _decorator } from 'cc';\nimport { Core, Scene, Matcher, EntitySystem } from '@esengine/ecs-framework';\nimport { BehaviorTreeExecutionSystem } from '@esengine/behavior-tree';\n\nconst { ccclass } = _decorator;\n\n@ccclass('GameManager')\nexport class GameManager extends CCComponent {\n    private ecsScene!: Scene;\n\n    start() {\n        Core.create();\n        this.ecsScene = new Scene();\n\n        // Add ECS systems\n        this.ecsScene.addSystem(new BehaviorTreeExecutionSystem());\n        this.ecsScene.addSystem(new MyGameSystem());\n\n        Core.setScene(this.ecsScene);\n    }\n\n    update(dt: number) {\n        Core.update(dt);\n    }\n}\n```\n\n### With Laya 3.x\n\n```typescript\nimport { Core, Scene } from '@esengine/ecs-framework';\nimport { FSMSystem } from '@esengine/fsm';\n\nconst { regClass } = Laya;\n\n@regClass()\nexport class ECSManager extends Laya.Script {\n    private ecsScene = new Scene();\n\n    onAwake(): void {\n        Core.create();\n        this.ecsScene.addSystem(new FSMSystem());\n        Core.setScene(this.ecsScene);\n    }\n\n    onUpdate(): void {\n        Core.update(Laya.timer.delta / 1000);\n    }\n\n    onDestroy(): void {\n        Core.destroy();\n    }\n}\n```\n\n## Packages\n\n### Framework (Engine-Agnostic)\n\nThese packages have **zero rendering dependencies** and work with any engine:\n\n```bash\nnpm install @esengine/ecs-framework      # Core ECS\nnpm install @esengine/behavior-tree      # AI behavior trees\nnpm install @esengine/blueprint          # Visual scripting\nnpm install @esengine/fsm                # State machines\nnpm install @esengine/timer              # Timers \u0026 cooldowns\nnpm install @esengine/spatial            # Spatial indexing\nnpm install @esengine/pathfinding        # Pathfinding\nnpm install @esengine/procgen            # Procedural generation\nnpm install @esengine/rpc                # RPC framework\nnpm install @esengine/server             # Game server\nnpm install @esengine/network            # Client networking\nnpm install @esengine/transaction        # Transaction system\nnpm install @esengine/world-streaming    # World streaming\n```\n\n### ESEngine Runtime (Optional)\n\nIf you want a complete engine solution with rendering:\n\n| Category | Packages |\n|----------|----------|\n| **Core** | `engine-core`, `asset-system`, `material-system` |\n| **Rendering** | `sprite`, `tilemap`, `particle`, `camera`, `mesh-3d` |\n| **Physics** | `physics-rapier2d` |\n| **Platform** | `platform-web`, `platform-wechat` |\n\n### Editor (Optional)\n\nA visual editor built with Tauri for scene management:\n\n- Download from [Releases](https://github.com/esengine/esengine/releases)\n- [Build from source](./packages/editor/editor-app/README.md)\n- Supports behavior tree editing, tilemap painting, visual scripting\n\n## Project Structure\n\n```\nesengine/\n├── packages/\n│   ├── framework/          # Engine-agnostic modules (NPM publishable)\n│   │   ├── core/          # ECS Framework\n│   │   ├── math/          # Math utilities\n│   │   ├── behavior-tree/ # AI behavior trees\n│   │   ├── blueprint/     # Visual scripting\n│   │   ├── fsm/           # Finite state machine\n│   │   ├── timer/         # Timer system\n│   │   ├── spatial/       # Spatial queries\n│   │   ├── pathfinding/   # Pathfinding\n│   │   ├── procgen/       # Procedural generation\n│   │   ├── rpc/           # RPC framework\n│   │   ├── server/        # Game server\n│   │   ├── network/       # Client networking\n│   │   ├── transaction/   # Transaction system\n│   │   └── world-streaming/ # World streaming\n│   │\n│   ├── engine/            # ESEngine runtime\n│   ├── rendering/         # Rendering modules\n│   ├── physics/           # Physics modules\n│   ├── editor/            # Visual editor\n│   └── rust/              # WASM renderer\n│\n├── docs/                   # Documentation\n└── examples/               # Examples\n```\n\n## Building from Source\n\n```bash\ngit clone https://github.com/esengine/esengine.git\ncd esengine\n\npnpm install\npnpm build\n\n# Type check framework packages\npnpm type-check:framework\n\n# Run tests\npnpm test\n```\n\n## Documentation\n\n- [ECS Framework Guide](./packages/framework/core/README.md)\n- [Behavior Tree Guide](./packages/framework/behavior-tree/README.md)\n- [Editor Setup Guide](./packages/editor/editor-app/README.md) ([中文](./packages/editor/editor-app/README_CN.md))\n- [API Reference](https://esengine.github.io/esengine/api/README)\n\n## Community\n\n- [GitHub Issues](https://github.com/esengine/esengine/issues) - Bug reports and feature requests\n- [GitHub Discussions](https://github.com/esengine/esengine/discussions) - Questions and ideas\n- [Discord](https://discord.gg/gCAgzXFW) - Chat with the community\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines before submitting a pull request.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nESEngine is licensed under the [MIT License](LICENSE). Free for personal and commercial use.\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with care by the ESEngine community\n\u003c/p\u003e\n","funding_links":["https://patreon.com/esengine","https://github.com/esengine/esengine/blob/master/sponsor/alipay.jpg","https://github.com/esengine/esengine/blob/master/sponsor/wechatpay.png"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesengine%2Fesengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesengine%2Fesengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesengine%2Fesengine/lists"}