Search Unity

Resolved Is NGO good for an RTS?

Discussion in 'Netcode for GameObjects' started by Aust_, Nov 20, 2022.

?

Can NGO support an RTS?

  1. Yes

    8 vote(s)
    88.9%
  2. No

    1 vote(s)
    11.1%
  3. Other (post)

    0 vote(s)
    0.0%
  1. Aust_

    Aust_

    Joined:
    May 9, 2022
    Posts:
    11
    Hi, I'm currently playing around with using NGO for a variety of different game types, and wanted to make an rts. I'm not sure if NGO could support having a ton of flying bullets or raycasts on the screen.

    Cheers
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,970
    A ton is 1000 kilograms. Does it relate to number of bullets in a 1:1 fashion? ;)

    Let's say you have 1000 bullets and each individual bullet would have a network transform. Let's further assume only the position changes (float x,y,z) which means 12 bytes per bullet (plus overhead but let's ignore that). 12 times 1000 times 50 (network tick rate) gives you 600,000 bytes per second. That's 600 Kb of traffic per second sent from server to clients. Certainly too much.

    However, none of these bullets really need to be networked. You could simplify that to "unit starts/stops shooting in direction X" and server determines flight path and only informs about hits. Each client plays animations of bullets flying independently (not synchronized). That would work.

    This logic applies to all networking solutions by the way.
     
    RikuTheFuffs-U and Aust_ like this.
  3. Aust_

    Aust_

    Joined:
    May 9, 2022
    Posts:
    11
    Thanks a lot!
     
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,513
  5. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Hi, @Aust_ ! As CodeSmile mentioned, you should not think about networking "everything you see on screen". As many other networking frameworks, NGO can't support very large amounts of networked objects sending updates.
    When it comes to picking a Networking framework, ask yourself:

    "what's the absolute minimum/maximum amount of things I need to synchronize over the network that can't be simulated locally?"

    Bullets can be simulated locally, so they should not be included in this count