> 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.
Store your current scroll value and delta as floating- or, even
better, fixed-point numbers, then convert to integer just before
sending to registers.
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...
... Store your current scroll value and delta as floating- or, even better, fixed-point numbers, then convert to integer just before sending to registers. -- ...
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@...
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...
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@...
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...
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@...
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@...
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@...
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...
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 ...
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...
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...