There was an idea to create a sea battle online for Android. The game is already ready, but here’s the problem: I don’t know how to get two players to drive into one room when searching for a game. Those. in the main menu there is a button to search for the game, click and wait until there is another player, as there is - both players are driven into the same room and play sea battle.

If the solutions are obvious to you, please share it, because I do not know how to implement it. At least briefly in steps, what to do.

  • Does the game have any server part at all? If there is, then it is not very clear what the problem is. - Xander
  • No server yet. There is only a game on Android, sea battle against the bot. I want to convert it online. Therefore, I ask, because I do not know where to start and how to implement it. - Crok
  • raise the server, develop a protocol for transferring moves from / to the server. Bot move to the server and debug. Then realize the connection of two players to the server - Alexey Prisyazhny
  • Dig a jetty \ tomcat + there is a good course on teaching Java server development, a teacher from a top university in IT and a developer of allods and skyforge (very popular MMORPG games) good luck - Grigory Zaripov
  • if the server part is done on ASP.NET, then I would use SignalR - Alexan

1 answer 1

  1. Get the server.
  2. Write the server part of your game.
  3. Make match-making for players (matching pairs). For example, all players, by pressing their buttons, report to the server that they are ready to play, and he selects pairs between them.
  4. When there is a pair, you create a "room" on the server for it, this is a logical mini-server type for the game, where players can exchange data with each other (moves, etc.).
  5. Give players access to the room.
  6. Players enter (if not change your mind) and start the game.