For my multiplayer game I’m using Advanced Sessions plugin for connecting the clients.
Now I need to be able to send info the the server (maybe player nickname, some numbers/strings and other variables based on what they are doing on the map) and when the players let’s say presses “Tab” they can see a list with all the player names, numbers of items collected, number of kill… and so on.
What should I use to be able to send all the data I need to the server and from there to each player that ask for it on a key press or maybe the server will automatically send it to all players to let them know something important happened, like a player finished a certain objective?
Normally I was thinking you would have an Array on the server, and each element is a player where all the info you need is stored about it, and when a players does something that needs an update, like picked another item, it would send to the server it’s id and the value that need to be changed.
And then the player say pressed “Tab” he will get from the server that array with the players and in the background the information is filtered to what it needs to be shown.
Now the problem is that I don’t know how to send that data. Or maybe there is an even better way to do all that.