I am programming a 2 players snake game and I want it to be playable through the internet. I don't think a client-server model would be good here because the only information needed between the 2 clients is which direction the other players chose every 100ms or so.

So I decided to just establish a peer to peer connection between the 2 clients, but I wondered: would it be better to set up only one socket on one side, and let the other side connect to it, or should I open one socket on each client and connect the clients to them symmetrically?

  • \$\begingroup\$ Both sides need a socket, but a single connection is good enough. \$\endgroup\$ – tkausl Jan 22 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.