Disclaimer: This is a living document and requirements may change in the future, we will aim to keep this document up to date with changes to our integration process.
Last updated:01/14/2022
At present, Leaderboards are populated and shown for Tournament-enabled games. To prevent player cheating, we must ensure that critical gameplay, score submission and computation is done on a remote server and not on player devices.
Before - everything is running on player device After - Critical functions vulnerable to malicious modification is moved to your server
After - game logic/score computation and submission is done on a separate Game Server
Calling our API’s from your server is all that is needed to authenticate a player and attribute a score for your game on our leaderboards.
*Please check https://www.notion.so/outplay-games/Integrating-With-Leaderboards-Tournaments-Colyseus-Method-cf32df3bde8d4e28b327b3d593a0e992, for parameters that are passed to your game.
The two calls required to integrate with our system are:
start— a POST request is made with the parameters below. playerid, otp (token), tourneyid — these parameters are generated and passed to your game frontend upon launch.
path:https://API_URL/tournament-token/:tourneyid/start(POST)
end — a POST request is made with the params below. “score “ param is the definitive value that will be passed to OPArcade leaderboards.
path: https://API_URL/end(POST)
IMPORTANT — start() must be called every game round to verify if the player has remaining “tries” left. For multiplayer games, start() is required for every player connected. Invalid players will not have their scores posted regardless.
IMPORTANT — the parameter ‘otp’ passed from OPArcade frontend is renamed to ‘token’ when used in the API calls. Unfortunately for backward compatibility this is being kept as is for now.