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 Laggs All To Hell?

Author
Message
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 20th May 2009 07:29
Well I finally got Multisync working, or at least I thought so,

My client connects to the server, Sends the initial message, The server recieves it.

BUT then my entire program is lagging really bad and about 30-60 seconds in it gets disconnected from my server. I've looked and looked over the code but I don't see the problem

Here is the code for all to see!
Client connect function:


Where its being called:


It does not appear to be looping or anything to cause lag..I don't understand it one bit, if someone needs more code I will be happy to post!

Thanks for helping =]
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 20th May 2009 14:00
I don't know if this will help, but you should slow down the loop by putting dbWait(1) in it. What do you mean by "lagging really badly"?

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 20th May 2009 14:37
Well the fps drops rapidly, like the cpu is working really hard or something.
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 20th May 2009 19:39
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 20th May 2009 23:05
I'll look into it...
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 21st May 2009 07:48
which is lagging? the client or the server?

also, im not sure, but i believe you MUST check for messages both on the server and the client.

Quote: "Maybe you should use mikenet"


no need, MultiSync works fine over here

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st May 2009 08:06
Quote: "Maybe you should use mikenet"

Yes this surely explains his problem.

Quote: "Well the fps drops rapidly, like the cpu is working really hard or something. "

I'm not sure how you know this since your application doesn't appear to be displaying the fps anywhere. It will use maximum CPU unless you enable v-sync or use the Sleep function in your main loop.

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 21st May 2009 08:08
Well, i'm designing a mmo so tcp really does not suit my needs. The client was lagging, and I wasnt checking for messages on it.

I got MikeNet but whenever I #include the .h file I get some wierd compiler messages



I'm pretty sure I got the correct version of MikeNet and I am 100% sure The files are in the correct spots.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 21st May 2009 10:00
In project settings change Configuration Properties -> C/C++ -> Code Generation -> Runtime Library to Multi-threaded. I did send TGC an update that included a debug version but they haven't put it up...

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 21st May 2009 10:23
Ah, it compiles!! =D i'll be using MikeNet for now...until one day I may come accross $20 that would be very well spent on Darknet. =]
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 21st May 2009 10:48 Edited at: 21st May 2009 10:49
Uh, Wow, Okay... I've done some more coding and...err...well... there are a 'few' errors when I try and compile..( I am using MikeNet v1.1.1)



I will post any area of my code if anyone requests.
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 21st May 2009 11:22
Looks like I forgot to:

- Goto configuration properties, linker, input and enter 'MikeNet.lib WS2_32.lib' in additional dependencies and click OK:

tehehe all is well besides the random sparkys warnings =P

Login to post a reply

Server time is: 2024-10-01 01:27:38
Your offset time is: 2024-10-01 01:27:38