Im wondering what the best way to set up my UDP server/client program is. Here is what I am currently trying to do.
The problem im having with this, is getting sending the list of client's information from the server to the client. Im using SFML and only have a very basic understanding of networking.
My question is: Is my approach to this okay, and if it is how can i get the list( im using an std::map<std::string, Client> ) sent to the client though an sf::Packet. If my approach is not okay, what is a better approach?
-client sends key input to server -Server receives key input. Checks for collisions and updates this client's position. -Server sends this client a list of all the client's information(position, HP, etc) including the client's own information -client receives this list, updates his own information, and updates the list of connected players the client is keeping.
The problem im having with this, is getting sending the list of client's information from the server to the client. Im using SFML and only have a very basic understanding of networking.
My question is: Is my approach to this okay, and if it is how can i get the list( im using an std::map<std::string, Client> ) sent to the client though an sf::Packet. If my approach is not okay, what is a better approach?