How to check if turnbasedroom is already started?

0 votes

I am making an turn based multiplayer game using AS3

I want to create a lobby interface where player can see the list of room and its detail such as:

  1. room id
  2. room name
  3. list of joined player
  4. status of the room (is it started or not)

I can get no 1-3 through getAllRooms and getLiveRoomInfo method, but I can't find a way to get the isGameStarted method from client side.

Does anyone know how to check whether the room is started or not??

asked Aug 19, 2015 in AppWarpS2 by Propheus (32 points)

1 Answer

+1 vote
 
Best answer

Hi,

If you want to get status of Game based on business logic, you can use Room RPC API. These API provides to user so that the can write custom business logic.  You can refer below example to use this, on server side in RoomAdapter you can define your own function name and call it from client side like.

In RoomAdapter

 public String getRoomStatus(String playerId) {
            return gameStatus;
    }

On Client side :

warpClient.invokeRoomRPC(roomId,"getRoomStatus",player);

//You will get a callback in onInvokeRoomRPCDone function of  RoomRequestListener

Let me know if it helps.

Thanks & Regards

Vishnu Garg

 

answered Aug 19, 2015 by Vishnu Garg (674 points)
selected Aug 19, 2015 by Propheus
Hi Vishnu Garg

your answer works just as I need
thank you very much
Your always welcome.
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
...