Sign In Register

How can we help you today?

Start a new topic
Answered

How to create Realtime tournaments

Hello, 

I am making a multiplayer Rock Paper scissors game, in the game i want to have tournament which starts every sunday 12 am US time. players should be able to enter the tournament, and once 100 players has entered the registration should end and those 100 people should be matched with each other for knockout rounds. The person who wins all will be rewarded.


I can do the code for everything, i just dont know how to create such a tournament here on gamesparks, I thought about creating a realtime match and set the min_players to 100 and then start the game and do the matchmaking etc as if its one large game , But i am not sure if its the best way to do it.


can anyone guide me about what should i use to create this functionality.


Thank you very much :)
Regards, 

Abhishek Agrawal


Best Answer

Hi Abhishek, 


This could be done through using Matches, Match Groups on the MatchMaking Request and the backing of a Runtime Collection. 


It would work in the following way: 


Firstly, you can schedule the creation of a tournament using the Spark Scheduler. This could be in the form of a Request that inserts a tournament config into a  Runtime Collection. 

Players will subscribe to your tournament utilizing a LogEventRequest. This request will update said entry inside of a Tournament Runtime Collection so long as the "maxPlayers" field within said entry is not at the defined maximum.  


Once payers have subscribed to the tournament they will need to match. This can be done through the Use of Match groups. this allows you to expose certain subsets of players to one another for the purpose of MatchMaking. This value could be acquired from the player object were you to store a unique identifier on the Player Object in the form of scriptData. This scriptData will remain while they are still in the tournament. Should they lose and be knocked out it can be replaced by a value eluding to that, behind which you will block the ability to matchmake for the given tournament. 


Rather than automating the MatchMaking process you can allow the payer to inquire as to how many players have joined the tournament and once it has hit the required number i.e 100 players, indicate they can now find matches. This may in the form of a UI element now being activated. 


Each time a match completes you will need to update the field which will track the number of victories. When this number reaches the value that would indicate there are no more victories to be had i.e that this is the final match, you can conclude the current player is the winner and award them accordingly. 


Hope this helps ! 

Best Regards, Patrick. 

1 Comment

Answer

Hi Abhishek, 


This could be done through using Matches, Match Groups on the MatchMaking Request and the backing of a Runtime Collection. 


It would work in the following way: 


Firstly, you can schedule the creation of a tournament using the Spark Scheduler. This could be in the form of a Request that inserts a tournament config into a  Runtime Collection. 

Players will subscribe to your tournament utilizing a LogEventRequest. This request will update said entry inside of a Tournament Runtime Collection so long as the "maxPlayers" field within said entry is not at the defined maximum.  


Once payers have subscribed to the tournament they will need to match. This can be done through the Use of Match groups. this allows you to expose certain subsets of players to one another for the purpose of MatchMaking. This value could be acquired from the player object were you to store a unique identifier on the Player Object in the form of scriptData. This scriptData will remain while they are still in the tournament. Should they lose and be knocked out it can be replaced by a value eluding to that, behind which you will block the ability to matchmake for the given tournament. 


Rather than automating the MatchMaking process you can allow the payer to inquire as to how many players have joined the tournament and once it has hit the required number i.e 100 players, indicate they can now find matches. This may in the form of a UI element now being activated. 


Each time a match completes you will need to update the field which will track the number of victories. When this number reaches the value that would indicate there are no more victories to be had i.e that this is the final match, you can conclude the current player is the winner and award them accordingly. 


Hope this helps ! 

Best Regards, Patrick. 

Login to post a comment