I would like to try my hand at making a p2p multiplayer game for PC, Android and iOS, How might I do this please?
I describe one way of doing peer-to-peer discovery here:
It’s fairly complicated and this kind of peer to peer discovery can be blocked in certain network configurations and locations.
I would recommend that you use a server to let players discover each other (using either a lobby/room system or through matchmaking) and then hand over to direct peer to peer communication once you have a list of players. This can be done quite easily using Nakama or Colyseus.
Hi, I recently did something like peer to peer email with UDP. It would be enough to change the sent information, if you want, I will send you the project.
Thanks a lot.
It’s not quite done yet, but it should be enough, I tested it between two computers or an Android phone and a computer. It’s only for two players who automatically establish a connection, everything is created without the use of libraries, so that you can understand everything as best you can.
p2p.zip (219.3 KB)
Thanks for your help. I’ll surely check it out.