cnjmorris
May 8th, 2001, 04:15 PM
I am making an online version of a board game and I need some suggestions on handling the logins. PURPOSE: assigning turn order.
Currently they log in and are assigned a connection using a winsock array.
Lets assume they are assigned wsS(1)
1) Their client rolls a die and sends result to server. I need a way for server to store the persons login name and their roll. I am trying to figure out how to store the itms something like this player(name,roll). Is this possible? Is there a better way?
I looked at some info on arrays and collections but didn't really see examples of what I want. It looks like I can't do this:
players(1,1) = player,roll
If I were to use a collection would this work:
dim myPlayers as New Collection
myPlayers.Add Player, Roll
If I did that how would I keep track of player index? How do I call them back out of a collection?
__________________________________________________
2) If someone is disconnected I need to figure out how to get them reconnected and retain all the possessions that their character had. I thought about having the server assign the players a "session password" and send it to the client which would save it to a txt file. When they try to connect again it would match their password with the servers for that player. Is this a good or bad idea?
Currently they log in and are assigned a connection using a winsock array.
Lets assume they are assigned wsS(1)
1) Their client rolls a die and sends result to server. I need a way for server to store the persons login name and their roll. I am trying to figure out how to store the itms something like this player(name,roll). Is this possible? Is there a better way?
I looked at some info on arrays and collections but didn't really see examples of what I want. It looks like I can't do this:
players(1,1) = player,roll
If I were to use a collection would this work:
dim myPlayers as New Collection
myPlayers.Add Player, Roll
If I did that how would I keep track of player index? How do I call them back out of a collection?
__________________________________________________
2) If someone is disconnected I need to figure out how to get them reconnected and retain all the possessions that their character had. I thought about having the server assign the players a "session password" and send it to the client which would save it to a txt file. When they try to connect again it would match their password with the servers for that player. Is this a good or bad idea?