Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Smooth Scrolling   Message List  
Reply | Forward Message #10283 of 15019 |
Re: [gbadev] Smooth Scrolling

Are you sure about other GBA games scrolling smoothly at various speeds? I
imagine they would all go a little blurry when they are doing a non-integer
scroll. What you are doing (adding 2 then 1, then 2, 1 ... pixels) will have the
same effect as storing your scroll position in floating or fixed point and then
converting to integer later so I doubt that is the problem. I think if you have
seen games going at a 1.5 pixel scroll rate and looking smoother than yours then
perhaps there is a bug in your code, or you are not going at 60FPS (sorry 59.727
;-) ). The other possibility is that it is just a perceptual difference; they
may be using lower contrast colors in their scene or they may have multiple
parallax layers. If you have a lot of parallax layers and always make them
scroll at integer speeds regardless (since they are just there for visual effect
anyway) then perhaps even when the foreground layer is scrolling non-integer the
parallax layers still make the whole effect look smoother than just the
foreground on it's own. There is also a perceptual difference when there is a
lot of action on the screen, once again distracting you from a not-so-silky
scroll on the foreground layer.

You have probably already decided what you want, nevertheless... Maybe you could
consider push scrolling, that way you can always scroll at integer rates.

Cheers,

Rob


*********** REPLY SEPARATOR ***********

On 2/03/2002 at 7:06 PM ioojk wrote:

>Does anyone know any tricks for smooth scrolling?
>I want to be able to control the speed of the
>background scroll without it becoming jagged.
>At the moment I can only get a smooth scroll if
>I add an integer number (pixels) to the scroll
>registers, but I want to be able to add the
>equivalent of 1.5 pixels per frame. If I add
>1 (pixel) then 2 (pixels) then 1 (pixel) it
>goes jagged. I have seen games that smooth
>scroll at more variable speeds, but I can't
>work out how.
>
>
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



------------------------------------------------------------
Robert Murray, ndWare

Web: www.ndware.com
Email: rmurray@...
Phone: +613 9421 2292
Fax: +613 9421 2253
Mobile: 0410 598 565
------------------------------------------------------------







Sun Mar 3, 2002 1:21 am

rmurray@...
Send Email Send Email

Forward
Message #10283 of 15019 |
Expand Messages Author Sort by Date

Does anyone know any tricks for smooth scrolling? I want to be able to control the speed of the background scroll without it becoming jagged. At the moment I...
ioojk
Offline Send Email
Mar 2, 2002
9:08 pm

... Store your current scroll value and delta as floating- or, even better, fixed-point numbers, then convert to integer just before sending to registers. -- ...
Maciej Sinilo
yarpen2002
Offline Send Email
Mar 2, 2002
9:38 pm

... Unless the hardware has sub-pixel accuracy, then there's nothing you can do.. It will never be smooth unless you use muliples of 1....
Jay
boolaala10
Offline Send Email
Mar 3, 2002
1:11 am

Are you sure about other GBA games scrolling smoothly at various speeds? I imagine they would all go a little blurry when they are doing a non-integer scroll....
Robert Murray
rmurray@...
Send Email
Mar 3, 2002
1:24 am

As others have suggested try storing your X and Y scroll positions as fixed point values with 8 bits of precision and then shift them down when you copy them...
ninge
n1nge
Offline Send Email
Mar 3, 2002
10:07 am

... _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com...
John Q. Pretentious
johnisaheadcase
Online Now Send Email
Mar 3, 2002
10:09 am

HI, I've encountered the same problem in my current project.What i do to solve the problem is to update the scrolling factor of each layer in different times....
Giuseppe Crugliano
g.crugliano@...
Send Email
Mar 3, 2002
1:14 pm

Hi Everyone, Thanks for your suggestions - very helpfull. The games I was looking at seem to use a 'roving' camera, I guess this is push scrolling. I am...
ioojk
Offline Send Email
Mar 3, 2002
2:46 pm

I use fixed point number to store all coordinates (sprites, scrolling,...) . (0-255 is the float part of the number). It works perfectly. If you want to have a...
Christian Votava
cvotava@...
Send Email
Mar 4, 2002
12:53 pm

Exactly the method I use but it still exhibits the problems the original poster didn't want. Taking 192 as a 3/4 pixel scroll you get: 0, 0, 1, 2, 3, 3, 4 You...
Francis Lillie
francis_lillie@...
Send Email
Mar 4, 2002
1:33 pm

I think there isn't any problem because the refresh rate is 60hz. So, you have a lot of scrolls in 1 second. Sometime I have a 3/4 pixel scroll and it works...
Christian Votava
cvotava@...
Send Email
Mar 6, 2002
2:09 am

I don't know if anyone has pointed it out, but you'll find that the problem comes from the rapidly changing time step between each integer pixel scroll. i.e. 1...
Dave Mariner
elevenstronguk
Offline Send Email
Mar 4, 2002
3:22 pm

... _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com...
John Q. Pretentious
johnisaheadcase
Online Now Send Email
Mar 6, 2002
3:07 am

I think this is a bit of a non-problem. When writing the scroll routine you are (obviously) looking closely at the scrolling and will notice that it's a ...
John Pickford
jpickford23467
Offline Send Email
Mar 6, 2002
9:04 am

I actually tried to use subpixel rendered backgrounds for scrolling in my first project (a Shadow Of The Beast clone) where I needed a very slow scrolling...
Lawrence Owen
lozrus69
Offline Send Email
Mar 6, 2002
10:44 am

... From: "John Q. Pretentious" <johnisaheadcase@...> To: <gbadev@yahoogroups.com> Sent: Monday, March 04, 2002 8:30 PM Subject: Re: [gbadev] Re: Smooth...
Dave Mariner
elevenstronguk
Offline Send Email
Mar 6, 2002
10:59 am

... _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com...
John Q. Pretentious
johnisaheadcase
Online Now Send Email
Mar 6, 2002
6:43 pm

Hi, ok I read a bit more about linkscripts at http://www.gnu.org/manual/ld-2.9.1/ and http://sources.redhat.com/binutils/docs-2.10/ld.html and found out how to...
Pete
dooby@...
Send Email
Mar 6, 2002
8:56 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help