memory use

Just started using Construct 2? Post your questions here

Post » Tue May 17, 2016 10:32 am

I'm making a dressup game for ipad and phones, and my memory use says 170 mb which I know isn't very good.
I've read the blog posts about memory use, but it's hard to optimize this game since it needs a lot of clothes and color variations of all the clothes also. So there is a lot of images!
But I now have all the objects in the layout, and just make the different "closets" invisible and visible when the user presses the buttons in the menu.
Is it better for memory usage if they are placed outside of the layout and are created and destroyed instead?

As I've said, I've read the posts about it but I still didn't quite get if it still takes up memory usage even though it's not all on the layout all the time.
It's a lot of work to change everything so I thought I'd just ask for advice here first!
B
10
S
3
Posts: 62
Reputation: 774

Post » Tue May 17, 2016 10:44 am

These days 170mb isn't that bad. A lot of devices have 1gb+ memory now.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,852

Post » Tue May 17, 2016 10:48 am

Oh ok! I haven't put nearly everything in yet though, so it's probably going to be like double that..
But when I try it on my phone there is no problems at all, and it also doesn't have any animations or stuff like that so maybe it should be fine anyways!
Do you know if there is like a limit I should keep under for the newer devices?
B
10
S
3
Posts: 62
Reputation: 774

Post » Tue May 17, 2016 10:54 am

I agree on what ashley said regarding memory usage but you should still destroy non-used objects on the layout on startup on negative(-) coordinates since many objects present on the layout (even invisible) still affects fps and cpu usage. I recommend preload images on startup by putting all sprites(images) or tiledbackgrounds(images) that are going to be used on you layout on the outside part of the layout and destroy on startup , create to insert the outfit & destroy to remove the outfit.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
64
S
19
G
90
Posts: 1,119
Reputation: 59,667

Post » Tue May 17, 2016 11:01 am

chadorireborn wrote:I agree on what ashley said regarding memory usage but you should still destroy non-used objects on the layout on startup on negative(-) coordinates since many objects present on the layout (even invisible) still affects fps and cpu usage. I recommend preload images on startup by putting all sprites(images) or tiledbackgrounds(images) that are going to be used on you layout on the outside part of the layout and destroy on startup , create to insert the outfit & destroy to remove the outfit.



Ok, that makes sense. I will probably change it anyways then, we'll see!
B
10
S
3
Posts: 62
Reputation: 774


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests