SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Help

Reply
 
Thread Tools Search this Thread
Old 01-14-2018   #1
Larztard
Yeah...
 
Larztard's Avatar
Default SRB2 Constant 30 FPS

I was already in the middle of a discussion about this problem before Discord took a nose dive but I wanted to post this to see if anyone else has this problem. Basically, SRB2 runs at a constant 30/35 FPS. At first, I thought it was the new version, 2.1.20, but then I tested other exes out like PlusC and TopDown and it's the same thing every time. 30/35 FPS on menus and when the level first loads, it's at 35/35 FPS and then drops to 30 and stays constant. Just wondering what could be the issue unless if it's only just me.

Spoiler:

__________________
YouTube

Last edited by Larztard; 01-14-2018 at 09:42 PM.
Larztard is offline   Reply With Quote
Old 01-15-2018   #2
choalover
チャオノコイビト
Default

Oh, you must be using a 30 fps monitor. Just kidding.
__________________
I love the new SRB2 2.1.17 update so far.
choalover is offline   Reply With Quote
Old 01-15-2018   #3
toaster
トースタちゃん
Developer
 
toaster's Avatar
Default

As per discussion on the Discord: It's the Spectre/Meltdown mitigation on hardware over two years old. It turns out SRB2 *hates* this. It affects me too. I don't know what to do. I don't know what can be done. Sorry.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
toaster is offline   Reply With Quote
Old 01-16-2018   #4
Rob
Administrator
 
Rob's Avatar
Default

I want to expand a little on what toaster said, just for clarity. I'll start with a link:

https://cloudblogs.microsoft.com/mic...ndows-systems/

This is the result of an update to Windows. At this time, we are not sure exactly why this is affecting SRB2. Obviously, we are looking into It to see what we can do. It is worth noting that SRB2 is not the only thing affected by this update, so we're not alone in this issue. Unfortunately, until we know more, there's not much we can do about this. If we do find a fix, you can expect a 2.1.21 hotfix for this issue.
Rob is offline   Reply With Quote
Old 4 Weeks Ago   #5
SSNTails
What part of 'RETIRED' don't you understand?
 
SSNTails's Avatar
Default

I'll go out on a limb and say it has to do with the timer that SRB2 uses to time the game loop at 35fps (GetTickCount()? QueryPerformanceCounter()?). Might be worth looking into an alternative timing method.
__________________
Roly Poly Putt & TraceRace - Now out for Android, iPhone, iPad, and iPod Touch - http://www.spaddlewit.com
Follow me on twitter: http://www.twitter.com/SSNTails
SSNTails is offline   Reply With Quote
Old 4 Weeks Ago   #6
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Quote:
Originally Posted by SSNTails View Post
(GetTickCount()? QueryPerformanceCounter()?)
Just checked, and it appears I_GetTime for Windows uses a combo of QueryPerformanceCounter() and pfntimeGetTime() (a pointer to winmm.dll's "timeGetTime") by default, but can use GetTickCount() instead if the game is launched with "-gettickcount" (for the imprecise system timer) in the command line.

...This makes me curious whether -gettickcount improves performance for anyone at all, if SSNTails is on the right trail.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.

Last edited by Monster Iestyn; 4 Weeks Ago at 02:03 AM.
Monster Iestyn is offline   Reply With Quote
Old 4 Weeks Ago   #7
SSNTails
What part of 'RETIRED' don't you understand?
 
SSNTails's Avatar
Default

Quote:
Originally Posted by Larztard View Post
10char
Larztard, try running SRB2 with -gettickcount , and let us know if it still runs at 30fps.
__________________
Roly Poly Putt & TraceRace - Now out for Android, iPhone, iPad, and iPod Touch - http://www.spaddlewit.com
Follow me on twitter: http://www.twitter.com/SSNTails
SSNTails is offline   Reply With Quote
Old 4 Weeks Ago   #8
Larztard
Yeah...
 
Larztard's Avatar
Default

Quote:
Originally Posted by SSNTails View Post
Larztard, try running SRB2 with -gettickcount , and let us know if it still runs at 30fps.
Sorry, I thought I had replied to this thread on Sunday night. I can confirm that after using -gettickcount in the parameter for the launcher, it was smooth sailing for custom levels as well as a complete run-through of vanilla. Even removing -gettickcount from the custom parameter box in the launcher it was still 35/35 FPS.
__________________
YouTube
Larztard is offline   Reply With Quote
Old 3 Weeks Ago   #9
SSNTails
What part of 'RETIRED' don't you understand?
 
SSNTails's Avatar
Default

Ladeeez and gents, we have a winnar!

But GetTickCount() is pretty imprecise. I'd recommend looking at real replacement options.
__________________
Roly Poly Putt & TraceRace - Now out for Android, iPhone, iPad, and iPod Touch - http://www.spaddlewit.com
Follow me on twitter: http://www.twitter.com/SSNTails
SSNTails is offline   Reply With Quote
Old 3 Weeks Ago   #10
Larztard
Yeah...
 
Larztard's Avatar
Default

Quote:
Originally Posted by SSNTails View Post
Ladeeez and gents, we have a winnar!

But GetTickCount() is pretty imprecise. I'd recommend looking at real replacement options.
Hey, that's pretty good! Glad I was able to help find a fix for a crucial bug.
__________________
YouTube
Larztard is offline   Reply With Quote
Old 3 Weeks Ago   #11
toaster
トースタちゃん
Developer
 
toaster's Avatar
Default

GetTickCount had a performance impact for me, sadly. At least on my end, it was a set SDL_HINT_ something value to 2 (sorry for having a useless sleepy memory, need to dig it up on Discord) which fixed my issues.

I know Alam is digging into this, though.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
toaster is offline   Reply With Quote
Old 3 Weeks Ago   #12
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

For context as to what toaster is talking about, Alam was recently experimenting with making I_GetTime use SDL2's own native timer API (where SDL_GetTicks is used), and had people also set SDL_HINT_TIMER_RESOLUTION to 2 to change the resolution of the timer. That is, before he applied it to the code directly later I think.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.

Last edited by Monster Iestyn; 3 Weeks Ago at 01:19 PM.
Monster Iestyn is offline   Reply With Quote
Old 3 Days Ago   #13
TheGuyThatDrawsThings
I'M THE TRASHMAN. #EATTRASH
 
TheGuyThatDrawsThings's Avatar
Default

Quote:
Originally Posted by SSNTails View Post
Ladeeez and gents, we have a winnar!

But GetTickCount() is pretty imprecise. I'd recommend looking at real replacement options.
I sense a 2.1.21.
https://www.youtube.com/watch?v=nqaZ4j69JeA
__________________
WHOM DARES ENTER MY VILE LAIR?
TheGuyThatDrawsThings is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.