Framecap in ScummVM?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Locked
elvisish
Posts: 55
Joined: Tue Mar 12, 2013 5:43 pm

Framecap in ScummVM?

Post by elvisish »

Is there a framecap or framerate limit in ScummVM? I'm interested since a lot of games for it wouldn't go much about 60fps, usually about 30fps. Is there an actual cap on the rendering side of ScummVM at all? FRAPS gives me 100+fps for ScummVM running Maniac Mansion.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

There is no such thing as frames per second in ScummVM. Your question is not valid in our context. Every engine runs at their own speed which often ruled by the game scripts, and all of that, in turn, is served by the backends. The only place where the FPS is more or less steady in ScummVM is the video playback (if any). Some backends, particularly console ones send screen updates at a fixed frame rate, but that means that you potentially could have the frame skip there.


Eugene
elvisish
Posts: 55
Joined: Tue Mar 12, 2013 5:43 pm

Post by elvisish »

sev wrote:There is no such thing as frames per second in ScummVM. Your question is not valid in our context. Every engine runs at their own speed which often ruled by the game scripts, and all of that, in turn, is served by the backends. The only place where the FPS is more or less steady in ScummVM is the video playback (if any). Some backends, particularly console ones send screen updates at a fixed frame rate, but that means that you potentially could have the frame skip there.


Eugene
I was interested whether ScummVM itself rendered with a framecap, rather than the game engine. Or does ScummVM use vsync to keep the frames at a solid 60fps?
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

No, there is nothing even close to that. Engines call screen update up to 200 times per second, and normally there are dirty rectangles involved, so the frames are not even redrawn.

The FPS topic normally belongs to hardware or hardware emulators. ScummVM is none of these.


Eugene
elvisish
Posts: 55
Joined: Tue Mar 12, 2013 5:43 pm

Post by elvisish »

sev wrote:No, there is nothing even close to that. Engines call screen update up to 200 times per second, and normally there are dirty rectangles involved, so the frames are not even redrawn.

The FPS topic normally belongs to hardware or hardware emulators. ScummVM is none of these.


Eugene
Ahh so technically the update redraw cap is 200 per second? Does scummvm ever update any higher than that, or is 200 the limit?
bert3
Posts: 7
Joined: Tue Jun 05, 2018 10:19 am

Post by bert3 »

as sev stated serveral times:
-Your question is not valid in our context. Every engine runs at their own speed which often ruled by the game scripts

-No, there is nothing even close to that. Engines call screen update up to 200 times per second, and normally there are dirty rectangles involved, so the frames are not even redrawn.
there is no stable frame rates like in hardware emulators - the behavior is unique to scummvm and depends on the engine/game/scripts - it could happen that there is no frame update at all if nothing happens which needs screen-update
Does scummvm ever update any higher than that, or is 200 the limit?
what are you trying to archive?
User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Post by Dark-Star »

elvisish wrote:
sev wrote:No, there is nothing even close to that. Engines call screen update up to 200 times per second, and normally there are dirty rectangles involved, so the frames are not even redrawn.

The FPS topic normally belongs to hardware or hardware emulators. ScummVM is none of these.


Eugene
Ahh so technically the update redraw cap is 200 per second? Does scummvm ever update any higher than that, or is 200 the limit?
Which part of "there is no frame rate cap" do you not understand? Engines can update parts of their window as often as they want. 200 is not a cap, it's just what has been seen as current maximum in some of the engines. If there is a cap, then it's coming from your O/S or from your display...
elvisish
Posts: 55
Joined: Tue Mar 12, 2013 5:43 pm

Post by elvisish »

Dark-Star wrote:
elvisish wrote:
sev wrote:No, there is nothing even close to that. Engines call screen update up to 200 times per second, and normally there are dirty rectangles involved, so the frames are not even redrawn.

The FPS topic normally belongs to hardware or hardware emulators. ScummVM is none of these.


Eugene
Ahh so technically the update redraw cap is 200 per second? Does scummvm ever update any higher than that, or is 200 the limit?
Which part of "there is no frame rate cap" do you not understand? Engines can update parts of their window as often as they want. 200 is not a cap, it's just what has been seen as current maximum in some of the engines. If there is a cap, then it's coming from your O/S or from your display...
Why is the cursor rendered smooth? The old games like Maniac Mansion never were, they had jerky cursors. FRAPS reports 60fps for MM, so there's some limitation of how many update draws ScummVM will render somewhere.
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Post by dreammaster »

elvisish wrote:Why is the cursor rendered smooth? The old games like Maniac Mansion never were, they had jerky cursors. FRAPS reports 60fps for MM, so there's some limitation of how many update draws ScummVM will render somewhere.
Cursor display relies on the engine calling ("polling") the events manager many times a second, and during that, the backend has responsibility for rendering the cursor if mouse moves have changed the position. So if you move the mouse really fast, you could end up causing the backend to do hundreds of updates per second, above and beyond the screen updates done for the game itself. Though in practice, most engines tend to have a delay of several milliseconds between poll calls, so the cursor redraw rate even for rapid movement probably won't go excessively high.

Again, though, the cursor updates the backend does for the cursor is independant of any updates it goes for the game, so you can't say it has a given frame rate. Particularly since, as I said, the cursor updates are only done during event calls when the cursor is moved, or the game background underneath it changes.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

elvisish wrote: Why is the cursor rendered smooth? The old games like Maniac Mansion never were, they had jerky cursors. FRAPS reports 60fps for MM, so there's some limitation of how many update draws ScummVM will render somewhere.
This has bee already answered by me earlier: http://forums.scummvm.org/viewtopic.php?t=14692

Locking both topics due to the violation of forum rule #7.


Eugene
Locked