Sending challenge to another player to play game

0 votes

Hi,

i am using appwarp and app42 for android.

I want to challenge user who joined me in chat room via matchmaking, if player accept challenge then both will be redirect to game room. and after completing game both user again redirects to their chat screen where they left before.

 

I checked whole api but didnt find any documentation about this. 

P.S. I am not using any social integration in my app.

asked Feb 28, 2015 in AppWarp by swapnil.gawali (10 points)

1 Answer

0 votes
Hi,

You can try sending private chat. Player A can send a private chat to Player B to ask if he/she wants to play a game. If other player agrees, then both can join a same room.

Thanks
answered Feb 28, 2015 by Suyash Mohan (900 points)
Hi Suyash thanks for your response, if same can be done with getOnlineUserList? i want show online users, user will select with whom he/she wants to play, when user click on userListItem then challenge will be sent to that user if he agrees then both go to the chat screen and after that i can use u mentioned process above, otherwise challenge rejected. i dont want to use matchmaking in my game.
Use getOnlineUsers to get the list of all online players. Then when user selects another player from list, send that player a private chat. On the other side parse this message and if this is an invitation pop up the notification asking for acceptance, if player accepts then connect them in same room, else do nothing. You can also send room ID in that message. You can create a JSON message holding all this information.

Thanks
thanks sir got it, but the main problem is when layer B accepts player A's challenge, then how can i handle this callback to connect them in same room? there is lots of information available about matchmaking, but this kind of information not available thats why have some confusion. is there any simple code to achieve that?

thanks.
Hi,
Player A can join any random room. Then he can send a private chat to Player B. The message can be a JSON message containing that room ID. If player B accepts the challenge he can join that room else he can send private message to player A telling him that he has declined the request.

You may find this blog useful http://blogs.shephertz.com/2013/11/13/process-of-matchmaking-with-known-user-and-random-user-on-appwarp/

Thanks
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...