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.

DLL Talk / multisync seems to cause massive framerate loss

Author
Message
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 21st Sep 2007 08:01
just running the following code drops the framerate from 1200 to 15



That's not even processing all the messages at once, it's having to process the next message in the next frame. Imagine if it were to process them all in one frame with more than a few players. Heck, that kind of framerate loss would probably kill it.

When I set it up to only check every 100ms using a timer, it slowed down to 40-45fps.

There must be some faster way of checking for new messages... Or maybe have the plugin call a specified function when there's a new packet?

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Sep 2007 19:04 Edited at: 21st Sep 2007 19:05
The command net get message simply checks a pointer (in the case that there are no messages), so that's most probably not what's causing the slowdown. With that code I get no slowdown here.

One thing that may cause a slowdown is if you have 8KB of outstanding data to send, and the other peer hasn't tried receiving it yet. In this case the sender's application will just freeze until the data can be sent.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 21st Sep 2007 19:33
I'd release my entire source but I'm hoping to go commercial.

The thing is though, if I comment out that one line, the framerate doesn't drop so significantly and stays between 900 and 1200. Without commenting it, it goes to 11 and occasionally hits 12 for a brief moment before going back to 12.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Sep 2007 20:05 Edited at: 21st Sep 2007 20:05
Very strange. Perhaps it's something to do with the way you're processing the message? Can I see that function? Otherwise you could just test it by storing the result of net get message (rather than calling your function) and see if it still runs slow.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 21st Sep 2007 20:09 Edited at: 21st Sep 2007 20:13
I just went back to an yesterday's version of my source. This morning, I started trying to migrate it over to using the player object for orientation instead of the camera.

So now I'm back on the camera version and dropped in the code for displaying FPS and now it's holding steady at 240fps. 240fps is fine. It's still a major drop, but it's not an unacceptable one

Now, why would using object position instead of camera position cause that one unrelated command to cause such a drastic framerate loss?

This is definitely a strange bug and probably related to my code. You know what's strange is just yesterday, functions which previously compile were refusing to compile. It was hanging up on if statements. Here's one of the functions doing that.



I'm not using this function anymore, I'm using curvevalue instead because it's doesn't make objects zigzag as much. So it's now commented out, but the fact is it was compiling before, but now the compiler is hanging on the second occurance of "else". This is just weird.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.

Login to post a reply

Server time is: 2024-05-10 18:57:34
Your offset time is: 2024-05-10 18:57:34