0.4
v0.4.0 - Complete Rewrite

bitECS

A flexible toolkit for data-oriented design in game development. Performance focused with zero dependencies.

bun add bitecs
๐Ÿ”ฎSimple, declarative API
๐ŸƒLightweight (~5kb)
๐Ÿ”Powerful querying
๐Ÿ“ฆZero dependencies
๐Ÿ”—Relational modeling
๐ŸงตThread-friendly
๐Ÿ’พSerialization included
๐Ÿ’–Made with love
example.ts
import { createWorld, addEntity, addComponent, query } from 'bitecs'

const Position = { x: [] as number[], y: [] as number[] }
const Velocity = { x: [] as number[], y: [] as number[] }

const world = createWorld()
const eid = addEntity(world)

addComponent(world, eid, Position)
addComponent(world, eid, Velocity)

for (const entity of query(world, [Position, Velocity])) {
  Position.x[entity] += Velocity.x[entity]
  Position.y[entity] += Velocity.y[entity]
}