Sign In Register

How can we help you today?

Start a new topic

Challenges and mathces for non realtime game

Hi, We need some help in understanding and organizing our project's GameSpark architecture.

It's a non-real-time multiplayer game.

There are battle matches between 2 or more players.

 

Matches are held automatically without player participation. They are calculated on a server. The player will only watch the match record from this server.

 

Our logic with Gamespark integration:

- A client sends the reqvest to the battle server for battle calculation start.

- Battle server sends a request to GameSpark to search for the opponents and waiting for their response

- When the answer comes, the battle server calculates the battle. The result is sent to GameSpark and then returns to both users as battle calculation file.

- The client receives the result on demand.

 

In fact, we have no need an opponent's agreement or answer to start a battle in our game. The opponent even can be offline during the battle.

 

Our questions are:

How can we use GameSpark matchmaking algorythms for offline opponents using user cloud code only?

How can we make a list of players (offline or online) grouped by some criteria (as MMR, specific clan etc.) available for matchup?

Can we create a challenge in cloud code and choose players for matchup?


Hi Alexey

 

To answer your questions in order

 

[1]How can we use GameSpark matchmaking algorythms for offline opponents using user cloud code only?


Unfortunately you cant match make players who are offline,

this would require a custom solution as matchmaking is only used to group players together by their credentials before starting a challenge.

We could achieve this by utilizing a runtime collection that stores the players who are offline and online to create a challenge with.

This collection could be manipulated by checking if the player is either online or offline with a boolean through the player Authentication Request and Response.

Further useful information on this can be found here

 

[2]How can we make a list of players (offline or online) grouped by some criteria (as MMR, specific clan etc.) available for matchup?


There is a multitude of ways this can be achieved using GameSparks, for clan specific groups I would suggest using our Teams functionality, this should hopefully shed some more light on how they can be used.

As for MMR our MatchMaking comes equipped to deal with this through our skill rating system, how this is calculated is entirely up to you.

 

[3]Can we create a challenge in cloud code and choose players for matchup?


Yes indeed, the players will have already been chosen in our matchmaking as stated earlier,

but creating a challenge in cloud code may be achieved through something that might look like this for example


var challengeRequest = new SparkRequests.CreateChallengeRequest();

challengeRequest.accessType = "PRIVATE";//PUBLIC

challengeRequest.autoStartJoinedChallengeOnMaxPlayers = true;

challengeRequest.challengeMessage = "MatchFound- Create Chal by" + Spark.getPlayer().getDisplayName();

challengeRequest.challengeShortCode = "CHAL";


challengeRequest.maxPlayers = 2;

challengeRequest.minPlayers = 2;       

var gameEndDate = new Date(Date.now()+(1000*60*60*24));

var endDate = gameEndDate.getFullYear()+ "-" + gameEndDate.getUTCMonth() + 1 +"-"+ gameEndDate.getUTCDate() + "T" + gameEndDate.getUTCHours() +":" + gameEndDate.getUTCMinutes()+ "Z";

challengeRequest.endTime = endDate;

challengeRequest.usersToChallenge= SOME_PLAYER_ID

var response = challengeRequest.Send();


Following from this you might find more useful information about challenges here


Hopefully this is helpful for the demands of your game, let me know if you need anything else.

 

Regards

Ronan

thx for answer. It gave us some information about GS. We will be continue our research. 

Login to post a comment