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.

Dark GDK / Multisync issue

Author
Message
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 28th Aug 2009 00:34
Ive been working on multisync for about a week and a half trying to figure out a way to update player movement in the game(both client and server)

Right now i have


With this , it creates a player for about a second and deletes or moves it, then the client screen goes black and FPS drops literally to 0(i know because the player coordinates update eventually)

SO i need to know how to do this successfully.
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 28th Aug 2009 18:28
well your multiplayer loop is incorrect in multiple ways...

1) the if statement to call DS_SendCoord() will never be true

2) if it ever was true, it would not be a real timer... try using dbTimer() instead.

3) the timer needs to be about 10ms or more to keep the client from flooding the server with packets

SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 29th Aug 2009 00:30
1. -_- i ALWAYS do that with for loops for some reason

2. The loop would be a 'real' timer as that is really all a timer is, a loop

3. besides any of that , as it was just a test, i get the same problem
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Aug 2009 12:32 Edited at: 29th Aug 2009 12:37
1. Fix your indentation.

2. In your TryMultiSyncServerConnect function rather than waiting 5000ms for a message, simply use a loop to check until there is a message:



3. In your DS_MessageLoop function I see you always try to send a string first, yet I never see you read this string anywhere. The data that you read from the message must match the data that was written in it, or it'll read nonsense data.

4. Change the Multiplayer loop, currently it does nothing. Use a timer-based method like this:



Also, it'd be useful to see the rest of your code.

Login to post a reply

Server time is: 2024-11-20 17:31:32
Your offset time is: 2024-11-20 17:31:32