Summary
In this chapter, we learned how the Godot Engine High-Level Network API provides quick and easy solutions to assign the correct “owner” of a game object and sync its state across the network. This ensures that players are playing in a shared environment with an actual human opponent on the other side.
We learned how to check whether the current game instance is the multiplayer authority and make it perform the proper behavior accordingly. We also learned how to change the multiplayer authority of a node hierarchy on the SceneTree
, ensuring that only a given player can make and sync changes regarding this node and its children. To sync the changes, we used MultiplayerSynchronizer
with the Physics mode of Visibility Update to ensure that the physics interactions of the game objects are synced across all network peers.
In the upcoming chapter, we will strengthen our knowledge of online multiplayer games by creating a platformer game that two or more players...