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
------------------------------------------------------------