Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Manage Client on the server  (Read 2481 times)

0 Members and 1 Guest are viewing this topic.

Axenntio

  • Newbie
  • *
  • Posts: 8
    • View Profile
Manage Client on the server
« on: December 06, 2015, 06:32:30 pm »
HI everyone, I continue my projet to make a multiplayer game, but i've got a problem:
How can I manage each client on the server ?
Because, All the clients give their X and Y position to the server, but how can I give X and Y position of all the clients to each other ?

I've actually these codes:

Client:
(click to show/hide)

Server:
(click to show/hide)

And with this, how can I give a ID link to the IP
with a array like this:
Id ArrayAxenntioEnadrixRuhtrax
Ip ArrayIp1Ip2Ip3

To use this with a function like
message("You are Axenntio","Axenntio");
void message(std::string text,std::string id){
        // Loop that link the Id with the Ip array
        //Then send the message to the client Axenntio
}
 

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Manage Client on the server
« Reply #1 on: December 09, 2015, 10:38:01 am »
Well generally you'd create a unique client ID, then you'll probably be wanting to relay the positions along with the identifying client ID. Of course this would only give you client sided movements.