"Arch" - ECS for monogame received CommandBuffers and exclusive queries ! :) Check it out !

I lately developed a C# highperformance archetype ECS for gamedev and data oriented programming, , which can be used with or for mono… and i put a lot of love and effort into it :slight_smile:

genaray/Arch: A high performance c# Archetype Entity Component System ( ECS ) with optional multithreading. (github.com)

Today the next big feature was added, CommandBuffers to record and playback operations in a performant way, which can be utilized by multithreading !

var _group = new []{ typeof(Bomb), typeof(Transform), typeof(Rotation) };
var buffer = new CreationBuffer(world);
world.ParallelQuery(in _queryDescription, (in Entity e) => {  // Multithreaded
    
    // Some other logic, like checking if physics happened, some event or whatever..:
    ...
        
    var spawnedBomb = buffer.Create(_group);
    buffer.Set(in spawnedBomb , new Transform{ X = 10 });
    buffer.Set(in spawnedBomb , new Rotation{ W = 10 });
});
buffer.Playback();

Glad for any contribution, feedback or star ! :>

1 Like