I have a question/pb : i reduced my images, to win ram usage, then done a few levels and i saw that in fact, my ram has increased.
After trying to understand, i thought that the only explanation could be that i created more layouts, even if my images were smaller.
So i duplicated some scenes (14 times), and i lost around 8 mb of ram. I duplicated more and i lost more ram again (12 in total). I work on mobiles, and it's a huge lost of memory.
It uses the exact same images (in spreadsheets or not), and it's just scene duplicated, so I don't understand why i have so much waste of ram.
Did anyone notice it too before ?
Is that normal ? Is it a bug or am I doing something wrong ?
(i'm on r139 in case of)
The only time you should be able to increase memory use is when you add new textures.
When you say duplicates do you mean multiple instances, or brand new objects?
Thanks for your answer.
By "duplicate" i mean "duplicate layout", the option you have when you right click on the name of a layout.
I always use it when i do a level that has the same "base" as the previous one, maybe it comes from here ?
Cause i didn't add more texture, just duplicated layouts and i lose ram.
Develop games in your browser. Powerful, performant & highly capable.
There's no reason for it to use more ram.
Where are you getting that reading from?
Hmm, that's weird. It shouldn't be the case. Are you sure it's just the extra layouts that are causing the problem?
Ashley any ideas?
Thanks to the both of you for your answers again :)
I have the reading on Instruments (xcode).
So, i made mesurements. I use a single eventsheet for all the project and i thought that maybe the pb could come from here, cause all the layouts are by consequence connected to it.
I made 4 exports to test :
1 - eventsheet present and 14 more layouts duplicated : 49 MB.
2 - eventsheet present and i got rid of the 14 : 42 MB.
3 - eventsheet deleted and 14 more layouts duplicated : 45 MB.
4 - eventsheet deleted and i got rid of the 14 : 36 MB.
i've not touch at all to the textures.
I don't really know how to read that cause it's not very logical.
Event if there is a pb with my eventsheet (i will search, but i don't know if the ram can be changed by that), it doesn't explain the big difference i have when this eventsheet is not in the project, between the built with 14 more layouts duplicated and the other one.
I still have a huge loss of ram (9 mb).
I'm too tired tonight to continue (lol), i maybe miss something somewhere. A good night and I will have fresher ideas on it :)
Not sure what to think of that.
How big is the image folder after the game is exported?
the image folder looks ok, no more images than the ones that are supposed to be used.
Its weight is 1.11 mo.
From there do you get the informations abbout the ram usage ?
I read my ram on Instruments in Xcode.
In construct2, the estimated use of ram indicated is 30.9 mb.
I have 42 on the device.
I know it's just a indication, but i have a big difference with what i have in real.
RAM measurements are typically a little inaccurate since there are different kinds of allocations and issues like fragmentation that make it hard to come up with a single meaningful number. However layouts should not use much more extra RAM. They will need to store the initial objects (so it can load the layout when you go to it). Do you have a lot of initial objects on these layouts? I'd think you'd need in the thousands to make the results you see.
Thanks to your answer Ashley.
No pb about the indication, it was just to tell, in case of cause i'm lost, but i don't often look at it, i prefer to test everyday on my device and measure it there.
My pb is not the ram in itself, but the fact that just duplicate scenes increase it.
i have around 40 sprites in total, including spreadsheets, 512 size max.
I just duplicate scenes, so there are exactly the same, no more "new" objects. I'm around 100/150 max objects on a layout.
Maybe i can send you my project to have a look at it ?
I still have the pb.
Even if i add no new images, each time i create a new layout and use images sprites used already in the project, or duplicate a layout, without adding nothing, my ram increases. (ios)
Can the total number of object in the project be the cause of that ? Maybe each instance takes a piece of memory ?
Can it be a graphic card pb ? (mine is up to date)
Me again. I think it's linked to the number of instances.
When i duplicate a layout with 100-150 objects, it adds around 1 mo.
When i duplicate a layout with 300 objects, it adds around 2 mo.
So obviously, i don't know if it's a bug or not, but it seems to be linked to the total number of instances.
Just out of interest, what method are you using to import your game into xcode? Could this be a manifestation of how that wrapper handles the code? Thanks.
Edited - disregard, I just read the Ejecta thread...