multilevel game - memory issue

Get help using Construct 2

Post » Sat May 04, 2013 9:15 am

I am making multilevel game .The backgrounds , which I am using in my game is size of 2048*1536 .
Some level have common backgrounds. So, I just copy background object from one layout to another layout. This doesn't affect on game size.
But it lead to increase the memory usage. Whenever I copy such backgrounds It increased the memory usage. and the increase is about 7 MB.
My game Size is 13 MB. But memory usage is 67 MB.

How to reduce memory usage? due to large background this happens? or something else?
B
6
S
2
Posts: 29
Reputation: 913

Post » Sat May 04, 2013 9:51 am

[QUOTE=rambop91] I am making multilevel game .The backgrounds , which I am using in my game is size of 2048*1536 .
Some level have common backgrounds. So, I just copy background object from one layout to another layout. This doesn't affect on game size.
But it lead to increase the memory usage. Whenever I copy such backgrounds It increased the memory usage. and the increase is about 7 MB.
My game Size is 13 MB. But memory usage is 67 MB.

How to reduce memory usage? due to large background this happens? or something else?
[/QUOTE]

I can't be sure at 100%, but a browser having to render such big images may have problems, maybe if you cut them into different tiles (aka: images).

PS:Why are you displaying so High Quality images?

Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,436

Post » Sun May 05, 2013 9:49 am

I have to support all screen size iphone to ipad, Samsung galaxy s4 to desktop pc.
so,I kept this.
Tiles property repeats the pattern. But My background is little bit natural scene type. So it cant be tiled.
B
6
S
2
Posts: 29
Reputation: 913

Post » Sun May 05, 2013 10:08 am

[QUOTE=rambop91] I have to support all screen size iphone to ipad, Samsung galaxy s4 to desktop pc.
so,I kept this.
Tiles property repeats the pattern. But My background is little bit natural scene type. So it cant be tiled. [/QUOTE]

When I said "tiled", I suggested you don't display One big Image, but you cut it multiple times and place them, like a complete puzzle, so the display will not be different, but the browser will have to support multiples medium sizes images instead of one Big picture, not sure it will work though
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,436

Post » Sun May 05, 2013 2:54 pm

I was struggling with the same issue for mobile. I was thinking of loading the background dynamically, and storing a ton of sizes and aspect rations on the server as images. If there is not an exact fit, I would either get a larger one and crop or scale down, or smaller and up.

However, what I found was that although my game only displayed a few sprites at a time, there were so many outside the game (as you need to have sprites for every thing which can be touched or moved). The core game was fast, but when I added all the dumb info screens and their backgrounds, buttons, settings and all the stuff you need to put round the game, it was too slow and the code unattainable so abandoned the project even though the games themselves were complete (it was a suite of slot machines for real money for an existing online casino).

However, I'm keeping my eye on construct 2's progress, hoping that one day it will have more support for native html 5 mobile, e.g. the ability to swipe in a settings form and a better solution for multiple screen sizes/ratios without black letterbox bars (which is currently possible, but extremely difficult when you add swipe navigation). When It does, the world we be at our feet.nutmix2013-05-05 14:56:26
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Mon May 06, 2013 12:08 pm

Is there any solution to reduce memory usage??
And increase in memory is due to large backgrounds??
B
6
S
2
Posts: 29
Reputation: 913

Post » Mon May 06, 2013 1:11 pm

New to Construct ? Where to start



Image Image

Image Image



Please attach a capx to any help request or bug report !
Moderator
B
262
S
93
G
55
Posts: 7,149
Reputation: 67,067

Post » Mon May 06, 2013 1:58 pm

Another good idea is if you use multiple times the same background to make it global and spawn it just in the "On Start of Layout" event ;) This helped me much at my "diablo" like game
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Mon May 06, 2013 10:00 pm

See @Kyatric's link. It's almost impossible to design efficient using large tiles like that.
Scirra Founder
B
373
S
218
G
84
Posts: 23,440
Reputation: 186,070

Post » Mon May 06, 2013 10:08 pm

Having you thought of releasing an iPad specific version, a PC specific version and so on? You don't need just one file.
B
53
S
14
G
13
Posts: 818
Reputation: 17,404

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests