Posted on 2001-07-14
I am making a little version of pong, but enabling it for the net. They way I have made the net code is that every time your paddle is moved, the GetData method of Winsock is called, sending the paddles Top property to the server. The problem I have is that the server recieves several values at once, like 200 200 200 200 220 220 220. When what I want is that on data arrival to be is that it recieves 200 by itself and then 220 in a seperate arrival. Instead, Winsock seems to buffer the values being sent together. What I have done to get round is to take the first value from this string and use that, the problem with this is that the movement is very jumpy. What I am after is two simple programs, one a server program and one a client program. I want the programs to connect and when the up key or down key is pressed on the client program, the block moves and sends its position to the server through the Winsock, and the block on the server side moves SMOOTHLY. Anything similar to this will be fine.