Giter VIP home page Giter VIP logo

codesmile-0000011110110111 / unitynetcodebitesizeexamples Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 77.59 MB

My own BiteSize examples covering all possible/relevant workflow combinations of a given Netcode aspect. Currently built to support Netcode for GameObjects but may be ported to other networking solutions in the future. Feel free to fork, do it yourself, and send me a pull request.

License: MIT License

C# 68.96% HTML 1.24% ShaderLab 25.85% HLSL 3.94%

unitynetcodebitesizeexamples's Introduction

Unity Netcode BiteSize Examples

With this project I want to learn all about Netcode in detail before I begin applying it to a real project.

My Netcode BiteSize examples cover all possible/relevant workflow combinations of a specific Netcode aspect (eg connection, scenes, spawning). They aim to be minimal but very helpful, technically complete solutions.

Made with Unity 2021.3 and Netcode for GameObjects 1.0. I may port the examples to other networking solutions in the future, to be able to compare them. In the meantime, feel free to fork and port it yourself, then send me a pull request if you wish.

Status

The following examples are complete:

  • QuickStart Menu
    • host or join network game using a wizard menu
    • show host's public and local IP (to relay this info to clients)
    • supports domain/host name entry (eg dynamic DNS address)
    • spawns a physics-enabled player prefab (not controllable)
    • player physics simulation disabled for all clients (except host)
  • ConnectionManagement
    • Ingame menu for server and client
    • Server can shutdown, kick one or all clients
    • Client can disconnect
    • Disconnect/Shutdown will correctly bring up QuickStart menu
    • All combinations of shutdown/disconnect, then host/join again cause no issues
  • SceneManagement
    • Introduces a loader scene, to prevent duplicate NetworkManager instances
    • Upon hosting/joining a game, a scene will be loaded
    • Server menu to load additive scenes (unloads excess scenes automatically)
    • Server can also switch to another scene (unloads additive scenes)
    • All scene events are synchronized with clients, including late joining clients
    • Server logs all OnSceneEvent callbacks to the console
    • Server adding/loading scenes too quickly (previous scene didn't finish loading) logged as warnings
    • Clients can join at any time and should get everything synchronized
    • Additive scenes contain physics-enabled networked objects, only simulated on server-side

unitynetcodebitesizeexamples's People

Contributors

codesmile-0000011110110111 avatar

Stargazers

Malyshev Sergey avatar Lucas Nestor avatar  avatar mika avatar

Watchers

 avatar

unitynetcodebitesizeexamples's Issues

References to local hard drive for packages

You have several references to packages on your local hard drive.

"com.codesmile.core": "file:C:/Users/Eedee F/UnityProjects/_MyPackages/CodeSmile-Package",
"com.codesmile.metal": "file:C:/Users/Eedee F/UnityProjects/_MyPackages/CodeSmile-METAL",
"com.unity.netcode.gameobjects": "file:C:/Users/Eedee F/UnityProjects/_Netcode/NGO/com.unity.netcode.gameobjects",

I was able to replace the netcode one with a version 1.0.2, but the others I am not sure about. I tried version 0.1.0 for the core, but it couldn't find that. I have not idea what to use for the metal one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.