Can ScummVM do smooth background scrolling?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
pasapalabra
Posts: 4
Joined: Sat May 30, 2020 11:03 am

Can ScummVM do smooth background scrolling?

Post by pasapalabra »

I'm playing The Dig, and I kinda dislike the way the camera moves in 10px leaps in long stages.

In an old entry of the bugtrack I read ScummVM supports (supported?) smooth scrolling for that game, but if that feature still exists isn't enabled by default. So, how do I enable it? Does it affect other games?
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: Can ScummVM do smooth background scrolling?

Post by criezy »

ScummVM uses smooth scrolling for SCUMM v7+ games, include The Dig, scrolling 1 pixel at a time instead of 8. It is always enabled. I just checked with my version of The Dig from Steam and it seems to work. However one caveat is that it is implemented at the engine level, so at a resolution of 320x200. So when using for example of x3 scaling, the scrolling is actually 3 pixels at a time and not 1. And as a result when for example playing fullscreen (in my case at 1920x1440 resolution), the scrolling is not that smooth (6 pixels at a time for me, since I have a x6 scaling).
User avatar
LogicDeLuxe
Posts: 432
Joined: Thu Nov 10, 2005 9:54 pm

Re: Can ScummVM do smooth background scrolling?

Post by LogicDeLuxe »

While SCUMM V7 and V8 games have pixel exact scrolling, it isn't exactly smooth when the game renders only at 10 fps, which is a limitation of the game scripts itself.
Also, while general scrolling could be smoothed out to a higher frame rate, keep in mind that parallax scrolling is scripted and thus not easy to smooth out that way.
Native Amiga SCUMM V5 has smooth scrolling, but they removed parallax scrolling in those games.

Maybe interpolation could be implemented, which has not only to interpolate the screen shift, but also the movement of any object. But then again, the Monkey Island SE did that in HD, and it didn't match well with the still limited animation frames. They added extra frames in Monkey 2 SE to improve this, but those frames are not part of the original resources, so no option for ScummVM.
pasapalabra
Posts: 4
Joined: Sat May 30, 2020 11:03 am

Re: Can ScummVM do smooth background scrolling?

Post by pasapalabra »

Thank you for your answers and sorry for my delay in answering back.

I've check the game. It's true the game runs at 10fps-ish like LogicDeLuxe said, so most of the lack of smoothness comes from there... but I still have doubts about the smooth scrolling.

After recording the game during background scrolling scene I notice after each frame moves the camera moves 6px, not 1px, at its native resolution. Is it the expected behaviour of smooth scrolling at lower framerates? (so the engine updates the camera 1px every 1/36 seconds, but those changes are only visible later every 1/6 second, when Scummvm renders the frame)

I attach a recording and screenshots of 3 successive frames.

https://drive.google.com/file/d/1LKSKEb ... sp=sharing
https://imgur.com/a/5P7O0VG

PD: Is possible for ScummVM, a re-implementation of the original engine, to overcome the limitations of Scumm and render those games at higher framerates? Or is there technical reasons that make it impossible, like it would mess with the timings of the game?
Last edited by pasapalabra on Thu Jun 25, 2020 10:31 am, edited 3 times in total.
User avatar
LogicDeLuxe
Posts: 432
Joined: Thu Nov 10, 2005 9:54 pm

Re: Can ScummVM do smooth background scrolling?

Post by LogicDeLuxe »

pasapalabra wrote: Fri Jun 19, 2020 11:16 am Is possible for ScummVM, a re-implementation of the original engine, overcome the limitations of Scumm and render those games at higher framerates?
Like I said, this is not a limitation of the engine, but of the game scripts. SCUMM is able to handle higher frame rates, but this was rarely done, since computers at the time weren't powerful enough to handle that.
One rare example with a higher frame rate is in the first Monkey Island game (although not a scrolling example), when you first talk to the Fettucini Brothers, they run to you in a ridiculously fast pace.
pasapalabra
Posts: 4
Joined: Sat May 30, 2020 11:03 am

Re: Can ScummVM do smooth background scrolling?

Post by pasapalabra »

LogicDeLuxe wrote: Fri Jun 19, 2020 12:58 pm
pasapalabra wrote: Fri Jun 19, 2020 11:16 am Is possible for ScummVM, a re-implementation of the original engine, overcome the limitations of Scumm and render those games at higher framerates?
Like I said, this is not a limitation of the engine, but of the game scripts. SCUMM is able to handle higher frame rates, but this was rarely done, since computers at the time weren't powerful enough to handle that.
One rare example with a higher frame rate is in the first Monkey Island game (although not a scrolling example), when you first talk to the Fettucini Brothers, they run to you in a ridiculously fast pace.
Then, if the background scrolling is defined by the script, moved at 10fps and in chunks of 6px due to the limitations of that time hardware, what is affected by the smooth scrolling feature mentioned in the linked bugtrack? The mouse cursor? (which runs at 60fps)
Last edited by pasapalabra on Sat Jun 20, 2020 2:48 pm, edited 1 time in total.
User avatar
LogicDeLuxe
Posts: 432
Joined: Thu Nov 10, 2005 9:54 pm

Re: Can ScummVM do smooth background scrolling?

Post by LogicDeLuxe »

pasapalabra wrote: Fri Jun 19, 2020 2:12 pm The mouse cursor? (which it runs at 60fps)
The cursor was never affected by the scripted frame rate. On C64 and Amiga, it was controlled in a raster interrupt. It could get laggy on slow PCs, though, which didn't use hardware sprites for that.
Btw, before SCUMM V7, the scrolling was always in 8 pixel steps, and it was with pixel precision from then on.
Post Reply