Multiplayer and Networking


ParaSpace is an online multiplayer interaction platform. Many other players will join and share each World that you publish. Therefore, to create a richer World experience, you must deal with data exchange and synchronization among huge numbers of players.

Shared Mod Model

ParaSpace uses Shared Mod Model to synchronize networks. Unlike the Client-Server Model, the Shared Mod Model requires each client to update the logic of certain network objects and synchronize it to other players through the server.

In ParaSpace, the key concepts related to networking include network object, ownership, synchronization variable, and message exchange.

A network object is an object that needs to be synchronized and that exists on all client servers.
The Ownership of a network object specifies which player can change the properties of that network object and send it to other players.
A synchronization variable is a storage container that automatically synchronizes data between players, such as a number, a location, or a text.
Message exchange indicates that different players send messages to each other. For example, if player A tells other players that he or she is dancing, then those other players can see him or her dancing.

Use the above concepts to describe the following game scene: On the soccer field, a soccer ball is dribbled by a player and then passed among different players. Finally, one of the players kicks the soccer ball into the goal and wins the game.
In this case, the soccer ball is a network object, while the player who dribbles the soccer ball is the owner who can store and update the location of the soccer ball using a synchronization variable.
The player who scores the winning goal informs the other players of the goal via message exchange and ends the game.

This chapter describes the network model and concepts of ParaSpace in a systematic way.