I'm currently trying to use a websocket server to load a basic chatroom for turn based multiplayer.
The websocket server sends Json strings over which includes "SID" which has a unique # (ex. "1120"). The SID is the unique instance for each user to determine who they are. When the user first enters the game I have their SID# broadcasted for everyone else already in the room. When the game is eventually running the SID's will send JSON information back and forth to each other.
Currently I'm trying to make a list box not unlike the multiplayer example that shows each SID instance for every user that is currently logged in before or after so all users will know who is online. I'm taking the json information and putting it into a dictionary through the JSON plugin. At this point I would like to have a list of everybody that is online that you can challenge to a game by their SID #.
What is the best method of making such a list?? Should all the SID's just be transferred into an array and then populated onto the list?? If so how do I maintain an up to date list of who is online and who isn't. I'm not really sure what to do next I might be over thinking things. Any thoughts or ideas are appreciated thank you.