A sample project that demonstrates how to implement a server authoritative asynchronous multiplayer game using Unity Gaming Services, without needing a dedicated game server.
For this sample to work, you first need to publish your Cloud Code module and Leaderboard via the UGS CLI. Remember to install and configure the CLI first. This requires a project ID and a service account key, both of which can be created and found in the Unity Dashboard.
Once the CLI is set up, the module and leaderboard can be deployed with the following commands (or by running the deploy.sh
script):
ugs deploy ChessCloudCode/ChessCloudCode.sln
ugs deploy EloRatings.lb
To run the chess sample, import the Chess folder as a Unity project, open and run the ChessDemo.unity
scene. To run another game client locally to play against, go to File -> Build and Run
. Then you can create a game in one client, and join it in the other using the generated code shown in the top right of the game window.
To limit access to specific Cloud Code endpoints from authenticated players (i.e. the game client), have a look at the Access Control documentation.
This project uses the Free Low Poly Chess Set asset for the board and chess pieces, and the Gera Chess Library for validating the moves made by players.
See Third Party Notices for more information.