Any tutorials for entity component system using Cocos Creator? :)

Hi i’ve been trying to implement ecs in my game.
but i have a confusion about components…
some say that components are just data containers and should not have any methods in it.
but some say containers have methods in them… like setting a rotation, setting position, blah blah…

and another thing can we used node as may base game entity? specifically how do i do that?

but all in all i want a good overview of ecs using cocos creator… thanks guys… :smiley:

Have you looked at the sample projects?

yes, but its not ecs… most of them are state machine…
i just want to know if i am doing it right, i google ecs and able to make my own implementation. but im not confident that i am doing it right hehe. thanks

Hi eydamson, in Creator, Component have methods in them, because we merged Component and System, like:


cc.Node is Entity but also contains many data such as position, parent…etc.

1 Like