How will the game search for other online users and display a list of all users?
You need a server that returns a list of online players to your iPhone client - this is some kind of data format, perhaps XML or JSON.
How can I ask someone to join the game and then see other users?
The simplest approach is the one who wants to join the game, sends this command to the server, the server reports that the other person they want to join is. Wait for an answer. If player two says yes, returns to the server, which forwards to the first player.
This is basically a series of commands sent to and from the server. This is how all multiplayer games work - for example, the Quake engine sends very compact commands, only 4 bytes for things like "get me all the players on the server." Given the fallacy of connecting the iPhone, this would be a good model for copying, since Quake networking code was designed for 56k modems.
How will the connection and session between table players work? (Sockets?)
The connection can be either a continuous stream (best of all UDP), or a polling from the client. You will need to consider scaling for both, as it is possible that 100 people can put your server on their knees.
The session will be deleted if one player loses connection. Alternatively, when he is working, each player can simply send a command when he is online, and the other client selects this when he is online - there is no need for a session in this model, and the teams are stored on the server in the data warehouse.
What network programming is needed as part of the server and client?
I will expand this:
- Deep knowledge of byte and bit manipulation, including bit offset
- Knowledge of creating and reading UDP packets
- Network programming in C (Objective-C can simplify this)
- Server: recording daemons on Linux or Windows services to listen for commands
- Knowledge of SOAP, XML or JSON, if you are not concerned with bandwidth and connection,
source share