Is it possible to incorporate ECS pattern with Xenko engine?


#1

As you may know, Unity is implementing ECS pattern to the core engine. But they are leaving the community in darkness all the time, I don’t like it.

  1. Does Xenko have built-in support for the ECS pattern?
  2. If not, can I plug-and-play a .Net ECS library such as Artemis CSharp? How hard would it be?

Thanks.


#2

Yes, Xenko implements ECS.


#3

I took a quick look at the documentation but I can’t find anything about ECS implementation of Xenko. Can you link me the relevant parts of the documentation?


#4

I don’t know about the documentation but the best I can provide is the source code reference:

You can see a few components and game systems implemented.

The documentation is lacking right now: https://doc.xenko.com/latest/en/manual/engine/entity-component-model/index.html but the source code is a good reference.


#5

Hmm, I was looking for a more DOD ECS. Thanks for your help, regardless.


#6

Funny enough I just wrote this on reddit: https://www.reddit.com/r/xenko/comments/991pm7/sveltoecs_on_xenko/

please let me know if you are interested in helping me making it work with Xenko :slight_smile:


#7

Funny enough I just wrote a comment on reddit :slight_smile:


#8

Funny enough I just wrote a custom component for xenko in the root render feature demo repository:


#9

however, i have a question here for @xen2:
how does the xenko entity component system relate to the new ways of dealing with composition and multi threading as described here in the unity intro videos? what they are doing is basically laying the data out in a cache friendly way and then run parallelized jobs on it. is this already possible in the xenko engine, or how does it relate to xenkos approach to multi threading?


#10

We have the System part of the ECS to easily get list of given component and parallelize their processing if needed.
Example: https://github.com/xenko3d/xenko/blob/0669deabfe65a04f80041433420f0ace0ad5ca9a/sources/engine/Xenko.Engine/Engine/Processors/TransformProcessor.cs#L102

What we don’t have yet is cache localized data, and maybe it could be reorganized better to be job friendly.
However, cache localized array is something we already do in the RenderFeature layer, and the idea was to do something similar for the ECS at some point (and rearchitecture some part of it to be more efficient).

I have just added an Epic to cover that: https://github.com/xenko3d/xenko/issues/132


#11

I leave it here in case you are interested, but with Svelto.ECS my main goal is not just performance. I see adopting ECS as a shift of paradigm from Object Oriented Programming which let easily to write modular, testable and maintainable code. The github page links to all my articles in case you want to know more.


#12

Can I use this existing ECS to write my game logic? Is there any editor support for it?


#13

This post was flagged by the community and is temporarily hidden.


#14

This post was flagged by the community and is temporarily hidden.


#15

I have to consider posting video about another engine as either spam or trolling. It even looks like self promotion. So I’ll flag those message (and remove them later)

If you want to discuss ECS you are free to do so, but that way is definitely not a good way to go.