Error on ID Rooms

0 votes

So I am following this guide: http://appwarp.shephertz.com/game-development-center/java-multiplayer-libgdx-tutorial

And when I call:

theclient.createRoom(roomId, owner, maxusers, data);

I want that the RoomId = Owner, so when I search for joining the room my friend has created, I can search it by his name.

But when the method OnCreateRoomDone is called, roomEvent.getData().getId() != My friends name, so I suppose that I dont pass the RoomId on createRoom... (So i dont know what is the first parameter)

And if roomEvent.getData().getId() != My friends name, if I code this: theClient.joinRoom(myfriendsname); wont work? And how do I do this?

 

Thanks in advance and I am sorry to ask a lot of questions!

asked Jul 7, 2016 in Android by Raul Mateo (15 points)
edited Jul 7, 2016 by Raul Mateo

1 Answer

0 votes

Hi Raul,

Greetings!!!!!!!!!

AppWarp generates a unique number by own with respective a Room that is created by a user. So you need to get RoomId before joiinging a particular Room.

But you can achieve the same by another way like Create Room with properties, Create one property like ownerName in Room Properties.Now while joing the room you can use Match Making API joinRoomWithProperties and pass the same property like ownerName as friendName. If there is a room created by your friend you will be joining that room.

Let me know if more queries are concern.

Thanks

Vishnu Garg

answered Jul 8, 2016 by Vishnu Garg (674 points)
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
...