libgdx / ashley

A Java entity system inspired by Ash & Artemis.
Apache License 2.0
875 stars 144 forks source link

Predefined set of components and systems #274

Closed ApmeM closed 4 years ago

ApmeM commented 5 years ago

Hi,

I have a question if there is any officially supported repository with predefined standard set of components and systems?

I think most projects that use Ashley have to reinvent (or copy from other games repository) some basic components (like position, size, rotation, visual and even box2d if necessary) and systems (like render system that I think everybody have).

It would be good to have a reference to such repository from wiki pages.

Or is it already there and I just did not found it?

dwursteisen commented 5 years ago

Not on my knowledge.

I did it, but for myself: https://github.com/dwursteisen/libgdx-addons/blob/master/ashley-addons/src/main/kotlin/com/github/dwursteisen/libgdx/ashley/Components.kt

The render system may depends a lot of the game you're working on (2D game? 3D game? Do you have shaders? …)

mgsx-dev commented 4 years ago

ECS usage is very game specific, some want to separate position from velocity, some want to have them in same component and so on. There is no universal approach, so it wouldn't be a good idea to advice one design over another. You can copy or get inspired by the tests in this repo and various examples over the internet. I'm closing this.