Fabseven
Member
Hello,
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
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