I would like to program a game that can be played by several players seating in front of different computer which are connected via network and I want to use Java for that. In this respect I have several questions. I will be happy if you can answer at least one the question.
I can imagine 2 different situations. In the first one I build a local network between the computers. In the second case I use Internet as a medium for communication between the computers. So, my first question is if the two above mentioned cases require different approaches (from the software point of view).
The second question is how computers can identify each other. For example, two computers are connected to Internet and, in theory, they can see each other. But how the first computer knows how to refer to the second one? Maybe computers need to know IP addresses of each other? But what if IP addresses are dynamic? Each time when IP address is changed the connection will be lost?
If I use a local network is it possible for every computer to see everything what is in the network?
Let's say my computer knows address of another computer. What can it do with that? Can I send a file to this computer? How the second computer will know that something is sent to it? How the second computer knows what to do with the file? Should I run, on the second computer, a program which permanently checks if something is arrived and, if something is arrived (a file), the program should know what to do with that.