Search Unity

Will Doom Eternal's job queue be achievable using Unity's job system?

Discussion in 'General Discussion' started by IgnisIncendio, May 15, 2020.

  1. IgnisIncendio

    IgnisIncendio

    Joined:
    Aug 16, 2017
    Posts:
    223
    https://hexus.net/tech/news/software/140291-doom-eternal-will-run-1000fps-pc/
    https://www.reddit.com/r/gamedev/comments/fmusg0/doom_eternal_was_writing_as_a_job_queue_rather/
    https://twitter.com/axelgneiting/status/1241487918046347264

    "Fun fact: Doom Eternal does not have a main or render thread. It's all jobs with one worker thread per core."

    Would something like this be achievable with Unity's job system with a bit of work? I'm imagining something like an Update job depending on other jobs, which depend on other jobs... and once the Update job is scheduled, all the game logic is processed in a multithreaded fashion.

    Or am I misunderstanding what it means here?
     
  2. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    Not even gfx job works as it should. To hope that the entire engine becomes async is too much to hope for.

    :)
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    No. You are greatly underestimating the amount of effort that went into Id Tech 7 if you believe it can be done with only a bit of work. It's very clear that they had to completely rewrite the core of their engine to achieve what they did. If you need a comparison you could compare it to Unity's combined work going from the built-in renderer to the SRP and building DOTS.

    https://en.wikipedia.org/wiki/Id_Tech_7
     
    Last edited: May 15, 2020
    IgnisIncendio likes this.
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think Hybrid Renderer 2's final form will have enough throughput and handle going wide, if that's it's goal so I guess it will be off-main-thread.
     
    IgnisIncendio likes this.
  5. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    You cannot schedule jobs from other threads in Unity's job system, so no, not until that limitation is removed.
     
    IgnisIncendio likes this.
  6. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I’d think the biggest issue is that it’s not a fair comparison. Unity is a general purpose engine, where id tech is ids engine for ids games. It’s tuned exactly to run Doom Eternal, and Doom Eternal is written exactly to run on id tech 7. The engine team doesn’t have to worry about fringe cases because they can be certain that the end user is operating under a strict set of guidelines from I’m guessing Hugo Martin and will never put the engine in those situations. Unity is a lego car, ridiculously adaptable, fairly robust, but still legos, where Id tech is a formula one race car, highest performance possible, but drive it anywhere other than a racetrack and there is no telling what it’ll do.
     
    JoNax97, IgnisIncendio and BonneCW like this.
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Unity is moving to enabling most work to happen off the main thread. Bigger picture all you need is for it to not be a bottleneck. It's not actually not that far off if you fully leverage DOTS.

    SRP itself is quite expensive main thread wise, not really sure why it seems like they could have leverage the job system there much better. But really that's the big bottleneck now. Physics can be done in DOTS. Animation before too long (we are using it already and it's not even in the package manager). Navigation can partly be done in DOTS. Rendering with hybrid renderer is now pretty good, persistent data on the gpu and all. Game Logic no reason to have that on the main thread anymore.

    You need to be on the bleeding edge to get at a lot of that. But that's what studios like ID do. They *live* on the bleeding edge. So if you want to make comparisons you have to compare apples to apples, and be out there on the edge also.
     
    IgnisIncendio likes this.