Bootcamp Multiplayer Demo
The Demo is available for download at the Unity Asset Store.
Thanks for coding the demo and for writing this tutorial to:
King's Mound
Mina 1014, Barrio Antiguo, Monterrey, Mexico
T. + 52 818 340 4826
www.kingsmound.com
Objective
Describing the actions needed to add multiplayer functionality to the Bootcamp Demo with Exit Games Photon.
The first thing we did was going through the game and making a list of all actions that need to be synchronized with other players. For Bootcamp, we came up with the following list:
- Position of Player
- Rotation of Player
- Animations of Player in their different States
- Action: Firing
- Action: Reloading
- Action: Crouching
- Action: Aiming (including torso rotations)
- Current Selected Weapon
- Player Health
- Player Death
- Chat Messages
- Joining the Lobby
Few initial considerations: The server for this demo will not be authoritative, the shooting player determines if he hits another player or not. This is something we definitely want to rethink for future implementations to avoid cheating. Crouch and Aim are treated differently than motion actions because they can be blended with them.
To handle all animation variants to be executed without sending a particular message for each animation, the following scripts were created for the local player: