Dedicated servers – Addressing the Requirements of Immersive Experiences with AWS
A subtype of the Linux, macOS, and Windows build targets is called a dedicated server. The term dedicated refers to the fact that they serve no other function than to host common components of a shared game – before the advent of this model, one player out of a group would have to host these shared elements on their PC while simultaneously using that same hardware to render their view of the game world. This wasn’t ideal as all players had to share the game host’s bandwidth, which was typically residential – and worse, the hosting player had an overwhelming performance advantage in PvP games due to their 0 ms RTT.
In addition to maintaining the state of the virtual world, they listen for (and respond to) network requests coming in from many user devices using Unity’s Netcode for GameObjects (NGO) library. This library greatly simplifies the implementation of a game server as it abstracts away the need to worry about things such as low-level networking protocols.
Keep in mind that because no rendering is done on a dedicated server, they do not benefit from GPUs. Also, remember that they are natural integration points for other AWS services. For example, you might want to use S3 to host common game assets or DynamoDB to maintain a global state table that spans hundreds of game servers around the world.
Game clients
Game clients are where the player I/O and video rendering happen. That is why, in this model, what dictates game performance the most is the GPU each player has on their setup:
Figure 11.8 – Unity-based shared virtual world using local rendering
Notice that the two players in the preceding diagram are using different builds of the game client. One is using a Windows desktop, while the other is using a headset with its own local Android environment. This is possible because all Unity builds are ultimately .NET. Thus, there is no need for the dedicated server to match the operating system of the game clients that connect to it – or for the game clients to match each other. It is possible to have a Linux-based game server hosting a virtual world for Windows, Android, macOS, and PlayStation clients.
The TCP port of 1935 shown in the preceding diagram is arbitrarily chosen at build time and has no special significance other than to group players using an abstraction that network devices are aware of.