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

What's next aka Entitas 2.0 #905

Closed
sschmid opened this issue Jun 21, 2019 · 26 comments
Closed

What's next aka Entitas 2.0 #905

sschmid opened this issue Jun 21, 2019 · 26 comments

Comments

@sschmid
Copy link
Owner

sschmid commented Jun 21, 2019

What's next

Some of you might have seen it in the Entitas gitter chat already, but to be more transparent I will share here again.

I'm currently modernizing the DesperateDevs libraries that are used by Entitas and Jenny. This will result in some breaking changes, but hopefully for the good. This is my plan:

  • update the complete codebase to the latest .Net 4.x and C# 7.x version
  • use the new csproj layout
  • updating the complete codebase to follow the official Microsoft C# naming conventions
  • leverage the power of async await and multithreading
  • add even more unit test
  • add a benchmark project to ensure best performance

I've already had a lot of great moments refactoring and updating the code. Generally the result was less code and better performance, e.g. the Jenny code generator is now multithread is super fast.

Once everything is updated I will also modernize Entitas following the same plan. This means there will be breaking changes in the generated code because of the Microsoft C# naming conventions. I will also drop support for older .Net like 3.5 and focus on upcoming versions.
With all the new internal changes and breaking changes I will bump the version to 2.0

Plans for Entitas

The following is subject to change:
I plan to drop support for the reflection based code generator and doubling down on roslyn one because it's more powerful. I will explore the idea of including it to the GitHub version, so everyone can enjoy Jenny right from the start. I also have a personal set of custom code generator for Unity like Asset management, localization, configuration and more and plan to include them by default or create a separate Jenny-Plugins repo for that, so everyone can share their set of custom generators.
That means the GitHub version will probably evolve to have the same feature set as the Asset Store version. The only difference will probably be that with the GitHub version there will be a limit on how much code you can generate but you can unlock unlimited code genration with the Asset Store invoice.

@JesseTG
Copy link

JesseTG commented Jun 21, 2019

Ladies and gentlemen, this is a good time to start picking a bottle of champagne for the occasion.

What's your approximate timeline, if you have one? End of the summer? Fall? Christmas?

@poettlr
Copy link

poettlr commented Jul 8, 2019

The only difference will probably be that with the GitHub version there will be a limit on how much code you can generate but you can unlock unlimited code generation with the Asset Store invoice.

I like your plans for going forward with Entitas. I also understand that you want to be able to monetize the project, but I really think that limiting code generation is a bad idea and it will push people away to different solutions.

@buihuuloc
Copy link

Is there any update for the ETA?

@sschmid
Copy link
Owner Author

sschmid commented Jul 10, 2019

@buihuuloc Not 100% sure yet, I'm currently reorganising my schedules to be able to regularly block time for Entitas development. 2 - 4 months might be realistic

@JesseTG
Copy link

JesseTG commented Jul 14, 2019

Sounds like a good timeline for a Halloween sale. Do they celebrate that in Europe?

I like your plans for going forward with Entitas. I also understand that you want to be able to monetize the project, but I really think that limiting code generation is a bad idea and it will push people away to different solutions.

Not if you think of it as a free trial.

@chiuan
Copy link

chiuan commented Jul 14, 2019

sounds good!

@jeffcampbellmakesgames
Copy link

Hello, bumping this to see if there have been any updates on Entitas 2.0? I like the Entitas API and accompanying code generation, but this project seems inactive although very stable and functional. I wouldn't mind forking it and building on it myself, but the code generation source isn't present and would take a significant amount of time to replace. Thanks for your time!

@ianeinman
Copy link

This all sounds good and I look forward to it.

If by "Microsoft C# naming conventions" you mean making it so member variables start with a capital letter (MyComponent instead of myComponent) I'm glad to hear that. But you could just make that a setting in the editor to make it easier for existing users to migrate.

leverage the power of async await and multithreading

Will this also give us the ability to easily use PLINQ (Parallel.ForEach etc.)? That would be good.

@jkolobok
Copy link

jkolobok commented Apr 3, 2020

Any updates?

@JesseTG
Copy link

JesseTG commented Apr 3, 2020

If Entitas isn't updated before I finish my current project, I will use something else for my next one.

@sschmid
Copy link
Owner Author

sschmid commented Apr 25, 2020

I shifted a few things around and should be able to have time to work on Entitas again in approx 4 weeks! Really looking forward!

@sschmid
Copy link
Owner Author

sschmid commented Apr 25, 2020

Change of plans to be more active and commit more regularly:

I will go back to smaller incremental releases, which will make it simpler to actually do changes, make sure there's always a version that builds and also makes it easier for everyone to update.

More background info:
One of the reasons that prevented me from releasing the last months was an all-or-nothing approach. I wanted to do too much at the same time which prevented me from being able to build and forced me to complete everything to 100%. This is obviously not ideal. I did spend the time and got a lot done, but since I'm not 100% done, I cannot release. Combine this with being highly involved in my main job, this led to no apparent progress.

@optimisez
Copy link

optimisez commented Apr 26, 2020

Change of plans to be more active and commit more regularly:

I will go back to smaller incremental releases, which will make it simpler to actually do changes, make sure there's always a version that builds and also makes it easier for everyone to update.

More background info:
One of the reasons that prevented me from releasing the last months was an all-or-nothing approach. I wanted to do too much at the same time which prevented me from being able to build and forced me to complete everything to 100%. This is obviously not ideal. I did spend the time and got a lot done, but since I'm not 100% done, I cannot release. Combine this with being highly involved in my main job, this led to no apparent progress.

