Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 need help with sending data over the net
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DanShadow




PostPosted: 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 )
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Feb 05, 2004 6:19 pm   Post subject: (No 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DanShadow




PostPosted: Fri Feb 06, 2004 1:58 pm   Post subject: (No subject)

hmm...so is it all sent over 1 big string variable? If so....how do I get the client to differentiate the different variables from 1 variable...something like this??:
code:

%After server sends information
get:dataStream,player(1).x
get:dataStream,player(1).y
%etc.....but without adding " : * " to get the whole thing...just getting
%one at a time.
Dan




PostPosted: Fri Feb 06, 2004 5:35 pm   Post subject: (No 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
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
DanShadow




PostPosted: Wed Feb 11, 2004 3:59 pm   Post subject: (No subject)

Can you give me an example of how I might do that? You kinda lost me, lol.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: