"Turning images off" from RAM usage
IsabelleK
Member, Sous Chef Posts: 2,807
Hello,
In my last game, I noticed that when I have an actor without any image on it, but with many change image behaviors inside (when attribute game.X is 1, then change attribute self.color.alpha to 1 and change image to XXXX.png), then the memory usage for images is low on the beginning and increase with the emergence of successive images.
So, from this observation, I infer that only currently active images on the scene count to the images RAM usage.
So, I was wondering if there is any way to make something like that:
We have a huge scene with many "scenes" in it (something like in The Secret of Grisly Manor by FMG), so when player touch on actor A then camera moves to the other "scene".
Let's say that we have a lot of images on every "scene", so it would be a RAM heavy.
All images on the non-active "scenes" would be "off" (like in my example at the beginning of this post), so they don't increase the images memory usage.
But...
When player changes the "scene" from one to another, all of the images would become "active", so they increase the images memory usage.
And let's say that player change the "scene" to the previous one, and here is my question:
Is there any way to make the images "in-active" again, so, they don't count to the images RAM usage?
I hope I've explained myself well.
Thank you very much!
In my last game, I noticed that when I have an actor without any image on it, but with many change image behaviors inside (when attribute game.X is 1, then change attribute self.color.alpha to 1 and change image to XXXX.png), then the memory usage for images is low on the beginning and increase with the emergence of successive images.
So, from this observation, I infer that only currently active images on the scene count to the images RAM usage.
So, I was wondering if there is any way to make something like that:
We have a huge scene with many "scenes" in it (something like in The Secret of Grisly Manor by FMG), so when player touch on actor A then camera moves to the other "scene".
Let's say that we have a lot of images on every "scene", so it would be a RAM heavy.
All images on the non-active "scenes" would be "off" (like in my example at the beginning of this post), so they don't increase the images memory usage.
But...
When player changes the "scene" from one to another, all of the images would become "active", so they increase the images memory usage.
And let's say that player change the "scene" to the previous one, and here is my question:
Is there any way to make the images "in-active" again, so, they don't count to the images RAM usage?
I hope I've explained myself well.
Thank you very much!
Comments
when you want NO image displayed or leave the scene have the image holder changeImage to that... and changeImage to what you want when the scene is active...
for scenes set the holder to Display Size.Width and Height...
for individual actors... changeAttribute width and height to the appropriate size for the image
as all images are loaded when your game is running... I think the actual image displayed uses up the RAM ...
MH