Deload Ram Memory Feature

I would like to request a feature to deload the ram memory

Something like the action to Change to a New Scene, that kills the memory usage but keep all the global variables intact.

For any larger and longer games that may overuse ram to be able to deload it as if the game had been closed and reopened.

Hi
I just tested the new release of Gdevelop and the ram usage is pretty good.

Thanks for that fixing

I still have the same problem, I figured out it wasn’t ram

I have no idea what to do

I cut by over 90% my global variables just to test
I did change the game from single file to multi files when save
I limited the fps to 60

I still have the problem

I notice the fps stays a lot of time from 60 to 120 fps when it is “slow” so I figured out the preview is just freezing unfreezing and it looked like slow

I’m using a M2 mac with 16gm Ram

but the exactly same issue happened when I was using a Linux with AMD9 40gb Ram and 6gb Vram

the freezing begins when I switch scenes multiple or sometimes few times

Does this happen in your builds too? Or just the preview?

the Preview

I never exported the game

Show us the events you’re running when you enter a new scene / load a scene

You’re not showing the conditions (at least I can’t see them on mobile). Are you taking advantage of “trigger once while true”? Otherwise a lot of events will just continue to run.

I use scene variables like this:

Condition: scene variable “start” is “0”
Actions: do the actions, then finish with scene variable start changing to “1” so it will never repeat

The same for objects

Only objects body parts after linked through variables, they keep triggering to keep them together while moving

Non moving objects I use something like
If bodypart is not = to body .X() then set bodypart to body.X()

I covered it pretty good back in 2019 when I used a old Intel Mac who would get hot if I didn’t did those things

For all new objects up to today I just copy and paste the events of a similar object and rename to the new object and do adjustments

I still used the “Always” special condition to keep fast moving objects together with their body parts

I use a variable named start or startbody1 startthestars staranything since a while, I never used the trigger once while true

All the objects uses this style of condition/action start123 so they never overdue, their body parts the same and the body parts of the body parts the same

All the scenes use the same style, it impedes overtriggering but I have more control over everything, but I end up with an excess of variable usage

99.9% of my scene variable are created in events, the scene itself usually has very few variables

sorry sadako, I wish I could help but this is way out of my league so to speak.

hope somebody with more knowledge can help you soon, I know how frustrating it is to go on without any help when you’re stuck.

It’s ok

I will wait :slight_smile: