There have been quite a few people coming to the Entitas gitter chatroom in search of examples on how to use entitas, not only in small projects but large ones as well with different requirements such as navmesh, physics, state handling (e.g. menu state, game state switching etc and game events), buff/de-buff systems etc.
We have the Entitas cookbook project on @mzaks repo to define and explain various entitas patterns and ECS techniques we could use but we don't have any practical examples of it. Rather than constantly reinventing the wheel for others I propose we list example projects that we want and write them here so that the community can pick out an example, implement it and post it. Examples which do not couple to unity and are in a separate assembly would also be beneficial as well to demonstrate different setups. (@sschmid not sure whether a pull request is a appropriate for this or simply making a wiki page to other repos).
Specific descriptions with as little words as possible for the desired example project is preferable over "example using physics/navmesh" so that we can build up a library of examples for variying levels of complexity. Here is an example:
"Entitas version of unity tanks which uses physics and navmesh" - such an example may use physics and colliders for tank projectiles and navmesh for tank AI.
when you have selected an example, please let us know below and I will update this issue.
I'm working on rewriting my RTS project using Entitas and I'm willing to share the basic functionality when I'm done with it.
That includes:
1) Universal mouse and keyboard input processing using keymap config.
2) Click and drag selection of units/structures in the scene
3) Basic 'right-click' navigation for units using, probably, A* Pathfinding Project (thanks to @StormRene for suggesting it, btw)
4) Basic resource system for construction with a UI panel.
5) Possibly, something else.
@ShadeSlider
Did your project make for multiplayers? I'm working on a similar project using Entitas, I found some problem to update agent properties with ECS way.
group<entity> allAgents = context.GetGroup<Matcher.AllOf(Matcher.Id, Matcher.Positon)>
foreach(var agent in allAgents.GetEntities()){
if(agent.Id.val == id){
....
}
}
but traversing the array is expensive. How do you solve such things, to quickly find some entity with ID or some key component else.
@wallpap3r you can use a custom entity index to get entites based on id which contains a position component. Please refer to https://github.com/sschmid/Entitas-CSharp/issues/351 for examples.
@T2RKUS It's exactly what I what, I was just try to ask how the [EntityIndex] attribute is used then It's here.
Thanks you for the tutorial.
Is this topic still alive?
I've uploaded the RTS template I promised: https://github.com/ShadeSlider/Entitas-RTS-Template
Updated list.
@ShadeSlider I've added your RTS Template to the examples page. Thanks for sharing!
Update: I've started on Entitas Tanks Example.
Most helpful comment
Is this topic still alive?
I've uploaded the RTS template I promised: https://github.com/ShadeSlider/Entitas-RTS-Template