
This is the LiteNetLib , grad the Source Code (.zip) of the Latest Release
https://github.com/RevenantX/LiteNetLib/releases
You will also need to install .NET core package in Visual Studio Installer.
The projects are attached here.
Download the LiteNetLib source code and install it with the Visual Studio Installer, then modify the .Net Core workload to build and run .Net Core projects.
Create a unique 2D Unity project for the client and server. Copy and paste folders, import assets and sprites, and configure the necessary scripts for the LiteNetLib networking setup.
Create a simple play scene in Unity and implement a player movement script to enable horizontal movement, setting up the scene with prefabs.
Write the client networking script to connect to the server, implement the required functions, initialize data, and save the scene before moving on to the server setup.
Develop and test a server script and the first client connection in a Unity LiteNetLib and .NET Core multiplayer setup, including start, event polling, and shutdown.
Explore sending and receiving player positions in a Unity LiteNetLib setup by building a 12-byte position packet, transmitting x and y floats to the server, and updating a positions dictionary.
Create and move network players on screen by wiring scripts and namespaces in Unity, using LiteNetLib multiplayer with a .NET Core server.
Improve network efficiency in Unity LiteNetLib multiplayer basics by sending data only when movement occurs, and optimize data handling with checks and dictionaries for reliable position updates.
This all may sound hard and difficult but its rather easy once you know how it works.
Just follow me along on this journey to write a basic multiplayer game!
We will write a server that will be a seperate .NET core application which is also using C# , and we will use the same UDP library as for Unity.
The server runs independently from any Unity programs.
Our client will be written in Unity and C# and will contain the player stuff.
Both will be using the same library "LiteNetLib" which is a very competent library for UDP (and also Reliable UDP)
At the end we will have a way to send and receive data and we will be able to join the server with our game clients and see each client on the game and move around and see the movements.