Question about Est. Image Memory

0 favourites
  • 11 posts
From the Asset Store
Test and challenge your memory in this amazing Christmas themed memory game!
  • Hi to all,

    I noticed a very strange thing....

    I have a game's level within which there are objects like the player, enemies, platforms, etc. ..

    when I launch it in debug mode I have values ​​like this:

    Est. image memory: 62,1 mb

    when I try to delete all the instances of enemies (I have only 1 type of enemy duplicated 11 times in level) the

    Est. image memory is: 6 mb

    I wonder why 11 instances take about 55MB?

    I read the weight of all the images that make up the animation of the enemy and come to a total of 300kb .....

    so why affect so much of that value?

    thanks

  • EDIT: also with only 1 enemy the value of

    Est. image memory is 62,1 mb

    and when I delete the only enemy the value change in

    6 mb

    why this?

    the sum of all images files that compose the animation of the enemy is only 300 kb?

    is normal or is a issue?

    I would like to know the opinion of Ashley...

    thank's

  • What is the size of your animation frame for this enemy and how many do you have?

  • Memory usage is depending for images.

    If you use cloned sprites (duplicated frames) may take double memory usage.

    If you use bigger images may increase memory usage.

    If your canvas is upscaled than fixed windows, it adds more memory.

    You should design your workflow to keep good memory usage for reducing and reciclying animation frames, small images, one sprite for all animations states, composing scene with props with different properties like opacity, size, angle, etc.

    Otherwise, if you plan to have million of animations, Spriter is solution.

  • An object is either fully loaded in to memory with all its animations and animation frames, or not loaded at all. Images are also fully decompressed in memory. For example you may have a 1024 x 1024 PNG file which is only 300kb on disk, but it will effectively be decompressed to a 32-bit bitmap in memory, therefore using up 1024x1024x4 bytes of memory, about 4mb. Adding up all your animation frames like that probably does come to around 50mb+, which is a very large amount for a single object. See Remember not to waste your memory

  • Wow now all is clear! Many thanks

    I have in my enemy sprite some animations with large image png, 600x600 pixel

    This animations increase that value.

    But what is the best Way to save large images?

    Png 8 bit can help me to keep memory usage low?

  • Wow now all is clear! Many thanks

    I have in my enemy sprite some animations with large image png, 600x600 pixel

    This animations increase that value.

    But what is the best Way to save large images?

    Png 8 bit can help me to keep memory usage low?

    It does not matter what format you save it us, once in GPU memory, its a full texture.

    Your 600 x 600 is slightly too large to fit into 512 x 512 texture so it has to go to the next one up (power of 2 size), so your image has to go into a 1024 x 1024 texture. As such, each animation frame would take up 4MB in memory.

    You need to read the tutorial Ashley linked above. Consider it COMPULSORY reading before you starting designing your game, its incredibly important to have good practices from the start before you waste your time making a boat load of animations which are poorly optimized.

    My advice is to not use any animated sprite above 256 x 256 in size. It's just too much of a memory hog to have 512 x 512 frames, if you have an enemy with 20 frames of that size, that single enemy is 20MB of memory once loaded into GPU.

  • Ok I know...

    but if I have a big boss enemy how can I do it?

    my images size of the boss enemy are 600x600 now,

    I can resize them to 256x256 with photoshop but on the construct2 if I scale the enemy to 600x600 it is "blurry" when I play the game....

  • Ok I know...

    but if I have a big boss enemy how can I do it?

    my images size of the boss enemy are 600x600 now,

    I can resize them to 256x256 with photoshop but on the construct2 if I scale the enemy to 600x600 it is "blurry" when I play the game....

    Break your boss up to smaller fragments to minimize waste (empty space on image = waste).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could also try 512 instead - textures are power of two, so like 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048.

  • Ok perfect I think I'll make my boss a little smaller, I can't break it because it is a single black block....

    this way I think I can stay within the 20-30MB on the boss level,

    it is acceptable as a value for mobile devices?

    the others 60 levels are about 6-7 MB each one of Image Memory.

    thank's

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