Skip to main content
This feature is only available with paid plans. Contact us to know more.
Multiplayer games are real-time matches between 2 to 5 players. If you’re instead looking to run time-bound, leaderboard-based competitions open to all your users, check out Tournaments.

Types of games

Not all Gamezop games support multiplayer experiences. Here is a list of our games on which you can create real-time multiplayer experiences for your users. There are 2 types of multiplayer games: When you open any game url that you receive on our All Games API, the game opens a single-player experience by default. To enable a multiplayer experience, you need to follow these steps:
  1. Generate a roomDetails object
  2. Base64 encode the object
  3. Create the multiplayer game url
  4. Get multiple users to open the multiplayer game together
1

Generate a "roomDetails" object

This carries all the details we need to create a match between your users. roomDetails is a JSON object with the following values:
2

Base64 encode the "roomDetails" object

Let’s assume this is the final roomDetails object you’ve generated and you now want to encode it:
If you’re using Javascript, store this in a const named roomDetails, and then run:
You’ll get the following value:
3

Create the final multiplayer game URL

If you are going to send user details or a wide variety of roomId values, you may need to generate the final game link on the client instead of the server. If you aren’t using those values, then you can manually generate a link and send all your users to the same link and they will keep getting matched with one other.Generating the link is extremely simple. Once you have the encoded roomDetails value, just append it to the URL you receive from the All Games API. The final URL will be of the following structure:
url-from-All-Games-API ? roomDetails= encoded-object
4

Get multiple users to open the multiplayer game together

Once you’ve set up the system to generate these links, you need to have multiple users from your platform open the links together. When a user opens one of these links, our matchmaking system tries to find other users from your Property ID with the same roomId, and matches the users together in a multiplayer experience.

Receive data on match winners

In case you want a callback with details of the winners at the end of each match, you will have to provide 2 APIs for it. This is detailed in the next document.