Sounds like renpy is loading animations and not unloading them. I'll check out the documentation, thanks.
Ren’Py games can end up using a lot of memory for a few common (and sometimes sneaky) reasons — and it’s usually not the Python code itself, but the assets and how they’re handled that cause it.
Here are the main culprits - maybe one of them helps to solve the problem:
1. Large, Uncompressed Image Assets
Ren’Py loads image files into memory as raw RGBA bitmaps, so a 1920×1080 PNG (even if only 300 KB on disk) becomes:
1920 × 1080 × 4 bytes ≈ 8 MB in memory
If you have many large sprites, backgrounds, and CGs loaded at the same time, memory usage skyrockets.
High-resolution UI elements and layered sprites multiply the problem.
Fix: Scale images to the needed resolution, use webp or optimized png/jpg, and avoid keeping unnecessary high-res assets.
2. Too Many Images Kept in Cache
Ren’Py has an image cache so it doesn’t reload assets from disk every time.
By default, the cache size is proportional to the amount of VRAM available, but if you load tons of unique images quickly, they pile up.
If you show lots of new backgrounds or CGs in sequence, they can all be sitting in memory.
Fix: Use renpy.free_memory() strategically, or tweak config.image_cache_size in options.rpy.
3. Large Audio Files
Music and voice lines, especially uncompressed WAV or high-bitrate OGG/MP3, can occupy a lot of RAM if preloaded or looped.
Ren’Py decompresses OGG/MP3 into raw PCM for playback, which uses far more memory than the file size suggests.
Fix: Compress audio reasonably (OGG 96–128 kbps for voices, 160–192 kbps for music), and avoid loading too many channels at once. (Hence why i always laugh about people using more than one voice channel, just because they think they need a seperate channel for each sound (audio file) whenever multiple sounds play at the same time
4. Persistent Layered Images / Animation Frames
LayeredImage or frame-by-frame animation (e.g., ATL loops with many large frames) can cause multiple full-resolution textures to be held in memory at once.
If animations don’t pause or unload assets, Ren’Py might keep them all alive.
Fix: Use ATL transforms with single image assets when possible, or optimize animations into spritesheets.
5. Video Playback
Video backgrounds or cutscenes can consume large chunks of RAM, especially if they’re high resolution or have alpha channels.
Ren’Py may buffer multiple frames ahead, which increases usage.
Fix: Use lower-resolution, lower-bitrate video for in-game playback.
6. Lack of Cleanup Between Scenes
Python code can also hold onto references to images, screens, or data objects, preventing garbage collection.
If you store large surfaces in variables without deleting them, Ren’Py can’t free the memory.
Fix: Ensure temporary images/objects aren’t kept in global variables unnecessarily.
Most likely, even more for new, unexperienced RenPy devs, it might be point 1.)
I recommend to check on that first XD
hope that helps