Hi there,
I would like to develop a multiplayer turn based game with AppWarp on HTML5.
My problem so far is, that I do not really understand the concept of TurnBased Multiplayer (one on one!).
What I did understand so far is:
-
Connect to AppWarp using initialize and connect and bind listeners
-
On Matchmaking try to join existing room (joinRoomInRange(0, 1, true);)
-
If the onJoinRoomDone is called with an error, I call createTurnRoom
-
if someone connects to the room (onUserJoinedRoom) I can start the game (startGame())
-
startGame is called with error code 0
-
If onJoinRoomDone succeeds I subscribe to that room
-
if someone connects to the room (onUserJoinedRoom) I can start the game (startGame())
-
startGame is called with error code 4
Is this the correct implementation? Why am I seeing that error code 4 if there is already an existing room?
Does anyone have some example code for an HTML5 app (e.g. something like tic tac toe) where I could check the basic structure out?
How would you handle multiple open turn based games (e.g in two rooms its my time to play, in 2 others I'm waiting for the opponent to play)?
Thanks for your help! I really need some obviously!