-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Galactic Unicorn scrolling text example #827
Comments
I'd be interested to see your approach, at the very least. A clear demo of the problem could give me some hints for how to tackle it at the PicoGraphics level. |
Changes before the loop
Changes inside the loop
so a new few new variables, one to track the current index of the start of the text being displayed, one to track either the whole string or the partial string being displayed, and one to track if the partial display method is being switched on avoid it for the smaller strings as it doesn't make any real difference there At the pico graphics level Im guessing it would need to be approached with the size of each letter pre cached, and instead of rendering the pixels, just summing the values so if offset was -15, you would loop over the string one at a time, eg string = ABCDEFG, A = 5, remove from offset and dont render, B = 5, remove from offset and dont render, C = 4, Remove from offset and dont render. D = 5, this now straddles offset, so render string DEF from offset -1. End of the string would be similar. As a user I would normally expect this to be user side though, as there are advantages to pre rendering, can re use the memory for example and have no processing |
I'm trying to display a very large amount of scrolling text on the unicorn, the example doesn't work with it due to it basically rendering the whole string each time.
I have made some improvements to only render 20 chars at a time, which now makes the display much more responsive.
is this something wanted in the examples? Realise it may be a niche case
The text was updated successfully, but these errors were encountered: