Zoot Developer Docs (latest)

Download OpenAPI specification:Download

Third party game developers can easily integrate games (client & server) with Zoot using one of the three integrations options.

Integration Options


Option 1: Zoot Game Template (recommended for developing new games)
Develop a game based on the Zoot Game Template.

Option 2.1: Zoot Platform SDK (recommended for integrating existing games)
Integrate a custom game client with the Zoot Platform SDK.

Option 2.2: Zoot RGS SDK (recommended for integrating existing games)
Integrate a custom game server with the Zoot RGS SDK.

Option 3.1: Zoot Iframe Messaging
Integrate a custom game client by manually handling iframe post messaging between the game client and Zoot Platform.

Option 3.2: Zoot RGS API
Integrate a custom game server with the Zoot RGS API for server-to-server communications.

Option 1: Zoot Game Template

Recommended when developing new games.

Develop a game based on the Zoot Game Template.

Zoot Game Template comes with a pre-fab game client and game server.

It equips developers with the necessary tools to quickly integrate new games, providing a comprehensive setup for rendering game-scene, managing play controls, integrating with the Zoot RGS SDK, and facilitating communication with the Zoot Platform, through the Zoot Platform SDK, to access user information and session data.

Zoot Game Template demo: https://template.games.enigmalakecasino.com
Zoot Game Template demo exercised as part of the Zoot Platform: https://getzoot.com/games/test?iframe=https://template.games.enigmalakecasino.com

Steps

  1. Request an RGS API Key using this form. The RGS API Key is necessary for game servers to integrate with the Zoot RGS (Remote Game Service).
  2. Download the Zoot Game Template repository
  3. Update the provided client & server template to contain your game-scene and support the game mechanics
  4. Run the updated Zoot Server Template & Zoot Client Template locally
  5. Exercise your game client as part of the Zoot Platform: embed your locally running game client into the Zoot Platform: https://getzoot.com/games/test?iframe=http://localhost:3000

Option 2.1: Zoot Platform SDK

Recommended when integrating an existing game client.

Integrate a custom game client with the Zoot Platform SDK.

Steps

  1. Integrate the Zoot Platform SDK npm package in your custom game client
  2. Run your custom game client & server locally
  3. Exercise your game client as part of the Zoot Platform: embed your locally running game client into the Zoot Platform: https://getzoot.com/games/test?iframe=http://localhost:3000

Option 2.2: Zoot RGS SDK

Recommended when integrating an existing game server.

Integrate a custom game server with the Zoot RGS SDK.

The Zoot RGS SDK is a TypeScript wrapper around the Zoot RGS API.

Steps

  1. Request an RGS API Key using this form. The RGS API Key is necessary for game servers to integrate with the Zoot RGS (Remote Game Service).
  2. Integrate the Zoot RGS SDK npm package in your custom game server
  3. Run your custom game server locally
  4. Run your custom game client locally
  5. Exercise your game client as part of the Zoot Platform: embed your locally running game client into the Zoot Platform: https://getzoot.com/games/test?iframe=http://localhost:3000

Option 3.1: Zoot Iframe Messaging

Integrate a custom game client by manually handling iframe post messaging between the game client and Zoot Platform.


Steps

  1. Manually handle iframe post messaging between the client and the Zoot Platform (Zoot Plataform iframe messages reference)
  2. Run your custom game client & server locally
  3. Exercise your game client as part of the Zoot Platform: embed your locally running game client into the Zoot Platform: https://getzoot.com/games/test?iframe=http://localhost:3000

Option 3.2: Zoot RGS API

Integrate a custom game game server with the Zoot RGS API for server-to-server communications.

Steps

  1. Request an RGS API Key using this form. The RGS API Key is necessary for game servers to integrate with the Zoot RGS (Remote Game Service).
  2. Integrate the Zoot RGS API in your custom game server
  3. Run your custom game client & server locally
  4. Exercise your game client as part of the Zoot Platform: embed your locally running game client into the Zoot Platform: https://getzoot.com/games/test?iframe=http://localhost:3000

initiate-game-round

Initiates a new Game Round with GAME_ROUND_PREPARED and returns its unique identifier. Plays can only be registered during this Game Round. phase.

Authorizations:
server-authorization
path Parameters
gameId
required
integer

Numeric ID of the game

Responses

Response samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2"
}

start-game-round

Start a Game Round and update its status to GAME_ROUND_LIVE. Only Game Rounds with status GAME_ROUND_PREPARED can be started.

Authorizations:
server-authorization
path Parameters
gameId
required
integer

Numeric ID of the game

Request Body schema: application/json
gameRoundUuid
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2"
}

Response samples

Content type
application/json
{
  • "startTimestamp": 1710843467
}

cancel-game-round

Used to mitigate any exceptions or failures on the Game Server. The Game Round will end and all the registered Plays will be automatically deregistered. Updates Game Round status to GAME_ROUND_CANCELED

Authorizations:
server-authorization
path Parameters
gameId
required
integer

Numeric ID of the game

Request Body schema: application/json
gameRoundUuid
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2"
}

complete-game-round

Update an existent Game Round to GAME_ROUND_FINISHED status. Only Game Rounds with status GAME_ROUND_LIVE can be finished.

Authorizations:
server-authorization
path Parameters
gameId
required
integer

Numeric ID of the game

Request Body schema: application/json
gameRoundUuid
required
string <uuid>
winMultiplier
required
string
payload
object

Responses

Request samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "winMultiplier": 1.2,
  • "payload": {
    }
}

register-user-play

Register a Play in a Game Round with status GAME_ROUND_PREPARED. The User balance is deducted the requested amount in order to register a Play.

Authorizations:
(server-authorizationuser-authorization)
Request Body schema: application/json
userId
required
integer <int32>
userNickname
required
string
playAmountInCents
required
integer
gameRoundUuid
required
string <uuid>
coinType
required
integer <enum: { SWEEPS: 0, GOLD: 1 }>

Responses

Request samples

Content type
application/json
{
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "playAmountInCents": 1205,
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "coinType": 0
}

Response samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "playId": "8bd79867-e797-440e-8dbc-0db09829e455",
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "playAmountInCents": 1205,
  • "winAmountInCents": 0,
  • "winMultiplier": "0",
  • "coinType": 0
}

register-play-win

Update a registered Play as a Play Win in a Game Round with status GAME_ROUND_LIVE.

Authorizations:
(server-authorizationuser-authorization)
Request Body schema: application/json
gameRoundUuid
required
string <uuid>
userId
required
integer <int32>
userNickname
required
string
winAmountInCents
required
integer <int32>
winMultiplier
required
string
playWinTimestamp
required
integer <int32>
gameRoundCurrentProgressInMs
required
integer <int32>
payload
any <object>

Responses

Request samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "winAmountInCents": 2819,
  • "winMultiplier": "2.34",
  • "playWinTimestamp": 1710843467,
  • "gameRoundCurrentProgressInMs": 121302,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "playId": "8bd79867-e797-440e-8dbc-0db09829e455",
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "playAmountInCents": 1205,
  • "winAmountInCents": 2819,
  • "winMultiplier": "2.34",
  • "coinType": 0
}

register-play-lose

Update a registered Play as a Play Lose in a Game Round.

Authorizations:
server-authorization
Request Body schema: application/json
userId
required
integer <int32>
userNickname
required
string
gameRoundUuid
required
string <uuid>
gameRoundEndTimeInMs
required
integer

Responses

Request samples

Content type
application/json
{
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "gameRoundEndTimeInMs": 1713095148724
}

Response samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "playId": "8bd79867-e797-440e-8dbc-0db09829e455",
  • "userId": 20310,
  • "userNickname": "BigWinner223",
  • "playAmountInCents": 1205,
  • "winAmountInCents": 0,
  • "winMultiplier": "0",
  • "coinType": 0
}

deregister-user-play

Cancel a registered Play for a specific User and Game Round. The deducted amount from the User balance is reverted.

Authorizations:
(server-authorizationuser-authorization)
Request Body schema: application/json
gameRoundUuid
required
string <uuid>
userId
required
integer <int32>
userNickname
required
string

Responses

Request samples

Content type
application/json
{
  • "gameRoundUuid": "17bfdfeb-82e8-4030-8853-cf9fec248ce2",
  • "userId": 20310,
  • "userNickname": "BigWinner223"
}

Option 4: Zoot Unity Game Template

Recommended when developing new games in Unity.

Develop a game based on the Zoot Unity Game Template.

The Zoot Unity Game Template comes with:
- a pre-fab Game Server Socket Manager, used to communicate with the Game Server via a websocket,
- a pair of Platform Event Receiver & Platform Event Sender used for the Unity Game Client to communicate with the Zoot Platform and receive user information (such as userId, userAccessToken, user balance, etc).