Is it Possible that there is no admin room in game?

0 votes
Hello, for Now my code need atlaeast one room must be created from admin side but i want to build a code like when first user come and request for join room a turnbaseroom must be created from client side.once that room match with maxuser than after another room must be created?
asked Aug 16, 2016 in AppWarpS2 by bicubic.unity02 (22 points)

1 Answer

0 votes

Yes, it is possible.

Please follow the following steps:

1. Connect user to AppWarpS2 server

2. On successfully connection, call joinRoom API

3. If joinRoom fails then call createTurnRoom API

4. In onCreateRoomDone callback, call joinRoom API if room created successfully

This way user will be joining a room if available on the server otherwise he will create and join.

Let me know if you have any further queries.


Rajeev Ranjan
answered Aug 16, 2016 by rajeev.etc (1,660 points)
Thanks Rajeev for sharing this info.but in my case i have several no of rooms.among this room i want to to find which room vacant and available to join.i am using GetLiveRoomInfo method for check every live room's status but some how it didn't works
Currently I am Following This Way to Do Above task:

1)Connecting to AppWarpS2 server

2)GetAllRoom Available using " WarpInstance.GetAllRooms ();"

3)onGetAllRoomsDone get   "WarpInstance.oGetLiveRoomInfo()"

4)onGetLiveRoomInfoDone  if room is having less member than max_user
join room  other wise create new room and join that room.
The way you are doing is not recommended. There is no need to call getAllRooms then GetLiveRoomInfo to join a room. You can use our match-making APIs and a single API call will serve the purpose. You can use joinRoomInRange API( ) instead. This API will search for the room on the server between a specified range of users. For example, if you want to join a room with minimum 2 or maximum 4 users then you can define a range in this API. You do not need to pass roomID in this API. If this API fails which means there is no any room available on the server with specified range of users to join and hence you can go ahead and create a Room and join the same.

Let me know if you have any further queries.
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