All Projects → NateTheGreatt → bitECS

NateTheGreatt / bitECS

Licence: MPL-2.0 License
Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to bitECS

ecs
A dependency free, lightweight, fast Entity-Component System (ECS) implementation in Swift
Stars: ✭ 79 (-78.76%)
Mutual labels:  gamedev, ecs, entitycomponentsystem
Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (-73.66%)
Mutual labels:  gamedev, ecs
Smmalloc Csharp
Blazing fast memory allocator designed for video games meets .NET
Stars: ✭ 81 (-78.23%)
Mutual labels:  gamedev, high-performance
Netstack
Lightweight toolset for creating concurrent networking systems for multiplayer games
Stars: ✭ 157 (-57.8%)
Mutual labels:  gamedev, high-performance
Entitas Csharp
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
Stars: ✭ 5,393 (+1349.73%)
Mutual labels:  gamedev, ecs
Entt
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Stars: ✭ 6,017 (+1517.47%)
Mutual labels:  gamedev, ecs
Flecs
A fast entity component system (ECS) for C & C++
Stars: ✭ 2,201 (+491.67%)
Mutual labels:  gamedev, ecs
Defaultecs
Entity Component System framework aiming for syntax and usage simplicity with maximum performance for game development.
Stars: ✭ 286 (-23.12%)
Mutual labels:  gamedev, ecs
Xygine
2D engine / framework built around SFML
Stars: ✭ 174 (-53.23%)
Mutual labels:  gamedev, ecs
Entitas Cpp
Entitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
Stars: ✭ 229 (-38.44%)
Mutual labels:  gamedev, ecs
Anything about game
A wonderful list of Game Development resources.
Stars: ✭ 541 (+45.43%)
Mutual labels:  gamedev, ecs
polymorph
A fast and frugal entity-component-system library with a focus on code generation and compile time optimisation.
Stars: ✭ 74 (-80.11%)
Mutual labels:  gamedev, ecs
Carp
Carp is a programming language designed to work well for interactive and performance sensitive use cases like games, sound synthesis and visualizations.
Stars: ✭ 4,389 (+1079.84%)
Mutual labels:  gamedev, functional
Feather
A Minecraft server implementation in Rust
Stars: ✭ 896 (+140.86%)
Mutual labels:  gamedev, ecs
Godex
Godex is a Godot Engine ECS library.
Stars: ✭ 307 (-17.47%)
Mutual labels:  gamedev, ecs
Lambda Lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (-67.2%)
Mutual labels:  gamedev, functional
js13k-ecs
A 1kb entity component system, designed for Js13kGames
Stars: ✭ 76 (-79.57%)
Mutual labels:  gamedev, ecs
Shipyard
Entity Component System focused on usability and speed.
Stars: ✭ 247 (-33.6%)
Mutual labels:  gamedev, ecs
Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (-53.23%)
Mutual labels:  gamedev, ecs
cog
Macro powered ECS Framework written in Haxe
Stars: ✭ 29 (-92.2%)
Mutual labels:  gamedev, ecs


bitECS

Version Minzipped Downloads License

Functional, minimal, data-oriented, ultra-high performance ECS library written using JavaScript TypedArrays.

Features

🔮 Simple, declarative API 🔥 Blazing fast iteration
🔍 Powerful & performant queries 💾 Serialization included
🍃 Zero dependencies 🌐 Node or browser
🤏 ~5kb minzipped 🏷 TypeScript support
Made with love 🔺 glMatrix support

📈 Benchmarks

noctjs/ecs-benchmark ddmills/js-ecs-benchmarks

💿 Install

npm i bitecs

📘 Documentation

🏁 Getting Started
📑 API
FAQ
🏛 Tutorial

🕹 Example

import {
  createWorld,
  Types,
  defineComponent,
  defineQuery,
  addEntity,
  addComponent,
  pipe,
} from 'bitecs'

const Vector3 = { x: Types.f32, y: Types.f32, z: Types.f32 }
const Position = defineComponent(Vector3)
const Velocity = defineComponent(Vector3)

const movementQuery = defineQuery([Position, Velocity])

const movementSystem = (world) => {
  const { time: { delta } } = world
  const ents = movementQuery(world)
  for (let i = 0; i < ents.length; i++) {
    const eid = ents[i]
    Position.x[eid] += Velocity.x[eid] * delta
    Position.y[eid] += Velocity.y[eid] * delta
    Position.z[eid] += Velocity.z[eid] * delta
  }
  return world
}

const timeSystem = world => {
  const { time } = world
  const now = performance.now()
  const delta = now - time.then
  time.delta = delta
  time.elapsed += delta
  time.then = now
  return world
}

const pipeline = pipe(movementSystem, timeSystem)

const world = createWorld()
world.time = { delta: 0, elapsed: 0, then: performance.now() }

const eid = addEntity(world)
addComponent(world, Position, eid)
addComponent(world, Velocity, eid)
Velocity.x[eid] = 1.23
Velocity.y[eid] = 1.23

setInterval(() => {
  pipeline(world)
}, 16)

🔌 Powering

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].