Skip to content
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

Deload a pygame.image #4228

Closed
SomeoneUnknownForReal opened this issue May 11, 2024 · 1 comment
Closed

Deload a pygame.image #4228

SomeoneUnknownForReal opened this issue May 11, 2024 · 1 comment

Comments

@SomeoneUnknownForReal
Copy link

Description

I am making a feature in my rhythm game's chart editor to preview overlays which are animated and use images. The problem is that the when you want to see all of them the ram usage is like 3 gb. As I know from the docs and checking the image class there's no way to do that and it makes the game not compatible with devices that have ram below 8 gb.

@illume
Copy link
Member

illume commented May 18, 2024

How many colors do they have? You could try reducing the color depth of the Surface, or the Surface size.

Another path could be to keep track of only the animations you need at that time. Then only decompress the images you need for the animation. Maybe it's fast enough.

I'm going to close this issue, because I don't know if it's a bug or a feature request.

@illume illume closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants