|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [gameprogrammer] Re: Multiplayer networking advice
Not yet, I'm still working on it. I've never coded a server before so I've been writing stuff down and pondering it. Any clues on how to handle multiple connected people would be helpful though as I've been stuck on how to do that. (._.) I was think of having the server log the IP addresses that connect and sending them data each update. For instance: CLIENT CONNECTS SERVER GETS THE IP ADDRESSES AND CONFIG STUFF SERVER CHECKS THE USERNAME AND PASS IF O.K. LOG THE IP ADDRESS (I guess keep it in memory or write it to a file... I'm not terrible sure) SEND THE DATA ARRAYS TO THE CLIENT SEND DATA TO THE OTHER CLIENTS BLAH BLAH BLAH Am I on the right track? Also, for moving and stuff like that I've come up with this: + = client [] = server OnKeyDown (lets say to the left) Client#1's character moves left OnKeyUp Client#1 sends his position to the SERVER + -------> [] And SERVER sends his position to Client#2,3,ect and the screen updates + <------- [] -------> + Same thing would go for chating... Client#1 sends data to the server and the server sends it to the other clients. Is that an efficient way to handle it? Thanks a lot for your help, Taylor On Jan 27, 2008 3:56 PM, Alan Wolfe <alan.wolfe@gmail.com> wrote: Seems like a decent way to go about it (: -- -Taylor Peterson
|
|