1

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

Community
  • 1
  • 1
Marine
  • 1,097
  • 7
  • 19

2 Answers2

3

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
Marine
  • 1,097
  • 7
  • 19
1

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/

dhruv chopra
  • 490
  • 3
  • 11
  • Thank you @dhruv for the reply. But when i send move the listener method onMoveCompleted is not being called so what to do for that. Please do guide me through – Marine Feb 13 '14 at 04:52
  • 1
    Can you check the result of your sendMove operation? Its provided in the onSendMoveDone callback. Only if its successful, will the server send onMoveCompleted notification. sendMove can fail if the game has not been started (startGame API) or if its not the sender's turn. – dhruv chopra Feb 13 '14 at 10:56
  • 1
    I have done it now. a basic demo to transfer the turns and make the game play. Thank you for your suggestions. I would post the steps what i followed in the below answer box. – Marine Feb 13 '14 at 12:36