Contents - Quick Links
Configure the Client
This step of this uLink authoritative server tutorial goes trough the client scene configuration. Since this tutorial uses a simple authoritative server the security checks for cheating are not implemented so the server just assumes that the position communicated by the clients is valid and physic is not calculated on server. With these settings to have a coherent behavior between server and clients you need to have the exact same level configuration, which means that we need to recreate on the client scene the environment of the server scene :
- Open the client scene, it should only contain a Main Camera.
- Import the Environment package as we did for the server and place it in the very exact position in the client scene (0,0,0)
- To enable the connection to the server create a new empty gameobject in the client scene and name it ClientGUI and add as a component the uLink Client GUI script.
- Save the client scene as our work on it is finished for this uLink authoritative server tutorial step.
Building the client and the server
Now it is time to build the project, we will need to build 2 .exe files, one with only the client scene selected from the build box and one with only the server scene selected.
- Click on File –> Build Settings and add the server and client scene, then check only on of them and press the build button, save the exe with the ticked scene name. Do the same with only the other scene selected, so you should end up with 2 exe files : server.exe and client.exe
- Run the server and then the client, you should be able to connect to localhost and see your character moving on the server. You just built a simple multiplayer game with uLink and an authoritative server setting! You can build more clients and see how many players can connect to your multiplayer game !!