Amiga style scrolling for Lucas adventures

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

Moderator: ScummVM Team

ancalimonungol
Posts: 22
Joined: Mon Feb 23, 2009 2:59 am

Amiga style scrolling for Lucas adventures

Post by ancalimonungol »

I'd love to see Amiga style scrolling for Lucas games.

What I mean by this is that when the screen is scrolling, it doesn't jump 10 pixel by 10. It always scroll 1 pixel by 1 at a time

It would definitely make a huge difference.

What do you think? Would you like to have this?
and will it ever be done?
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Re: Amiga style scrolling for Lucas adventures

Post by bobdevis »

There is a thread, or portion of a thread, somewhere here that explains the problem. I can't find it at the moment, so here is my explanation from memory that may not be 100% correct.

Basically because of how the original Scumumm engine works and because monitors these days run a differed refresh rare then they used to, this stutter-scrolling problem is never going to go away completely.

Modern games almost always use frame-rate based drawing engine. Everything is redrawn x times per second regardless of whether it needs redrawing. You can tune the redraw rate to suit any monitor settings and always have a smooth looking result.

Scumm-like games have a event based drawing engine. Elements on screen are only redrawn when they change with a fixed time interval.
If that time interval is not in perfect sync with your monitor refresh rate you will see stutter-scrolling.
This is not really fixable unless you do a BIG revision of the old game engines.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Re: Amiga style scrolling for Lucas adventures

Post by fingolfin »

bobdavis, actually, that is not the issue here at all :)

ancalimonungol, smooth horizontal scrolling is in principle possible in all SCUMM games; we implemented it for V7/V8 games (Dig, FT, COMI), and the relevant code would be trivial to adapt for older SCUMM games. I think there even is (was) a patch for this on our patch tracker.
The main reason this is not implemented (from my perspective) is that nobody so far got around testing how this affects older SCUMM games -- like, it might throw off scripting at some points, like accidentally revealing parts of the pictures you are not supposed to see yet. Hopefully this won't happen, but this uncertainty means that we can't just unconditionally enable it.

But since we just finished a major release, we could consider enabling this experimentally, and see where it leads us :).
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Re: Amiga style scrolling for Lucas adventures

Post by Longcat »

I vote yes!(if I have a vote that is:)
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Re: Amiga style scrolling for Lucas adventures

Post by marzipan »

If I recall correctly, FM-Towns SCUMM titles also have similarly smooth scrolling. Or at least that's how I see it behave through Unz.
User avatar
Kaminari
Posts: 275
Joined: Mon Oct 24, 2005 2:25 am
Location: Paris, France
Contact:

Re: Amiga style scrolling for Lucas adventures

Post by Kaminari »

hippy dave
Posts: 129
Joined: Mon May 05, 2008 3:37 pm

Re: Amiga style scrolling for Lucas adventures

Post by hippy dave »

Jonatan wrote:I vote yes!(if I have a vote that is:)
ditto :D
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Re: Amiga style scrolling for Lucas adventures

Post by fingolfin »

Sorry, votes won't help with this.
User avatar
marticus
Posts: 77
Joined: Sat Nov 26, 2005 11:32 am

Re: Amiga style scrolling for Lucas adventures

Post by marticus »

fingolfin wrote:Sorry, votes won't help with this.
I vote that they will :D
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Re: Amiga style scrolling for Lucas adventures

Post by LordHoto »

marticus wrote:
fingolfin wrote:Sorry, votes won't help with this.
I vote that they will :D
I vote that the people voting for this feature should implement it and post a patch on our patch tracker.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Re: Amiga style scrolling for Lucas adventures

Post by Longcat »

As I understood it, it already is implemented but not enabled.

So to clarify, I'm not voting that some other person(dev) should do a lot of hard work for me, but that the feature is enabled so we can help out testing it.

But if I got things wrong, then please consider my vote unvoted.
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Re: Amiga style scrolling for Lucas adventures

Post by LordHoto »

Fingolfin talked about a patch on the patch tracker, but I can't find any (open) one at least. Apart I think that there is no disabled support for it, but rather the newer SCUMM engine code has support for it, while the older lacks it. So hopefully one can adapt it for the older SCUMM versions too.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Re: Amiga style scrolling for Lucas adventures

Post by fingolfin »

There is no patch tracker item, just a feature request.

I just had a look at the code to refresh my memory of how I implemented smooth scrolling in V7+ engines. Here's a brief rundown on what the issue is and what needs to be done: In old SCUMM versions, the engine would only scroll in steps of 8 pixels (mostly for efficiency reasons; old PC hardware wasn't well suited to "smooth" scrolling). This means that the camera position (stored in the ScummEngine::camera._pos variable) is only changed in increments of 8.
Now, with V7+ games, arbitrary increments are possible. With some effort, this part is relatively easy to extend to older engines.

But the harder part is the camera *control* logic. Which is indeed quite different in newer SCUMM versions. A naive approach to implement "smooth scrolling" in older SCUMM games could be done by simply changing the increments from 8 pixels to 1 pixel. BUT that won't be enough, because now you'd end up with terribly slow scrolling... because each scrolling step would happen with the same speed as before, just now there'd be 8 times as many... so the camera would move 8 times slower (one pixel at a time). So, one would have to also "speed up" the camera adjustment.

Moreover, to make camera movement look more natural and less abrupt, SCUMM V7+ used varying camera speeds, and camera acceleration: Instead of moving from start to end and stopping abruptly, it'll slow down at the end just before reaching the final destination. Granted, this is sugar on the cake, but if one gets all the rest done, one might want to do something like this, too, I guess.


Anyway, I hacked up a crude and dirty proof of concept patch, which suffers from the mentioned speed problem, but might give anybody who is interested in researching this a starting point. Note again that it is *crude and dirty*. E.g. USE_SMOOTH_SCROLLING is a quick&dirty hack (probably better to add a new member var ScummEngine::_useSmoothScrolling instead).
ancalimonungol
Posts: 22
Joined: Mon Feb 23, 2009 2:59 am

Re: Amiga style scrolling for Lucas adventures

Post by ancalimonungol »

So how did the Amiga version work? Couldn't someone check the Amiga version to see how it worked? (I'm probably talking about things I have no idea about)
User avatar
LogicDeLuxe
Posts: 437
Joined: Thu Nov 10, 2005 9:54 pm

Re: Amiga style scrolling for Lucas adventures

Post by LogicDeLuxe »

Eventhough, the Amiga hardware was more versatile, this kind of hardware accelerated soft-scrolling can be done with VGA graphics too (scrolling top part, fixed bottom part). Oddly enough, they didn't. Most VGA side-scrolling games were pretty smooth.

I also wondered why they didn't on the C64 while most other games did. But it was probably for performance reasons. The C64 has no double buffer support for the color RAM, which made such stuff a bit tricky, and would have had an impact on the performance indeed.
Post Reply