I am about to make a 2D top down racing game where players can compete against each others over Internet.
I made a similar game earlier, but that time I used a server, and this time I need to use a server-less approach for several reasons, connecting players directly.
I have no experience in how to set up a direct connection between two clients and let them exchange data, so I wonder what’s the basic fundament needed from your experience?
Assume I already got the clients IP addresses (matchmaking will be solved through a third party solution).
I think I need both TPC and UDP. And my biggest worry is Firewalls. So, can anyone advice me a method that would work for most people on windows system out there? Keeping in mind this is an action game.
A code snippet showing how to get a stream bytes to the other client over UDP/TCP, as well as how to receive it, would be great.
Thanks