Computer Science Canada

need help with sending data over the net

Author:  DanShadow [ Thu Feb 05, 2004 11:31 am ]
Post subject:  need help with sending data over the net

Me, and a group of a few friends have started a project on an online, multiplayer, 2D graphical RPG. We are trying to base the multiplayer aspects on the multi-user chat server created by IceMaster. I have 4 people working on discovering how to send variables across the net to the server, and resend them all to all the different clients...but the server people are having difficulty finding out how to send data to the server...then redistribute it all to the clients. Does anybody know how to accomplish this?? If so, thank you very much!! (and your name would go in the Special Thanks part of the credits....or you could join our team Wink )

Author:  Tony [ Thu Feb 05, 2004 6:19 pm ]
Post subject: 

well esensially what you need to do is to encode the variable values in a 256 chars string (max allowed for turing's string variable) and send that over chat code.

Then client side decodes to update the values. Such as you would know that X position of the other character is say characters 10 & 11 for example.

Author:  DanShadow [ Fri Feb 06, 2004 1:58 pm ]
Post subject: is it all sent over 1 big string variable? If do I get the client to differentiate the different variables from 1 variable...something like this??:

%After server sends information
%etc.....but without adding " : * " to get the whole thing...just getting
%one at a time.

Author:  Dan [ Fri Feb 06, 2004 5:35 pm ]
Post subject: 

u need to make your self some protcale. i did this for part of the dTeam project that whent bad.

what u do is make the 1st char rep the var, like for player 1 socre make the 1st char in the string a value of one for player 2 a 2 and so on.

then u uses ifs and such to decode everything.

EDIT: sory i did not read ur post right i think

as i side above u make the 1st few chars have the endoing for what they are and then use ifs to take the right data out and put it in the right spot.

like if the 1st char value is 1 then then next 3 are player 1 score, player 2 score and player 3 socre in that order, or w/e

Author:  DanShadow [ Wed Feb 11, 2004 3:59 pm ]
Post subject: 

Can you give me an example of how I might do that? You kinda lost me, lol.