LiteNetLib | Lite reliable UDP library for Mono and .NET | Networking library
kandi X-RAY | LiteNetLib Summary
kandi X-RAY | LiteNetLib Summary
Lite reliable UDP library for .NET Framework 4.7.1, Mono, .NET Core 2.1, .NET Standard 2.0.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LiteNetLib
LiteNetLib Key Features
LiteNetLib Examples and Code Snippets
Community Discussions
Trending Discussions on LiteNetLib
QUESTION
I've searched for quiet some time now around the web for a solution to my problem, and couldn't find any sufficient enough resource to help me.
I'm developing a co-op RPG game in Unity 3D, using the UDP library https://github.com/RevenantX/LiteNetLib , and I managed to do a client-server connection, where I send vector of my player movement (time calculation is not applied- so the server can handle it on its own tick) to the server, and it calculates the new position where the character should be, and afterwards I broadcast to all players the new same vector that I sent to the server so they can also calculate the physics by themselves.
The problem I'm running into is that the movement seems very laggy and sometimes miscalculated.
I'm not sure if its due to my local PlayerController script or due to bad network, or bad design where I should actually send the new absolute position of the client.
I know this is a hard question, I am hoping for some guidelines or expertise of developers who tried to create multiplayer games themselves,
I should also note, that cheating doesn't concern me because it is a coop game and not a competitive one.
Thanks in advance for any help.
Here is a snippet of my local PlayerController code:
...ANSWER
Answered 2019-Nov-28 at 22:07As I mentioned in my comment, people who still need help with this topic might want to view this demo https://github.com/RevenantX/NetGameExample it demonstrates how to create 2D player sync which can easily be applied for 3D, the code belongs to RevenantX, and it relies on a UDP library which he also created for the community.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LiteNetLib
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page