Sign In Register

How can we help you today?

Start a new topic
Answered

Problem With Challenge Begin

 Hi,


I need help in multiplayer challenge. I have created a challenge and so far i have implemented it successfull but not at all..

The reason i do not post using submit ticket and post using topic is this is for other to understand and useful for everyone who still new in gamespark.


But i doubt something in my game system. Is it in the right direction or not. And i doubt i have understand the challenge system.


As I know in challenge when begin, we could exchange data using LogChallengeEventRequest and store the data to challenge it self. The LogChallengeEventRequest will consume a turn if turn on turn based in configuration.

And it will got message ChallengeTurnTakeMessage as a signal that player call a LogChallengeEventRequest, in here we can do some logic to accept the data or whatever. We also could achieve the data save to challenge with using GetChallengeRequest.


My Question is :

What about i turn off the turn based in configuration ? I will not get ChallengeTurnTakeMessage anymore. In here how Player 2 will know if Player 1 set LogChallengeEventRequest and save data to Challenge It self ? There is not signal if the data was save to challenge like message ChallengeTurnTakeMessage.

So when should i call GetChallengeRequest to see if there is data attach to the Challenge scriptData ? I need every data that save by player 1 to challenge is receive by player 2.


I need to make player 1 data is syncron with player 2 data in the scene. But if i can't detect if player 1 is save the data to challenge or not how i will call GetChallengeRequest to see the scriptData.


In unity c# where should i put the script GetChallengeRequest ?

Is it in Update() so it will run it every time to check it ?


Another Question :

Is it possible in challenge to use a real time like matchmaking ? I saw in challenge configuration there is no panel to active real time


Thanks

Dennis










Best Answer

Hi Dennis,


Yes a MatchMakingRequest is used to match players. When a match is made players can be added to a challenge in the MatchFoundMessage or MatchUpdatedMessage. This is explained in the Hearthstone guide. If you need specific help with this part just let us know what part is causing the issue for you. From what you have described in previous tickets your system would work fine using a turn based challenge. Has something changed in relation to this ? What I believe you need to do here is one of the following.


  • Players use the MatchMakingRequest to match with traders and go into a trade turn based challenge.
  • Players create a PUBLIC challenge and allow eligible players to find the challenge and join it if wanted.
  • Players create a private challenge by inviting a specific user. If the other user accepts the challenge is created.

I think the second or third option would be what you need here.

Thanks,
Liam




Hi Dennis,


I wouldn't recomment putting GetChallengeRequest in your Update() function, requests weren't designed to be sent every frame. If you feel you might need to employ real time in your game you can find a getting started tutorial for our real time services in our documentation. This would depend on how frequently you expect a challenge's turns to be taken (i.e. if each player is sending requests many times per second, realtime should be considered).


To notify the other player(s) that a turn has been taken in a non-turnbased challenge, you could add a ChatOnChallengeRequest to your turn consumer's cloud code. This will send a message to all players in the challenge. If it's a strictly 2-player challenge, it would be more efficient to just send a message to the other player using Spark.sendMessage().


If you have any further questions please let us know.


Regards,

Vinnie


Hi Vinnie,

Is look like i have misunderstood the defenition of Challenge and Match.
I just read the posting Challenge VS Match from forum topic.
Apparently Match is for find player with similar attribute and then go to challenge.

But in this tutorial Real_Time
https://docs.gamesparks.com/tutorials/real-time-services/real-time-matchmaking.html

I don't see any script CreateChallengeRequest to do a challange Tank_Battle ? Why there is no challenge in that script ? How it can do a challenge without challenge script ?
Is not that we need to create a challenge to start a challenge to other player ?
is not that matchmaking just used to find a similiar some attribute like level, skill and soon then still need a challenge to start a challenge ?

Thanks
Dennis

 

Hi,
Could someone help reply my question ?

Is it possible to Use a RTSession on Challenge ? I want a challenge system which invite a player that we choose. Not find a random player using match. But i need a RTSession in this challenge. Which i will need to sendRequest many times per second.

Coudl someone explain to me ? or i have misunderstood and ask a wrong question.

Thanks
Dennis

 

Answer

Hi Dennis,


Yes a MatchMakingRequest is used to match players. When a match is made players can be added to a challenge in the MatchFoundMessage or MatchUpdatedMessage. This is explained in the Hearthstone guide. If you need specific help with this part just let us know what part is causing the issue for you. From what you have described in previous tickets your system would work fine using a turn based challenge. Has something changed in relation to this ? What I believe you need to do here is one of the following.


  • Players use the MatchMakingRequest to match with traders and go into a trade turn based challenge.
  • Players create a PUBLIC challenge and allow eligible players to find the challenge and join it if wanted.
  • Players create a private challenge by inviting a specific user. If the other user accepts the challenge is created.

I think the second or third option would be what you need here.

Thanks,
Liam



Login to post a comment