Not getting the turn in App warp for Real time turn based game in unity

850 Views Asked by At

I am newbie to the appwarp Async turn based game and I have already succeeded to create a turn based room dynamically but the listener from appwarp must call a method named

public void onMoveCompleted(MoveEvent moveEvent);

but its not being called so that I would be able to switch the turn to another player.

There is no example for the Realtime turn based multiplayer using Appwarp. If any one would have a prototype in unity it would be a great help for me.

Help is highly appreciated. Thank you

2

There are 2 best solutions below

0
On BEST ANSWER

Here are the steps to get it completely working

  1. Initialise AppWarp SDK
  2. Setup Listeners and add them to callbacks
  3. Connect to AppWarp Server
  4. Create a Room
  5. Join the room
  6. Subscribe the room
  7. call startGame (Necessary when you are using turn based room)

Repetitive Steps

  1. Start sending moves.
  2. Get moves from onMoveCompleted
3
On

there are quite a few samples for realtime turn based gaming using AppWarp. You can take a look at this post on a Windows Phone sample and follow the same for Unity (both are in C#). It also introduces you to some concepts

http://blogs.shephertz.com/2014/01/07/build-online-turn-based-games-using-appwarp/

Another one in Lua (Corona)

http://appwarp.shephertz.com/game-development-center/corona-realtime-turn-based-game-tutorial/