Let's say you need to implement a multiplayer game over the network. For example, tic-tac-toe. Will search for an opponent and play with him. How to think over server and client logic? After all, the first player must somehow receive information that the move of the second player has been completed. Please explain in as much detail as possible. I want to use Retrofit in the project, is this the right choice?

  • 3
    For multiplayer games, they usually use a TCP or UDP connection, and do not pull the server through REST / HTTP, precisely so that the server can send a packet to the client. - Nofate
  • 2
    I am intimidated by the current tendency to push Retrofit into anything that is at least related to the Internet. Retrofit is a REST client, no more, no less. - post_zeew
  • Isn't the planned game a REST client? - Flippy
  • one
    You want full interaction of users in both directions. REST for this task is not the best solution. Think of websockets or your protocol over TCP. - Nofate
  • one
    You can try kryonet . There, the application level stack is ready, and the packets are regular POJOs. - Nofate

0