Quote Originally Posted by dj_sharp View Post
2.1. In local network any PC has IP address, so if two ppl connected to same home router, either wired or Wi-Fi, they both have IP address in local network, so there should be no problem.
Every networked PC or device has an IP assigned to it.
Any two networked PC's that are on the same network can directly comunicate between each other without any problems.
But if you have two PC's on two different networks then direct comunication between them are not posible without those two networks either being bridged together or data is being routed from one network into another.
Now due to security reasons most networks are protected by firewals which prevent all information to be routed into it. So in order to comunicate with a PC on such network you need to open (unblock) proper port in firewall for data to get through.

Quote Originally Posted by dj_sharp View Post
2.2. To play over the Internet, either one of PCs should have static IP address, or you should provide one additional PC which would then act as an intermediate server in case u can't rely on players having static IP address.
Static IP is not required. You only need to exchange IP adresses between players. Static IP adress only comes usefull if you are hosting presistance multiplayer game so that in case of server conection loss you don't need to manually send your new IP adress to other players.
And even this could be making your PC to become part of an domain (PC IP is provided by domain server).

Quote Originally Posted by dj_sharp View Post
Whether you will be able to accept incoming connections over the Internet or not depends on your Internet Service Provider.
ISP providers don't block incoming connections. Incoming connections are only blocked by built-in firewall of your internet gateway. But in most cases you can configure firewall settings of your gateway and add proper exceptions to it.

Quote Originally Posted by dj_sharp View Post
Most modern online games provide intermediate servers. Because in most cases you can't expect players to accept connections.
The main reason why modern online games rely on intermediate servers is to provide a game lobby through which players can easily find desired multiplayer sesion, join or create one. This eliminaes the need to manually share IP adresses between players.

Quote Originally Posted by dj_sharp View Post
Because to accept connections you should configure router, and then in most cases you also should pay your ISP additional fee, otherwise you won't be able to accept connections.
Paying additional fee to able to accept incoming connections? What? I have never heard anything about it.
The only aditional fee that ISP providers are known to charge is to get a static IP asigned to you. But nowadays more and more ISP providers assing static IP adress to their users by default (athleast here in Slovenia). I myself had to ask my ISP provider not to asign me a static IP adress.

Quote Originally Posted by dj_sharp View Post
However, what I said earlier about local area network is also true for Wi-Fi powered phones. Each phone in local area network has IP, so it can accept incoming connections....
Only if those connections are comming from that local network.


As for deciding between TCP or UDP:
UDP protocol is intendet for general broadcasting of data to multiple computers. Becouse it doesen't have data delivery checkings system integrated it is mostly used for broadcasting non esential data (video or audio streaming).
TCP on the other hand has built in packet delivery checking system which makes sure that packet was delivered. If not the packet is resended. With the difference of the UDP TPC protocol can deliver its packets to only one computer in time. So if you are sending data to let us say 1 computers you will have to send that data ten times (once for each computer).

So since yin your game you will probably be sending data only between a few computers and you need to know wheter data arrived to another computer or not using TCP is the best choice.

As for how you implement multiplayer functionality into your game I gues you would want to have one computer to act as server.
This computer will also take care about game simulation. So it will be constantly sending information of game state to other clients.
Clients on the other hand will be only sending input information (which keys were pressed/released).