Scrolling Text with Sprites example #1828
Replies: 2 comments 2 replies
-
You have done well to understand this complex task and implement it. The comments below are intended to be constructive:
An alternative to using the sprite scroll feature is to draw text in sprite, plot sprite to screen, clear sprite, redraw text in sprite with x position moved left, plot sprite to screen. Repeat as required. You may find this seemingly inefficient but simple approach is surprisingly fast. |
Beta Was this translation helpful? Give feedback.
-
Here's an example I made that doesn't have any delay blocking code, also it uses less memory because it only draws in the sprite area which is the size of the font+screen width - not the entire length of the text.
|
Beta Was this translation helpful? Give feedback.
-
I hammered away at the example in this library until I understood what it was doing. I paste below a new parameterized example with better comments and variable names that might be included in future versions?
I would guess that there are other ways to scroll text smoothly. Please point me to those if you know of them. This approach runs out of memory pretty easily.
And if you have any improvements to the code below, please post a reply!
Beta Was this translation helpful? Give feedback.
All reactions