Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Multiplayer Question.

Author
Message
Dark Blade
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location:
Posted: 3rd Mar 2003 04:58
I have made a small two player ping pong game for the purpose of trying out the multiplayer commands. the host sends a memblock to the client with Paddle & Ball position and client sends a memblock back with its Paddle position.
the code works except that the clients buffer starts filling up rapidly. it checks every loop if the ball or paddle has moved and if so it sends a memblock. if I only send a memblock when the paddle moves ignoring the ball movement then the buffer stays at one. Why?
This is over a lan network.

QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 3rd Mar 2003 21:12
the...client...buffer?

Darken the skies, we are god
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Mar 2003 22:14
What is happening is that you are not dealing with the delay caused by you network.

What you may be able to do is throw away all but the last received packet - but only because you are sending full info each time.

Substitute this subroutine and let us know how it goes. I haven't run this code myself but it should work.

Login to post a reply

Server time is: 2024-09-19 22:36:38
Your offset time is: 2024-09-19 22:36:38