Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entitas Project Structure Update and Changes #508

Closed
sschmid opened this issue Dec 3, 2017 · 4 comments
Closed

Entitas Project Structure Update and Changes #508

sschmid opened this issue Dec 3, 2017 · 4 comments
Assignees

Comments

@sschmid
Copy link
Owner

sschmid commented Dec 3, 2017

Hi everyone,

here's an update on what I'm currently working on:

tl;dr;

  • Spring cleaning
  • Reusing and extracting code
  • Reducing the complexity of the project

I will extract and generalize all reusable modules of the Entitas project that don't actually have dependencies to Entitas (e.g the Code Generator, Networking, Unity Integration, Serialization and more)

Current Project Structure

The Entitas.sln solution contains all projects that make up Entitas. The solution is well split up into separate sub projects with their own namespace, e.g. Entitas.CodeGeneration or Entitas.VisualDebugging. The idea is that you have a tiny ECS core and everything else is considered an Addon or Plugin. This is why you can easily use Entitas without Unity, without Visual Debugging or without the Code Generator.

entitas-addons

entitas-alladdons

The structure is pretty straight forward:

  • Entitas contains the core which is basically the complete ECS
  • Addons contain functionality built on top of the Entitas core, e.g. Code Generation and Visual Debugging

As it turns out, some Addons don't actually have anything to do with Entitas and don't really have a dependency to it. To name a few:

The Code Generator:

Over time the code generator became a very flexible and modular project itself following the same concept as the Entitas solution itself: having a tiny core and everything else is a plugin. Actually, the code generator can be used completely standalone and doesn't know anything about Entitas. The Entitas Code Generator Plugins actually drive the code generator. This means you can use the code generator in multiple different scenarios even in projects without Entitas. It's all about the plugins. The code generator can easily be extracted to its own standalone project.

Unity integration

Entitas comes with great Unity integration and a few things like the Preference window or the EntitasLayout actually don't built on top of Entitas and don't have any real dependencies to it. Those parts of the code base can be easily extraced, too.

Others

What I meantioned above also applies to many other parts of the code like serialization (Preferences and Propeties), Networking (TCP Socket), Logging and others.

Benefits

I personally see benefits in reusing lot of the code in different scenarios (even projects without Entitas, but who does this anyway, right? :)). It will reduce the overall complexity of the Entitas project. The extracted projects can be easily tested on different platforms without lots of overhead. This is what I already started with TCPezy, where I extracted the Networking part to fully support it on windows to address #489. Overall, with the increased focus that is achieved by having standalone projects I expect the quality to raise, too. This is generally the case when you have reusable code that is battle tested in multiple different scenarios.

Entitas should have a strong focus on ECS, software architecture, scalability, testability, performance and should be fun to use. I want to emphazise this focus, by removing the noise.

Desperate Devs

What's that? You might have seen my YouTube Tutorial Video on "Entitas - What's new 0.45.1"
https://www.youtube.com/channel/UC2q7q7tcrwWHu5GSGyt_JEQ

I will post more Videos on the Desperate Devs YouTube channel, so feel free to subscribe, if you don't want to miss any future Videos. I talked to Unity and I was allowed to re-upload the videos from the Unite talks on this channel. So like and watch them again ;)

You will see more and more code from the "DesperateDevs" namespace in the following releases of Entitas. This is the namespace that all the extracted code will have. So keep an eye out for it

desperate-devs

@sschmid
Copy link
Owner Author

sschmid commented Dec 3, 2017

@optimisez
Copy link

Awesome.

@roygear
Copy link
Contributor

roygear commented Dec 4, 2017

Nice!

@sschmid
Copy link
Owner Author

sschmid commented Dec 8, 2017

Wow, that was a lot of work, but I think it was worth it!

Less is more! Sometimes you have to work hard to reduce the complexity.

entitas-desperatedevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants