[ANN] Ark.jl: archetype-based entity component system (ECS) for games and simulations

I would definitely like to support GPU, but I have no experience with it. So contributions or discussions in this direction are highly appreciated.

1 Like

Thanks, I’ll think about how that might work. We have a physics simulation that we plan to parallelize on GPU and that could at the same time benefit from moving to an ECS paradigm. But how it’s fully clear in my head yet. :slight_smile:

1 Like

Hi,

I am following this discussion with eager as I have a possibly naive question. I was recently profiling Julog.jl, because it is an essential part of planning ecosystem in Julia. The julog is notoriously type unstable. But looking at definition of structures used within the engine Julog.jl/src/structs.jl at master · ztangent/Julog.jl · GitHub, there is relatively few types. I therefore wonder, if there is any hope to use ECS for this. I think that the main difficulty would stem from the fact, that predicates can have arbitrary number of arguments. But possibly, if the maximum number is known in advance, this can be worked out.

Thanks for your thoughts in advance.

1 Like

Components and systems can be on the GPU, there is no restriction. Are you thinking about the underlying storage and therefore query logic to be on the GPU as well? There seems to be very little work on putting the entire ECS execution on the GPU.

1 Like

Yes, the idea would be to run per-entity system loops (parallelized) on GPU, and also a non-per entity (n-body-interaction) system.

I don’t know Julog.jl at all, so it is hard to say anything in this regard.

Ark.jl v0.2.0 will come with configurable storage backends per component type, currently Vector and StructArray-(like). It can already be tested on the main branch. So it is probably possible to move the entire ECS data, or data for some components, to the GPU.

1 Like

Oh, that sounds great!

Ark.jl v0.2.0 is out! See the release announcement.

1 Like

@simsurace Just wanted to let you know that entity relationships are now fully functional and available on the main branch. It will take some more time until we will release it officially, but if you want to give it a try, we would love to hear your feedback!

2 Likes

Awesome, can’t test right now but sometime in the coming weeks I’ll try some of our logistics stuff to use relations (delivery items in vehicles, vehicles in depots, etc.) and see how it goes.

1 Like