Multiplayer in/out connexion ?


I started thinking about a LAN multiplayer game and founded a tutorial,

Rewrited and tested the code, as an example it work fine.
But i have a few questions :
1- After the connexion is established, is it monodirectional ?
the tuto gives information from client to server, is it possible to send data from server to client with the same socket ? or does is require a new socket from server to client ?

2- The tutorial is 1 client and 1 serveur, for multiples clients i think you have to create an array sockets and use free sockets as the number of client increase, how does the client and server knows who is communicating ?
(do you have to send the player number in the send data ?)

3- If you want to make a arena shooter game, while a player is moving should you send the player positionx+positiony+image_angle+sprite or starting position x + starting positiony + direction + image_angle + speed ? In others words, should i synchronise each time the position of players of should the client make the players move knowing the last "order" the real player gived ?

Any piece of advice is welcome :p


The client use his socket to send and receive. The server use the connection socket (async_load[? "socket"]) to send and receive.

When you get a client connection just save
async_load[? "socket"] in an array. As these represent each client.

There are many types of network architecture. Ex lock step, client prediction with server reconcilation, bundle... But all depends on the game. Tips is to Google "game network architecture"


ok ! If a try to send data with the existing socket it should work !
Readed some things with google "game network architecture" , a bit complicated but easier with Lan game.