You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a buffer,and emptied it with clear(), then used sprite() to draw the game's map into it, and then used blit() to display the buffer on the screen.
All the opaque parts are good, but the parts that should be transparent are displayed as random color dots. I tried to use clear() on the buffer SCREEN before drawing on it, but it didn't work. Drawing the sprite directly in SCREEN without blit() seems to work correctly, but I really need multiple layers.
I did some testing and it seems that using blit() doesn't properly copy the alpha channel of any buffer, not just the sprite. The transparent part shows some random data.
Problem resolved by assigning a transparent image array to the buffer before using it. I think this issue may be closed. I wish the usage of each functions could be documented in more detail, with examples. I often need to open its header files to see how each function works in order to use them.
Hello,
I created a buffer,and emptied it with clear(), then used sprite() to draw the game's map into it, and then used blit() to display the buffer on the screen.
All the opaque parts are good, but the parts that should be transparent are displayed as random color dots. I tried to use clear() on the buffer SCREEN before drawing on it, but it didn't work. Drawing the sprite directly in SCREEN without blit() seems to work correctly, but I really need multiple layers.
I used this web page to convert my PNG image: https://wiki.picosystem.com/en/tools/image-converter
Here is my code and the sprite sheet I used.
main.txt
Thank you!
The text was updated successfully, but these errors were encountered: