Git Product home page Git Product logo

Comments (4)

sschmid avatar sschmid commented on April 29, 2024

Awesome, I'll take a look at the code when I find some time!
I added it to the wiki
Games and Examples

from entitas.

sschmid avatar sschmid commented on April 29, 2024

I just looked at the code. You grouped the components and systems by feature and you have separate folders for MonoBehaviours and entitas sources - that's how I like it :) Looks pretty good! Great job! I'm happy to have it in the wiki now so others can learn from it!

from entitas.

JamesMcMahon avatar JamesMcMahon commented on April 29, 2024

Yeah I followed the other examples and it seemed like a good way to do it. I've seen a lot of ECS projects use just a single directory for systems and then a separate directory for components and I was initially going to do that but grouping by features seemed like a better granularity for organization.

Separating in the MonoBehaviors from the Entitas just made sense. I wish I could have gotten rid of all using UnityEngine; dependencies in the Entitas sources, but that involved duplicating code and was impossible for the GameObject view stuff. It would be great if you guys had a few examples with unit tests because I'd love to see how that works with Entitas.

In the case of this game it was really easy to encapsulate all the simulation logic in Entitas. I'd like to know what to do when I need to use Unity features beyond a view capacity, such as collisions, pathfinding, etc. I have a rough idea but didn't get to experiment with it much in this project.

One thing I'd like to see in the Entitas project is more documentation around the various classes and interfaces. I think I was able to figure out everything but the startup cost was larger if there had just been some class docs.

In general though using Entitas was a blast, I think I am going to adopt it for my prototyping going forward. It was so easy to add new features once I got everything up and running. Also the Unity editor widgets you built out are really helpful and impressive.

from entitas.

sschmid avatar sschmid commented on April 29, 2024

Grouping classes by feature is great for organization and prevents unused files in the project. I try to put not only components and systems in the same folder, but also extensions, utils, enums, unit test, etc. When you want to remove a feature you simply delete the folder and the feature incl. unit tests is gone.

@mzaks and me will eventually start on a small series where we build a game from scratch including unit tests, level design and maybe physics. I hope that helps answering most questions.

Currently the lack of documentation is intentional. I'm not a very big fan of documenting code because I think good code should reveal its intend by just reading the class and method names. Maybe I didn't do a great job then ;) But I agree, it might help to get started. I'll think about to add some documentation at some selected places ;)

I'm glad you had fun using Entitas. You did a great job! :)

from entitas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.