AnimatedSprite2D can't handle many frames

Godot Version

4.2.2

Question

Hi so I’ve run into an issue when making my game. I make my game in a way that I have rendered all necesery frames of animation and static earlier in blender (overall 2gb of render frames). And now I need to implement them as animations into godot. I used AnimatedSprite2D because it’s easy to add the animations there. However when everything was setup and I’ve tried to run my game, the game took all 10 gb of ram (with each second the ram consumption increased) and eventually crashed. Have you got any idea on why it happens or how to fix it? Or maybe use another node or implement it another way? Please help.

Hmm it’s hard to say without seeing it, but that sounds like you’ve got some sort of infinate loop going on. Maybe start another test project and slowly copy stuff over so you can see what/when it starts.

Like how many frames are we taking about?

You could also add a Sprite2D with an AnimationPlayer, but you might run into the same issue.

Are they on separate images? frame by frame on a different file? or are they on a spritesheet?

I’m curious… 2GB of pre-rendered frames?? can we see a screenshot of a few frames of those animations to see what we’re dealing with? Is it necessary? Couldn’t you at least reduce the amount of frames per second of those animations? let’s say from 60 to 30 or 24 or something like that? Or at least reduce the resolution?

1000 frames in total every one of them is 1920x1080. These are full screen frames. Yes these frames are what the game is based on. Yes they were pre-rendered in blender. The amount of frames per second is 24. Yes I think I have to optimize them and make them smaller res.