Horizontal scrolling tricks?
Posted: Thu Oct 12, 2017 4:02 am
Now I'm playing with scrolling.
Vertical scrolling is really fast if you have the memory, because you basically create a really long DFILE in memory and increment the DFILE pointer by 33 bytes for each line. Attached is the "vscroll" program which lets you push the O around the screen while random junk flies by vertically.
Horizontal scrolling... is there a trick? I'm currently doing it the naive way by just moving stuff right-to-left. Attached is "hscroll" where you can again push an O around the screen while stair steps scroll by at a very boring pace. This example is double-buffered for smoother animation, but I tested it with a single buffer and it wasn't significantly faster.
I am sure some of the hscroll slowness is due to my coding technique and use of C, but fundamentally what I'm doing is slow by any method. Any tricks?
Vertical scrolling is really fast if you have the memory, because you basically create a really long DFILE in memory and increment the DFILE pointer by 33 bytes for each line. Attached is the "vscroll" program which lets you push the O around the screen while random junk flies by vertically.
Horizontal scrolling... is there a trick? I'm currently doing it the naive way by just moving stuff right-to-left. Attached is "hscroll" where you can again push an O around the screen while stair steps scroll by at a very boring pace. This example is double-buffered for smoother animation, but I tested it with a single buffer and it wasn't significantly faster.
I am sure some of the hscroll slowness is due to my coding technique and use of C, but fundamentally what I'm doing is slow by any method. Any tricks?