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:Generating game links for multiplayer games
When you open any gameurl 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:
- Generate a
roomDetailsobject - Base64 encode the object
- Create the multiplayer game
url - 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 If you’re using Javascript, store this in a You’ll get the following value:
roomDetails object you’ve generated and you now want to encode it:const named roomDetails, and then run: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.