{"id":13525025,"url":"https://github.com/nidorx/ecs-lua","last_synced_at":"2025-07-20T01:31:38.216Z","repository":{"id":49523754,"uuid":"306048698","full_name":"nidorx/ecs-lua","owner":"nidorx","description":"ECS Lua is a fast and easy to use ECS (Entity Component System) engine for game development.","archived":false,"fork":false,"pushed_at":"2024-06-24T06:34:40.000Z","size":7322,"stargazers_count":194,"open_issues_count":8,"forks_count":64,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-20T15:06:31.100Z","etag":null,"topics":["lua","luajit","roblox","robloxlua"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/nidorx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2020-10-21T14:19:07.000Z","updated_at":"2025-05-09T05:03:29.000Z","dependencies_parsed_at":"2024-11-02T09:30:52.241Z","dependency_job_id":null,"html_url":"https://github.com/nidorx/ecs-lua","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/nidorx/ecs-lua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidorx%2Fecs-lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidorx%2Fecs-lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidorx%2Fecs-lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidorx%2Fecs-lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nidorx","download_url":"https://codeload.github.com/nidorx/ecs-lua/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nidorx%2Fecs-lua/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053824,"owners_count":23869496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["lua","luajit","roblox","robloxlua"],"created_at":"2024-08-01T06:01:15.397Z","updated_at":"2025-07-20T01:31:38.185Z","avatar_url":"https://github.com/nidorx.png","language":"Lua","readme":"\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://nidorx.github.io/ecs-lua\"\u003e\n      \u003cimg \n         src=\"docs/assets/logo.svg\" \n         alt=\"https://nidorx.github.io/ecs-lua\" \n      /\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://app.travis-ci.com/nidorx/ecs-lua\"\u003e\n      \u003cimg src=\"https://app.travis-ci.com/nidorx/ecs-lua.svg?branch=master\" alt=\"Build Status\" /\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e\u003ca href=\"https://nidorx.github.io/ecs-lua#/\"\u003eRead the Documentation\u003c/a\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n# What is it?\n\n\u003cstrong\u003eECS Lua\u003c/strong\u003e is a fast and easy to use ECS (Entity Component System) engine for game development.\n\n\u003cdiv align=\"center\"\u003e\n\n![](docs/assets/diagram-1.png)\n\n\u003c/div\u003e\n\nThe basic idea of this pattern is to stop defining entities using a \n[hierarchy](https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)) of classes and start doing use of \n[composition](https://en.wikipedia.org/wiki/Object_composition) in a Data Oriented Programming paradigm.\n([More information on Wikipedia](https://en.wikipedia.org/wiki/Entity_component_system)).\nProgramming with an ECS can result in code that is more efficient and easier to extend over time.\n\n\n# How does it work?\n\n\u003cdiv align=\"center\"\u003e\n\n![ECS Lua pipeline](docs/assets/pipeline.png)\n\n\u003c/div\u003e\n\n\n# Talk is cheap. Show me the code!\n\n```lua\nlocal World, System, Query, Component = ECS.World, ECS.System, ECS.Query, ECS.Component\n\nlocal Health = Component(100)\nlocal Position = Component({ x = 0, y = 0})\n\nlocal isInAcid = Query.Filter(function()\n   return true  -- it's wet season\nend)\n\nlocal InAcidSystem = System(\"process\", Query.All( Health, Position, isInAcid() ))\n\nfunction InAcidSystem:Update()\n   for i, entity in self:Result():Iterator() do\n      local health = entity[Health]\n      health.value = health.value - 0.01\n   end\nend\n\nlocal world = World({ InAcidSystem })\n\nworld:Entity(Position({ x = 5.0 }), Health())\n```\n\n# Features\n\n**ECS Lua** has no external dependencies and is compatible and tested with [Lua 5.1], [Lua 5.2], [Lua 5.3], [Lua 5.4],\n[LuaJit] and [Roblox Luau](https://luau-lang.org/)\n\n- **Game engine agnostic**: It can be used in any engine that has the Lua scripting language.\n- **Ergonomic**: Focused on providing a simple yet efficient API\n- **FSM**: Finite State Machines in an easy and intuitive way\n- **JobSystem**: To running systems in parallel (through [coroutines])\n- **Reactive**: Systems can be informed when an entity changes\n- **Predictable**:\n   - The systems will work in the order they were registered or based on the priority set when registering them.\n   - Reactive events do not generate a random callback when issued, they are executed at a predefined step.\n\n# Goal\n\nTo be a lightweight, simple, ergonomic and high-performance ECS library that can be easily extended. The **ECS Lua**\ndoes not strictly follow _\"pure ECS design\"_.\n\n# Usage\n\nRead our [Full Documentation][docs] to learn how to use **ECS Lua**.\n\n# Get involved\nAll kinds of contributions are welcome!\n\n🐛 **Found a bug?**  \nLet me know by [creating an issue][new-issue].\n\n❓ **Have a question?**  \n[Roblox DevForum][discussions] is a good place to start.\n\n⚙️ **Interested in fixing a [bug][bugs] or adding a [feature][features]?**  \nCheck out the [contributing guidelines](CONTRIBUTING.md).\n\n📖 **Can we improve [our documentation][docs]?**  \nPull requests even for small changes can be helpful. Each page in the docs can be edited by clicking the \n\"Edit on GitHub\" link at the bottom right.\n\n[docs]: https://nidorx.github.io/ecs-lua\n[bugs]: https://github.com/nidorx/ecs-lua/issues?q=is%3Aissue+is%3Aopen+label%3Abug\n[features]: https://github.com/nidorx/ecs-lua/issues?q=is%3Aissue+is%3Aopen+label%3Afeature\n[new-issue]: https://github.com/nidorx/ecs-lua/issues/new/choose\n[discussions]: https://devforum.roblox.com/t/841175\n[Lua 5.1]:https://app.travis-ci.com/github/nidorx/ecs-lua\n[Lua 5.2]:https://app.travis-ci.com/github/nidorx/ecs-lua\n[Lua 5.3]:https://app.travis-ci.com/github/nidorx/ecs-lua\n[Lua 5.4]:https://app.travis-ci.com/github/nidorx/ecs-lua\n[LuaJit]:https://app.travis-ci.com/github/nidorx/ecs-lua\n[coroutines]:http://www.lua.org/pil/9.1.html\n\n# License\n\nThis code is distributed under the terms and conditions of the [MIT license](LICENSE).\n\n\n\n","funding_links":[],"categories":["Lua","[ECS Libraries](#contents)","Libraries","Entity"],"sub_categories":["Programming Language"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidorx%2Fecs-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnidorx%2Fecs-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidorx%2Fecs-lua/lists"}