One nice aspect of the Skillz real-time gaming solution is that Skillz hosts and maintains your servers. You have the option to use a custom server or customize the Skillz example server. We recommend the following workflow to get started with getting your real-time game working on Skillz:
- Download example game/battle server (or roll your own talk to your Skillz contact for more information)
- Integrate the Skillz SDK
- Test your game connecticity with your server running locally
- Once you have verified things work locally work with the Skillz team to spin up a Sandbox server to validate the workflow.
- Once Sandbox testing is complete Skillz will work with you to rollout the game into production
The Skillz team will help you through this process as we work to further build out the solution.
Client Server Life Cycle
To help you get better understand the workflow with the Skillz example server we have outlined the default life cycle below. Please refer to our example Unity app to see an example implementation. Currently we only have a Unity example and will provide more examples in the future. In general your game flow will look like this:
- Player selects match in the Skillz interface
- OnMacthWIllBegin method called by Skillz SDK
- Client creates SSL connection to server (refer to sample app for example)
- Client executes Cert/Public Key pinning (refer to sample app for example)
- Client creates and sends Connect Packet
- Client gets SUCCESS packet
- Once all players are connected to game clients get MATCH_SUCCESS packet
- Game begins
- Game Loop executes Client sends PLAYER_UPDATE packets Client receives GAME_STATE_UPDATE packets
- Client receives GAME_OVER packet (can be initiated by game or player ABORT packet).
- Report final score via Skillz SDK
Please note in the current version the Skillz SDK is required to report the final score. In the future the server will be required to send the final score.