-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use immutable bytes
for bitmaps
#75
Comments
Earlier, I said that it was a kludge to keep viper happy, but I now realize there is a behavior-based motivation for this: we may want sprites to be mutable, so that people can do per-sprite texture changes at runtime. If RAM usage concerns become critical due to this design, we can discuss a new |
More or less directly continuing the Discord conversation -- If one has a singular tileset/spritesheet that never changes, ROM reads are a better fit, but immutability can get in the way when people want to do anything more complex than typical masking operations on, say, a bunch of fairly small sprites. A driving principle of the API is one of minimizing user astonishment. If we added this functionality in the same |
Note from @fuglaro on Discord, to test any RAM saving for Sprites created from a binary
|
Following a discussion on Discord:
It seems using
bytes()
(immutable) rather thanbytearray()
may save RAM, as the data is accessed directly from flash (details).It would make sense if bitmap data used this.
blit()
methods supports this; code should be verified.file.bin
; are we loading into anotherbytearray
/ can we save any RAM here?bytes
.Before starting this work, we must confirm RAM is saved at execution time.
CC @fuglaro.
The text was updated successfully, but these errors were encountered: