Search Unity

How to do visual level design when extensively using ECS?

Discussion in 'Entity Component System' started by rook-e, Nov 18, 2018.

  1. rook-e

    rook-e

    Joined:
    Nov 11, 2018
    Posts:
    3
    (Disclaimer: I am new to Unity / game programming)

    Every tutorial or sample I see focuses on using the ECS for a player class e.g. moving and rotating. They always use a bootstrap GameObject to integrate the new ECS which handles the spawning of the associated player mesh etc.
    As you spawn your objects programmatically, how does one design a level (terrain, foliage, enemy-positioning etc) through the editor? You only have one bootstrap GameObject which doesnt even have a mesh in the scene viewer? As I see it artists want to place assets visusally, not through code. Am I missing something fundamental here? I just don't see how the ECS code integrates at all with the visual design tools of Unity and a search of this topic didn't turn up anything.

    Regards,
    rook-e
     
    Last edited: Nov 18, 2018
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    Not yet.

    Since you are starting, you probably don't want to go ECS route.
    ECS at current state expects more advance programming knowledge, as it is still work in progress.

    I suggest you first, if you focus on Unity Classic OOP. Mean Object Oriented Programming in Unity.
    If you not sure what I mean, check tutorials in Learn section.
     
  3. rook-e

    rook-e

    Joined:
    Nov 11, 2018
    Posts:
    3
    I see.

    Thats a pity as the classic approach does not scale as well and isn't easily convertible. Starting a new game with a soon-to-be deprecated pattern just doesnt feel right. I do not fear the need of advanced programming knowledge, I just don't see me using a technique in which I can't properly design my levels.

    Thanks anyway, good to have a post about this.
     
  4. Won't be deprecated any time soon. The scene building techniques will be the same. Take a look at this:
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You're making a lot of snap judgements which clearly show you don't have any experience really. I suggest you remain with OOP and use ECS (probably never) when you need to optimise a specific thing.

    It's not all or nothing. OOP won't be removed. It's a companion.
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    @rook-e specially when starting, is easy to misread, or misinterpret content.
    We had number of discussion regarding some features, which will be redundant. This catch eye, which may make you think about depreciation of these. But there are also discussed solutions. Which maybe you haven't yet fully understood yet. Easy done, when having scattered information, trying grab all at once. That is my speculation.

    So I wouldn't worry too much. In the end, ECS is in previews and we should appreciate, we can use it already.

    Is up to you, but maybe keep eye on ECS topics for now and come back when you want to try, or feel ready. While keep playing with Object Oriented programming in meantime. Just suggestion.
     
  7. rook-e

    rook-e

    Joined:
    Nov 11, 2018
    Posts:
    3
    @LurkingNinjaDev Thx for the Video

    @hippocoder It seems I was too vague in my explanation: I dont think the whole GameObject-OOP part of Unity is going to be deprecated, I just thought that the ECS part of the old (current) style will sooner or later be taken over by the ECS system, making that specific part of the old (current) style deprecated in the process as there are no real benefits to still use it when the ECS is final. I know this will not happen in the immediate future. Sorry for sounding cocky, I will try to explain myself better in the future :)

    @Antypodish Can you point me to a sample which utilizes the ECS while still using GameObjects for the level design? And as for your other points (besides the deprecation part which I have already covered above): Can you point me to some of those solutions, I am a bit lost amidst the myriad threads/tutorials which are sometimes heavely criticized for beeing "bad style".

    Thanks for the responses, will dig deeper.
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    There is github repository, which holds samples
    TwoStickShooter is one example of using Classic OOP, Hybrid and Pure ECS. Hybrid is one where you got mix of Game Object with ECS.

    As hippo said, there is no depreciation in OOP. Evolving ECS may have some features, which may become replaced.

    Very unusual way to approach the problem. If anything you should search for right solutions.
    There is always many ways to make same thing. All may be equally right.
    I don't recall any topic matching your request.

    To get unlost, you will only get grasp what is going on, if you start practicing.
    By just reading, you will never get full picture.