huodianyan / Poly.VecEcs

A lightweight vectorial ECS focused on compatibility and performance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VecEcs - Lightweight vectorial C# Entity Component System framework

A lightweight vectorial ECS focused on compatibility and performance.

Features

  • Zero dependencies
  • Minimal ECS core
  • Lightweight and fast
  • Zero/small memory allocations/footprint
  • Entity/Component managed by vectorization
  • Query cache entity
  • 255 components, unlimited entity, archetype, query, system
  • Adapted to all C# game engine
  • Support Web by same framework*
  • Support serialzation, network*

Table of content

Socials

Installation

Overview

struct ComponentA { public int Value; }
struct ComponentB { public int Value; }

var world = new EcsWorld();
var arrayA = world.GetComponentArray<ComponentA>();
var arrayB = world.GetComponentArray<ComponentB>();

world.CreateEntity(typeof(ComponentA), typeof(ComponentC));

var queryDesc = world.CreateQueryDesc().WithAll<ComponentA>().WithNone<ComponentB>().Build();
var query = world.GetQuery(queryDesc);

foreach(var entityId in query)
{
	ref var compA = arrayA[entityId];
    compA.Value++;
};

Entity

Component

System

Query

Archetype

Extensions

License

The software is released under the terms of the MIT license.

No personal support or any guarantees.

FAQ

References

Documents

Projects

Benchmarks

Tech Docs

About

A lightweight vectorial ECS focused on compatibility and performance.


Languages

Language:C# 100.0%