How do I reduce memory usage by re designing my images

Get help using Construct 2

Post » Tue Jan 05, 2016 11:36 pm

hi everyone i am almost done making my game...i expect it to run on desktop and mobiles.So far the performance on my machine are quite good i get a solid 60fps on my phenom x 4 8gb ram and a gts450 with 1gb ram.Unfortunately construct 2 shows 620mb of estimated image memory.The game is a single layout infinite racer with a road that is quite large duplicating and destroying itself at runtime.I used anime studio as my spriting tool and unfotunately i exported each sprite as signle png frame of 1280x720 so there is no spritesheet in the game expect from those C2 build itself when exporting.
In C2 i resized the cars after cropping to 434x696 as a rectangular shape will be good for the game...
when running in debug mode the select language layout runs with 8mb images.the gamescreen title runs at 247mb(the main car is in the middle of the screen and enemy cars are randomly created and destroyed after their y is less than 200+2 texts objects for starting the game and option ) .the game layout takes up 440mb of image memory ...and i cant even get to that part of the game when testing on mobile devices.....Ive read the articles provided here on the site and the forum and the one from "Ashley" as well...Shall i redo the design entirely? or i can use construct 2 to reduce the sprites size even more efficiently? What are your tips? :roll: thank you for your time.
B
6
Posts: 28
Reputation: 308

Post » Tue Jan 05, 2016 11:52 pm

Image ImageImage
B
167
S
50
G
160
Posts: 8,168
Reputation: 103,432

Post » Wed Jan 06, 2016 9:15 am

@newt thanks for this ive read it and it seems i should try resizing the sprites ill go from 434,696 to something like 80,128 ill lose quality but i think it will solve the mobile memory problem
B
6
Posts: 28
Reputation: 308

Post » Wed Jan 06, 2016 10:06 am

@newt i fixed it by downscaling the images at 80,128 and now iam under 80mb on the game layout instead of 443mb before. thanks for the link
B
6
Posts: 28
Reputation: 308

Post » Wed Jan 06, 2016 10:39 am

When I had to reduce the size of objects in my game I found that making a history resize in photoshop then using a batch process to do all files got me a better result than the inengine editor and much faster to do.

Sorry if this info was too late to be useful.
B
12
S
4
G
1
Posts: 137
Reputation: 1,519

Post » Wed Jan 06, 2016 9:24 pm

@mapmerry no it still is valuable as iam more confortable with photoshop....it ll serve me in the future. for now i got my game running on mobile with 23mb of image memory
B
6
Posts: 28
Reputation: 308

Post » Wed Jan 06, 2016 11:15 pm

mapmerry wrote:When I had to reduce the size of objects in my game I found that making a history resize in photoshop then using a batch process to do all files got me a better result than the inengine editor and much faster to do.

Sorry if this info was too late to be useful.


Please, give me information about resizing, retooling, compressing, whatever.

I'm surprised that someone hasn't decided to create a list of optimizations/limits they feel works best for Construct 2 projects that are either d/l or played in a browser. Please, somebody do this.
B
194
S
108
G
7
Posts: 134
Reputation: 19,289

Post » Wed Jan 06, 2016 11:23 pm

Um, see that first link?
Image ImageImage
B
167
S
50
G
160
Posts: 8,168
Reputation: 103,432

Post » Wed Jan 06, 2016 11:34 pm

@yohoho if you go for mobile....and if the target device is pretty low in memory prefer using canvas instead of webgl,spritefont instead of text objects( i noticed some of the text object's text were not rendered correctly) reduce your sprites either in photoshop or even in c2 dont create many sprites on the layout and keep an eye out for construct2 helper messages at the bottom of the editor window...for the rest please see the link above
B
6
Posts: 28
Reputation: 308

Post » Thu Jan 07, 2016 2:22 am

You can call big large image only when they are about to appear on screen. when the image off from screen, delete them.

Here a showcase : https://dl.dropboxusercontent.com/u/659 ... latfo.capx

Preview in debug mode to see what actually happens
ImageImage
B
98
S
44
G
22
Posts: 762
Reputation: 21,271

Next

Return to How do I....?

Who is online

Users browsing this forum: giorgio1982, Xh3maa, Yahoo [Bot] and 2 guests