Last January I asked a question about sending string information between computers. Using the responses as a starting point I’ve got machines communicating across the same LAN’s. Now I am interested in expanding the code to permit communication between machines that are further apart. I constantly see games being played across networks where users supplied only email addresses. How does that work? What’s the purpose for supplying an email address? (I’m not looking for code, just a general explanation about what’s happening.)
Last January I asked a question about sending string information between computers. Using the
Share
The email address is simply used as a unique identifier to access a specific account. The accounts are purposefully not tied to single machines in most cases.
You know how to communicate across the LAN, so I’ll assume you know the basics of networking. The trick is simply that the game client connects to a central server that has a known address over the Internet, with the credentials to login (this is where the email address usually comes in, but really, it can be anything, as it doesn’t serve as a machine identifier). The server then registers the IP address, and so the game system knows how to reach other people because the central server knows who’s playing and how to reach them.