Appwarp create multiplayer screen

150 Views Asked by At

I am new in Appwarp and also in multiplayer gaming. Superjumper is a great tutorial and its methodology seems incredible, but I do not know, how to build MultiplayerGameScreen.java from my own single player game.

Can you please give me maybe a step-by-step instruction or guidelines, how to make this file?

1

There are 1 best solutions below

1
Rajeev On BEST ANSWER

MultiplayerGameScreen.java is a game specific class. All the AppWarp related functionalities are implemented in the WarpController.java class which you can find here. MultiplayerGameScreen.java is just calling the required methods from WarpController.java.

To convert the single player game to multiplayer, you can use the following steps:

  1. All the players who needs to play together must join same room

  2. Once game starts, if player needs to send its information to other players, you can use either sendUpdatePeers or sendChat as per the game requirement

  3. Once a player sends update then server sends notification to other players which you can receive in the corresponding callbacks such as onChatReceived in case of sendChat

  4. Once you get the notification, you can update your game UI accordingly

You can always write to us on [email protected] or on our forum in case of any problem.