English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 23 September 2018, 23:13   #1
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 459
Smooth fast scrolling?

Something I have always wondered about is how to do smooth fast scrolling.

If we assume the game runs at 50 fps and scrolls one pixel per frame then it can scroll 50 pixels per second. At 50 fps it will take 6 seconds to scroll across the screen.

How do games do quicker scrolling?

Do they just scroll more pixels at one time? And where does AGA 1/4 pixel scrolling come in - can AGA scroll between pixels and wouldn't this be even slower????

Confused - I know I am!
Havie is offline  
Old 23 September 2018, 23:31   #2
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 1,364
Quote:
Originally Posted by Havie View Post
Something I have always wondered about is how to do smooth fast scrolling.

If we assume the game runs at 50 fps and scrolls one pixel per frame then it can scroll 50 pixels per second. At 50 fps it will take 6 seconds to scroll across the screen.

How do games do quicker scrolling?

Do they just scroll more pixels at one time?
Yup, that's exactly how faster scrolling is done. Instead of moving one pixel per frame move 2 or more. Thanks to limits in our eyes/brain (and to a lesser degree earlier forms of display technology) you don't really notice it's less smooth because it's going 'real fast'

Quote:
And where does AGA 1/4 pixel scrolling come in - can AGA scroll between pixels and wouldn't this be even slower????

Confused - I know I am!
Yes, AGA can scroll at less than one pixel per frame. So this would be slower. Why can this still be useful?

Well, it's all about smooth scrolling - if you want to scroll a screen slower than 1 pixel per frame, it may start looking slightly jerky. But with AGA, such a scroll can still be done fully smoothly (as long as the speed >= 1/4 of a lores pixel per frame). Another way to make use of AGA scrolling is when scrolling speeds change. The AGA 1/4 pixel intervals allow for a smoother curve when accelerating or slowing down, which is (again) smoother to look at.
roondar is offline  
Old 24 September 2018, 00:16   #3
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,302
Yep, the subpixel scrolling allows you to move at a much more finely grained range of speeds. So even if 1 pixel per frame is too slow, maybe 2.5 pixels per frame is just right. Without the subpixel scrolling, you would scroll 2 pixels in one frame, 3 pixels in the next, 2 pixels in the next and so on, which will be awful.

Ultimately, it's not about drawing more quickly, it's about moving the correct distance in one frame. Once you move exactly the same distance in each frame, it will appear perfectly smooth, no matter how fast or slow.

Gradual acceleration will also benefit as mentioned, again thanks to a much finer range of speeds that allow something like "anti-aliasing" of the movement.
Daedalus is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
smooth scrolling.is it possible? kirk support.WinUAE 30 01 October 2007 14:57
smooth scrolling sink support.WinUAE 3 20 July 2007 02:16
Smooth scrolling with WinUAE? Tony Landais support.WinUAE 13 30 May 2007 04:55
Smooth scrolling in 100Hz Kintaro support.WinUAE 21 27 February 2003 16:55
Just can't get smooth scrolling Bobbin support.WinUAE 0 23 November 2002 01:52

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 +2. The time now is 03:35.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.05679 seconds with 13 queries