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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Why is Unity making racing netcode example?

Discussion in 'NetCode for ECS' started by Kamyker, Dec 11, 2022.

  1. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,084
    Maybe it's only me but there aren't many popular multiplayer racing games. It doesn't seem like a very common use case.

    Why is Unity making racing example? It would make more sense to update DOTS sample or even the older and more advanced FPS Sample https://github.com/Unity-Technologies/FPSSample
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
    Vehicles don't require skeletal animation.
     
    Opeth001 and Endlesser like this.
  3. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    806
    There are many valid point on using a racing game as a sample as well. It is way more sensitive to lag and packet drop, so it is a good test case.
    Also, stress tests and use more extensively prediction (physics in particular). Nonetheless, it also sufficiently simple to follow and learn from it.

    Making a basic FPS or Third Person Shooter, without complex mechanics, skill tree or other fancy features, is also relative simple. And we will probably provide one in the future.

    Skeletal animation are not a problem either. You can use animation, especially in combination with Playable, and achieve any result you typical do in GameObject land. But you need to architect things a little bit to use GameObject only for visual purpose and sync some data.

    Again, we will showcase something in that area in the future.
     
    Occuros likes this.
  4. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,084
    A proper server auth fps isn't easy to make, for ex. Netcode for Gameobjects still misses a lot of parts like client side prediction, lag compensation and colliders rollback. At least that's what I heard that only transform interpolation is there.
     
  5. philsa-unity

    philsa-unity

    Unity Technologies

    Joined:
    Aug 23, 2022
    Posts:
    113
    You can find a fully-playable DOTS Netcode online FPS sample project here:
    Github
    Docs

    It is server-authoritative and uses client prediction & lag-compensation. I've also made an effort to make the codebase as small & simple as it can be for a project like this, so that it is easier to learn from.

    This was originally made for the Rival - DOTS Character Controller asset on the store, but the asset is now owned by Unity and is free (just trying to explain that this isn't an "official" sample)

     
    Last edited: Dec 13, 2022