CocoonJS background sizes

0 favourites
  • 4 posts
From the Asset Store
40 ambient sound loops. A wide selection of looping ambient sounds for different locations.
  • 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:

    <img src="http://i160.photobucket.com/albums/t197/basspenguin/house_2_zps83160de6.png" border="0" />

    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!

  • 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...

  • 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 Page

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)