Search Unity

Should i use ECS for FPS Zombie Game

Discussion in 'Data Oriented Technology Stack' started by Eiseno, Sep 8, 2018.

  1. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    81
    Hello,
    I am working on Zombie VR Co-Op Fps game like Killing Floor, Left 4 Dead etc. Should i use ECS for my game gain a performance ?

    I checked the samples and all of them has so many objects in same time.But in my game 15-30 enemy will be on scene same time.So i couldnt figure should i use or not. Where can i use ECS in FPS game ? AI , Navmesh , Animation ?

    Also is there any big diffrence between Hybrid or Pure ?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,474
    In hybrid apporach you gain little to none performance, as you still interfacing with classic OOP. However, you can create an interface to communicate with Pure ECS, where complex algorithm can be executed with higher performance. Also, in Hybrid ECS, you arranging code in a way, that will be easier in future convert easily to pure ECS when applicable.

    So in the end you can use both Pure and Hybrid ECS along with classic OOP. If you not sure, use ECS for heavy lifting, of demanding algorithms.

    If you want fast prototyping and production, I would focus mainly on classic OOP. Since there is no many assets atm, to support ECS. So chances are, that Navmesh won't work with ECS out of the box. Additionally, you can look into Jobs to gain extra performance with OOP, as well as ECS.

    Rest, what type of game is, is completely up to you.
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,936
    Are you capable of making the FPS with normal Unity and have shipped games? If so, have ECS. If not, then really, no. You will need to be an experienced programmer to cope.

    No IMHO. Unless you're into reinventing a lot of wheels.
     
    Antypodish likes this.
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,474
    Yep, I found myself that having decent to solid understanding in programming, specially C#, benefits a lot. Otherwise, you can get overwhelmed very quick.
     
  5. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    81

    Thanks for help. I developed FPS game before. Before starting second game i just making a research about ECS.I think it doesnt fit to my game currently.
     
  6. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,635
    If your game works normal, if your game works fast and stable, if your game not needed in ECS benefits (thousands of thousands objects and iterations through them, is just one of examples), if your game not need DOD approach code reusability, I think, and it's only my IMO based on my experience in enterprise development, game development on classic OOP approach and game development on ECS, you don't need to refactor your code, or switch to ECS, this don't give you reasonable achievments in opposite of spended time, but I'm really recommend you start to learn this approach, in personal projects, simple samples etc. It's new way of Unity game development, is difficult in beginning, after OOP, but very interesting, variedly and give huge oportunities for create new amazing, unrepeatable things.

    P.S. Just put @Mike-Geig post here :)
    https://twitter.com/mikegeig/status/1017114233941774337