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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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

    4 vote(s)
    80.0%
  2. No

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

    0 vote(s)
    0.0%
  1. Aust_

    Aust_

    Joined:
    May 9, 2022
    Posts:
    7
    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:
    1,620
    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:
    7
    Thanks a lot!
     
  4. Lo-renzo

    Lo-renzo

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

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    105
    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