Ya. Incremental release is better. Btw can you fix the error when selecting game object that has Debug System Behavior? I'm using Unity 2019.3.11. Another question. Do you have any plan to rewrite Entitas Unity debug inspector to UI Element to further improve the performance?

image

@sschmid
Copy link
Owner Author

sschmid commented May 7, 2020

My new structure shows first positive effects. I updated DesperateDevs and Entitas so I can build again and enable incremental changes again.
Here's an unsorted list of things I'd like to do next:

  • Proper support for Namespaces
  • Migrating to sdk-style csproj format
  • Upgrade to NetStandard 2.0
  • Upgrade code to use latest C# features
  • Rewrite Roslyn support
  • Start researching Roslyn features like rename refactor for components that will rename methods too
  • Update codebase to use default Microsoft Coding Conventions
  • NuGet packages
  • Support for Unity Package Manager
  • Multithreaded Jenny (Code Generator)
  • Going through the issues to see what you guys need and suggest
  • Docker Support
  • Use text files for the code generator
  • Create a sample code generator project, so everyone can get into creating and sharing their own plugins

Since I changed my mind to slowly introduce features one by one and try to provide automatic upgrade assistants, I will not call this Entitas 2.0 anymore. I think that's a good thing, because I'd like to enable people to be able to upgrade. My initial idea of Entitas 2.0 contained so many breaking changes that it was hard to upgrade, hence the version bump. I don't think that's a good strategy.

@BenjaBobs
Copy link

Maybe the new Source Generators can be of use/inspiration.

@JesseTG
Copy link

JesseTG commented May 8, 2020

@BenjaBobs Looking at that, I totally agree. However, I think it's too early to adopt them right now; since Entitas and Jenny are meant to be core infrastructure, in my mind it's critical that any of their dependencies are production-ready and easily available. Stick a pin in that and check up on them in a year.

@JesseTG
Copy link

JesseTG commented Nov 2, 2020

So how's this going?

@sschmid
Copy link
Owner Author

sschmid commented Nov 3, 2020

Hi, some updates, as I had a short amount of time to continue working it, and I'm currently pushing to get some time during my work for this.

  • Proper support for Namespaces
  • Support for Unity Package Manager / asmdefs

Those 2 will be my next focus as they will also become important for the way I create games.
I'd like to be able to ship game features as packages with namespaces.

Current problems that are preventing this:

  1. Incomplete and strange namespaces support
    Proposed solution: update namespace support
    Task: rework the code generator templates to support namespaces
    Benefit: use namespaces as they are inteded to be used. Write more modular code

  2. code generator uses partial class which forces us to have one assembly
    Proposed solution: use C# extensions instead
    Task: rework the code generator templates and go from partial classes towards C# extensions
    Benefit: features can be bundled in dlls or packages and are self contained. A solution can have multiple projects that use Entitas. Generated code is already contained in the bundle. This will probably enable modding games with Entitas.

  3. generated code contains hardcoded component indices
    Proposed solution: use reflection during initialization to assign component indices
    Task: remove the generated ComponentsLookup classes in favour of dynamic component index evaluation
    Benefit: new features could be added by simply dropping another package / dll into your codebase.
    Should probably enable to load dlls from a specific destination to enable modding.

There might be followup tasks like VisualDebuging adjustments that I will tackle once I encounter them + most likely some unknown unknowns.
Moving from partial classes to C# extensions will require to migrate existing code bases.
I plan to provide at least a simple migration assist like in the past to update most of the code. A more robust solution would be to actually use roslyn to analyse and update the code. I will read into this, but I don't have any prior knowledge other than parsing the codebase for Entitas related things. No guarantees yet, but would be really nice!! :)

@FNGgames
Copy link

FNGgames commented Nov 4, 2020

Thanks for the update Simon

@c0ffeeartc
Copy link

c0ffeeartc commented Nov 4, 2020

  1. generated code contains hardcoded component indices

Please consider static initialisers also if possible.
Currently totalComponents is required to be known before any context gets created. It forces order of initialisation – to get all types from plugins and only then create any Context. This could be refactored to allow different initialisation order or left as is.

@HitCache
Copy link

Hi just wanted to check in where you may be at with this please:

I will explore the idea of including it to the GitHub version, so everyone can enjoy Jenny right from the start.

:)

@sschmid
Copy link
Owner Author

sschmid commented Jan 21, 2021

Hi! great timing :) I will announce sth probably by the end of next week.
If all turns out well, it's gonna happen very soon!
More info (hopefully) next week!

@buihuuloc
Copy link

Awesome. Can't wait to see that

@buihuuloc
Copy link

Do we have any updates?

@sschmid
Copy link
Owner Author

sschmid commented Feb 3, 2021

Hi, yes, we're currently figuring out the details, but Entitas development capacities will be increased and there will be a change to the Unity Asset Store version to make it more accessible for more people. According to current plans I will do a more detailed announcement on Feb 15th and I'm really looking forward to share more great news soon

@sschmid sschmid added this to Entitas Sep 6, 2022
@sschmid
Copy link
Owner Author

sschmid commented Sep 7, 2022

Update:

Entitas development is back on track!

Will close this issue and will update you using GitHub Discussions and Entitas Discord

Happy coding :)

@sschmid sschmid closed this as completed Sep 7, 2022
@sschmid sschmid moved this to Done in Entitas Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests