CocoonJS background sizes

Get help using Construct 2

Post » Fri Apr 19, 2013 5:22 am

Hello all,


I'm mainly posting this because I couldn't find the post I was reading regarding this the other day... [Searched through 10 pages.]

So I'm working on a CocoonJS game and things have been going great. I'm working on designing my backgrounds and I had some questions:

    I'm looking at having each level have 4 backgrounds, each on it's own layer. [Only one layer will be displayed at a time but I know that doesn't change much performance wise.] Each background image will be approximately 1300x800 px. Are these dimensions fairly reasonably and is this a decent plan to move forward with? Other levels will be created with tiled backgrounds.

    Each image so far is taking up 700MB to 1.8MB. I know this doesn't make a difference other than package size because of how they are loaded into memory? In that other post someone mentioned how much space an image would take up in memory. Could someone provide me with that? It would be super helpful in figuring out how much wiggle room I have.


Here's a concept example for reference:



I know if I follow this design I should have space for ~6 levels if I want to fit music and a few other assets in. Let me know if i'm way off base.

Thanks!
B
37
S
9
G
7
Posts: 143
Reputation: 6,017

Post » Fri Apr 19, 2013 7:30 am

YOu also need to know that even when transparent the pixels of an image have to be drawn/rendered. And most mobile devices have just enough memory to render about 3x the screens size of pixels. So if you have images that fill the screen and more than two of them overlapping, even if they are transparent you will get overdraw and your game will run out of memory. 3 Layers of full screen images will kill the memory on a mobile device...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Fri Apr 19, 2013 7:36 am

As Ludei says it's better if you set your pictures size to 1024px because if it's 1300 px it will be interpreted as 2048px width picture then you will use too much memory.

Take a look at this page :
Ludei's Pagebeufreecasse2013-04-19 07:37:04
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Fri May 24, 2013 5:06 am

Great points! I've been taking overdraw into account so I don't have any transparent pixels. But that Ludei page is a great read! It's good to know they operate on powers of 2. I'll keep that in mind.
B
37
S
9
G
7
Posts: 143
Reputation: 6,017


Return to How do I....?

Who is online

Users browsing this forum: linkman2004, supreme676, Yahoo [Bot] and 20 guests