Nata - OOP/ECS style entity management

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Nata - OOP/ECS style entity management

Post by Tesselode » Thu Nov 16, 2017 6:54 am

Hello o/

I've been working on a library called Nata. It make entity pools, and it uses a hybrid OOP/ECS approach.

Systems looks like this:

Code: Select all

verticalMovementSystem = {
    filter = function(e) return e.yspeed end,
    update = function(e, dt)
        e.y = 300 + 200 * math.sin(uptime * e.yspeed * .5)

drawSystem = {
    filter = function(e) return e.color end,
    draw = function(e)'fill', e.x, e.y, e.radius, 64)
But you can also use plain old classes and have them integrate neatly.

The library is still very much a WIP; I've been going back and forth on a lot of design decisions. But I'd like to get more feedback on it!

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests