lithhash/alloyecs
v0.1.0 ยท
A fast, feature-rich Entity Component System for Roblox.
AlloyECS
A fast, feature-rich Entity Component System for Roblox.
Features
- โก High performance with bitset queries and caching
- ๐ท๏ธ Tag components for zero-cost markers
- ๐ Entity relationships
- ๐ฆ Prefab system for templates
- ๐ฏ System scheduler with phases
- ๐ Change tracking (added/removed/changed)
- ๐พ Serialization support
Installation
Manual
Download the latest release and add the src folder to your project.
Quick Start
local AlloyECS = require(path.to.AlloyECS)
local world = AlloyECS.createWorld()
-- Define components
local Position = world:component()
local Velocity = world:component()
-- Create entity
local entity = world:entity()
world:set(entity, Position, Vector3.zero)
world:set(entity, Velocity, Vector3.new(1, 0, 0))
-- Query and update
for id, pos, vel in world:query(Position, Velocity) do
world:set(id, Position, pos + vel)
end
License
MIT