UltraStar-Deluxe / Play

Free and open source singing game with song editor for desktop, mobile, and smart TV

Home Page:https://ultrastar-play.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hazel-Networking for UDP broadcast

achimmihca opened this issue · comments

Currently, USPlay uses a custom implementation to send a UDP broadcast. This is done to connect Companion App and main game automatically in the local area network.

While searching open source tools for Unity, I found Hazel-Networking, which seems to include a more thought-out UPnP.
For example, lib has a method to configure port forwarding.

Might be worth to check it out, maybe this is a better solution than the current basic UDP broadcast.

For the private Steam release of Melody Mania, I changed the transport to UDP, which has better latency for real-time mic data exchange.

Therefor, I changed the implementation to use LiteNetLib, which is small, C# only, easy to setup, still maintained, and allows switching between different delivery methods (reliable, ordered, unreliable, etc.).

The basics are still the same (UDP broadcast to auto connect), but UDP has better latency for our use case, the library is more flexible and better tested than my previous custom implementation (of course).

There are a bunch of networking libs for Unity (LiteNetLib, Lidgren, Ruffle, Hazel-Networking, etc.). After some evaluation, I decided for LiteNetLib.

Thus, Hazel-Networking is not required anymore such that I will close this issue.