Sign In Register

How can we help you today?

Start a new topic
Answered

Matchmaking Based on Lobby IDs

Hello, 

We are in the process of developing a new social game using GameSparks.  We'd like some help figuring out how to set up our matchmaking system.  We would like it to work like this:


- Players connect to game and are introduced with a main menu, here is a list of player-created rooms.

- Each room is connected to a Room ID# - each room is a unique lobby.

- The UI will print a list of rooms, and each one is a button, if a player clicks on a room it connects them to that lobby based on its Room ID and matches that player with everyone else in the lobby/room.


Thanks!

- Riley 


Best Answer

Hi Riley,


Challenges would still be suitable here. You could set the endTime to be years into the future (or not include one at all) so they won't expire. A ChatOnChallengeRequest can then be used for players to chat in RealTime. You could use SparkChallenge in Cloud Code to attach data to the challenges scriptData. You could also store custom data in a runtime collection and use the challengeInstanceId to reference it for storing and retrieving data relevant to that challenge/room.


Thanks,

Liam


Hi Riley, these 'rooms' are what we call Challenges. Challenges come with a lot of functions and flexibility such as listing them, creating them and deleting them. Challenges also come with a huge number of in built messages such as when the challenge is created, a player invited, a player joined, a game started, a turn taken. 


We have a few tutorials and guides in the doc site:


https://docs.gamesparks.com/documentation/configurator/multiplayer/challenges.html

https://docs.gamesparks.com/tutorials/multiplayer/understanding-and-testing-challenges.html

https://docs.gamesparks.com/tutorials/multiplayer/score-based-asynchronous-challenges.html


Hope this helps,

Omar

Hi Omar, 


Thanks for the reply, we'll look into Challenges for this.  However, we don't really want to create any kind of actual challenge.  We're looking to make player-created 'rooms' where players can go in and chat in real time.  So we wouldn't require any challenge parameters to be set, just that players can create enter virtual spaces with each other and chat.  These 'rooms' would never expire and would need to have the data stored and maintained, such as where objects are placed, the layout of the virtual 3d space, etc. 


- Riley 

Answer

Hi Riley,


Challenges would still be suitable here. You could set the endTime to be years into the future (or not include one at all) so they won't expire. A ChatOnChallengeRequest can then be used for players to chat in RealTime. You could use SparkChallenge in Cloud Code to attach data to the challenges scriptData. You could also store custom data in a runtime collection and use the challengeInstanceId to reference it for storing and retrieving data relevant to that challenge/room.


Thanks,

Liam

Login to post a comment