Introduction to multiplayer basics
You may have heard the term multiplayer a lot while gaming, but what does it mean for game developers? Multiplayer, in reality, is just a set of instructions sent through the network (internet or local area network) between the server and its connected clients to give players the illusion of a shared world.
For this to work, the server needs to be able to talk to clients, but also the other way around (client to server). This is because clients are typically the ones that affect the game world, so they need a way to be able to inform the server of their intentions while playing the game.
An example of this back and forth communication between the server and a client is when a player tries to fire a weapon during a game. Have a look at the following diagram, which shows a client-server interaction:
Figure 16.1 – Client-server interaction when firing a weapon
Let’s understand the preceding diagram:
-
...