Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Using ECS now

Discussion in 'Entity Component System' started by Lyuke, Jun 8, 2018.

  1. Lyuke

    Lyuke

    Joined:
    Oct 23, 2012
    Posts:
    11
    Hello everyone,
    i hope i'm posting this in the right section... I'm currently coming back to Unity after a long break and i'm really interested in trying and using ECS.

    I'm curious if i could already start using it seriously for prototyping and then, in the future, release a game with this new way of coding. Do you think there will be big changes in the future that would cause me to rewrite a lot of code or most of what we have now will be the same?

    Thanks in advance!
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Moved this to the correct forum. I think you can use it now, and there will be changes that aren't too tricky to fix. But it is a WIP, so just ask away if you have any problems.
     
  3. Lyuke

    Lyuke

    Joined:
    Oct 23, 2012
    Posts:
    11
    Thanks for moving it! :D
    Yes i'm aware it's WIP but i think i will love this new way of coding, since it's similar as concept at how i work in web programming. Thanks for the answer, if i have any problem i will for sure come back here :)
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I love it too, although I'm still wrapping my head around some bits. I should learn to ask for help more often.
     
  5. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,554
    They did warn us (here https://github.com/Unity-Technologi...b/master/Documentation/index.md#status-of-ecs) "We have implemented various approaches (foreach vs arrays, injection vs API). Right now we expose all possible ways of doing it, so that users can give us feedback on which one they like by actually trying them. Later on we will decide on the best way and delete all others." So be prepared for that.

    But I don't think the time to adjust the ECS code if that happens can compare to the time to align my game to ECS's concept in the first place. When I heard about ECS and the commitment Unity team made on stage that it will be a new default that is performant, I simply cannot code in the old way in fear of having to rewrite it at some point in the future. Or if it is to be unavoidably in an old way, I better have to know ECS throughout first before start coding in the old way so that it has some alignment with ECS and is easy to transfer to. (For example, I now avoid class like a plague since I know it could not go in the job. Any bundle of data I became paranoid and have to make sure they are all blittable and not a class. Anywhere I use List now I switched to NativeList. etc.)
     
  6. Lyuke

    Lyuke

    Joined:
    Oct 23, 2012
    Posts:
    11
    It's been really a long time since i last worked on Unity, i would start almost from scratch. Do you suggest i should watch tutorials / courses that use the current system and then come back later to try the ECS or i could with a lot of strong will and hard study (the documentation), start immideatly with ECS?

    I'm a web programmer so i'm not lost with programming basic, just a little lost with c# since i studyed it too much time ago to remember all the things. I'm a little confused with some things written in the "tutorial" in github
     
  7. Afonso-Lage

    Afonso-Lage

    Joined:
    Jul 8, 2012
    Posts:
    70
    You should get back to Unity Monobehaviour first and after get used again, switch to ECS. The way it is now is hard to newcomers (or 'newcomebackers'). I'm focusing in learning ECS just to try to see another way of solving problems that I was able to solve with OOP or with FP. Adding Data-Focused approach in the menu of how to solve common problems is always good to have.

    Also I like to test bleding edge things, so I'm very excited with ECS,Job System and Brust Compiler combo even if I don't plan to develop some game anytime soon.
     
    Lyuke likes this.
  8. Lyuke

    Lyuke

    Joined:
    Oct 23, 2012
    Posts:
    11
    Thanks for the reply, guess is time to go and refresh my memory haha :D
     
  9. ryancole

    ryancole

    Joined:
    Oct 8, 2017
    Posts:
    18
    I had heard that ECS does not support rigid body yet? Wouldn't that make the only option for the time being to use the hybrid approach?
     
  10. Afonso-Lage

    Afonso-Lage

    Joined:
    Jul 8, 2012
    Posts:
    70
    Not really. You can make a game that doesn't need rigid body or you can try to make your own physics system, like @PhilSA does.
     
  11. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    For now Im watching as much videos as I can to try get concepts clear and keep coding the old way. I leave talented coders to mess with the system and watch their tuts and thoughts on it. Its a bit overwelming for me already. I trust that by the date of release will be enough tuts for me fully focusing on this and mastering it in a reasoneable time period.