Sign In Register

How can we help you today?

Start a new topic
Answered

Matchmaking and Unity

 I am trying to set up some simple matchmaking but can't seem to get it working, or I do not understand how it is supposed to work.


Note that all my tests run on the same machine (both clients are started on the same machine) in case that makes a difference.


Authentication/ login works.


From my Unity script I call this when the player click the match making button. playerSkill=0 for both players.

new MatchmakingRequest()
	.SetMatchShortCode(MatchShortCode)
	.SetSkill(playerSkill)
	.Send(OnMatchmakingRequest);

I would expect that the 1st client would create a match, since no one else has yet and that the 2nd client would be matched with him when I make that call on the 2nd client. But it does not seem to happen.


I get two entries in "pendingMatches".


I also added this cloud code to MatchFoundMessage but there is no logging related to this in script.log so I do not see how I would create a challenge as shown in the Heartstone example.

 

Spark.getLog().debug("a test");

 






setup.png
(73.5 KB)

Best Answer

Hi Leslie,


Have you read our guide on Matching Players ? You can find it here. You should review this and test this in the test harness before attempting it in Unity ? You can test the MatchMakingRequest in the test harness with two tabs open authenticated as two players. If you're still having issues let us know and we'll point you in the right direction here.


Regards,

Liam


Answer

Hi Leslie,


Have you read our guide on Matching Players ? You can find it here. You should review this and test this in the test harness before attempting it in Unity ? You can test the MatchMakingRequest in the test harness with two tabs open authenticated as two players. If you're still having issues let us know and we'll point you in the right direction here.


Regards,

Liam

omg. I totally misread what Min/Max means for the Thresholds and had it set up wrong. {facepalm}
The threshold idea is pretty darn cool. Will certainly make use of it when I add ranking to players.
Can close this.


 

Login to post a comment