1

I am writing a unity game and using Lidgren for networking. when only one client is connected it is running flawlessly, no lag or problems but when more than that are connected, everyone is experiencing extreme lag. since it is an authoritative server inputs take long time to register and update.

can anyone point me to common mistakes or causes?

I have made sure every client can see others but movement takes upto 10 seconds to register any movement, even it's own (there is no client side prediction yet).

I will post code if anyone asks but it is long and is a mess.

Gmodjackass
  • 86
  • 1
  • 6
  • I have to wonder, why are you using Lidgren ? unity has incredible networking built-in which blows away any homebrew stuff. it's a fraction of the effort to just use Unity's own networking. it would be rather as if you were trying (for some reason) to "get some physics library" working in Unity. Why waste weeks of one's life on this? Just a thought! – Fattie Jul 02 '16 at 12:51
  • if you are talking about the tlapi/llapi, the documentation is scarce and in terms of functionality they are almost the same. if you are talking about hlapi, there is no reason to use it unless you are prototyping/not doing authoritative or realtime games. – Gmodjackass Jul 02 '16 at 13:00
  • Sorry, I am totally unfamiliar with those terms. Let me try to explain again. You are doing a Unity project. For networking, you are using a third-party open source library (called Lidgren). You may not be aware that unity has networking ***completely built-in***. Documentation: https://unity3d.com/learn/tutorials/topics/multiplayer-networking What you can do is delete Lidgren from your project, and forget about it. Instead, use Unity's own built-in networking. (Of course - do what you want and enjoy. Just trying to save you weeks/months of pointless work!) – Fattie Jul 02 '16 at 13:03
  • 2
    let me reiterate, there is a low level api, that does pretty much the same as lidgren but is considered not as good. there is also the complete solution, UNET (high level api), which is considered unsuitable for anything but internal testing builds. thanks for trying to help. – Gmodjackass Jul 02 '16 at 13:08
  • Of course, if you prefer some 3rd party package, enjoy. Hope the problem gets fixed! – Fattie Jul 02 '16 at 13:13

0 Answers0