The broad coverage of 4G networks and the introduction of 5G networks result in
new opportunities for multiplayer mobile games. Unity, the most-used game engine
for mobile applications, offers multiple solutions to develop a server application inside
the engine. However, this thesis evaluates the benefits of developing a separate .NET
server application for a Unity client. Three different server targets are used to compare
operating systems, networking libraries, and serialization libraries. In addition,
a game was developed alongside the benchmarks to test security aspects and run the
libraries in a real-world environment.
The combination of a .NET server with the mobile network infrastructure of Europe
allows for round-trip times of less than 100 milliseconds while using an inexpensive
server solution. Manual serialization yielded the best performance results while
keeping packet size at a minimum and was especially used for packets that are frequently
sent. For messages that can change or are not sent as often, libraries like
MessagePack-CSharp or Protocol Buffers are interesting alternatives. In the networking
benchmarks, ENet performed best and had the most promising metrics for
weaker hardware setups. For all tests, the User Datagram Protocol (UDP) socket
performance was better on Linux than on Windows.