View the data usage of each Sprite, Background, etc.

0 favourites
  • 15 posts
From the Asset Store
94 Inside buildings views - Isometric view - PNG transparent - 2048x2048
  • I noticed that deleting a sprite from a Project allows you to guess at how much data it is using (KB, MB, etc)

    Is there an actual way to see how much data a sprite, or other Project object, is using? Because deleting it and comparing the before and after numbers on the total project size only shows an approximation of its data usage. Going into Debug mode and selecting each object does not show its individual data usage.

    Is there a breakdown of each individual Project object's data usage, and if so, where can it be found?

  • In memory any image is fully decompressed, so each image will take pixelwidth x pixelheight x 4 bytes of image memory..

    pixelwidth and pixelheight are the amount of pixels in the image editor inside the construct editor, for each frame of each animation offcourse if there are any..

  • Both images were the same pixel width and height on the screen, but one was half a megabyte and the other 2.5 megabytes.

  • Both images were the same pixel width and height on the screen, but one was half a megabyte and the other 2.5 megabytes.

    What where the original image sizes on import?

  • One is 705 kb and the other is 256 kb.

    With the 705 kb one, that does not account for the 2.5 mb difference when its in the project, and when it has been removed. It is a 2.5 mb difference when it's in the project and when it is not.

  • How can a 705 kb file end up taking 2.5 mb of data usage in the product?

  • How can a 705 kb file end up taking 2.5 mb of data usage in the product?

    Like I said..

    When used it is decompressed..

  • > How can a 705 kb file end up taking 2.5 mb of data usage in the product?

    >

    Like I said..

    When used it is decompressed..

    Image size in memory is based the amount of pixels in the image editor (import size), not on screen..

    Edit: Oops, sorry, thought I pressed edit instead of quote..

  • The 705 kb is when it's decompressed. 705 kb is the space that it takes up on the hard drive, even before it has been loaded into the game. The 705 kb on the hard drive is the decompressed version. I see 705 when it's on the hard drive. Then I see the total usage in the project window, i delete the object, and it subtracts 2.5 mb.

    How can it end up being bigger? When the 705 kb is at its decompressed size. If the file size is really 2.5 mb then how can it be taking up 705 kb on the hard drive?

    Is there a way to see how much data usage an object in the Project is using? Like a list, or something, that shows the data usage of an object in the Project.

  • The 705 kb is when it's decompressed. 705 kb is the space that it takes up on the hard drive, even before it has been loaded into the game. The 705 kb on the hard drive is the decompressed version. I see 705 when it's on the hard drive. Then I see the total usage in the project window, i delete the object, and it subtracts 2.5 mb.

    How can it end up being bigger? When the 705 kb is at its decompressed size. If the file size is really 2.5 mb then how can it be taking up 705 kb on the hard drive?

    Is there a way to see how much data usage an object in the Project is using? Like a list, or something, that shows the data usage of an object in the Project.

    I'm not sure you understand the meaning of decompressed..

    if a picture is 1024 pixels by 1024 pixels, in image memory it will be 1024 x 1024 x 4 = 4194304 bytes

    on the harddisk, depending on which format it is saved to and what compression (png,jpg,gif) is used it could be (is) much less..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I opened the program that the image was originally made in, and went to the About/File Properties. It said 800x600 for pixels, and for size it said 705 kb.

    In the very program where the image was made, it should show you the actual, real size. It is not compressed when you are editing it. Otherwise, you are editing a compressed image. This is the base image before compression, you are viewing the actual real uncompressed image.

    800 x 600 x 4 = 1920000, than why does the file size, under file properties in the editor where this was originally made, show it as 705 kb?

    The file properties showed 800 x 600 and a 705 kb file size.

  • > Both images were the same pixel width and height on the screen, but one was half a megabyte and the other 2.5 megabytes.

    >

    What where the original image sizes on import?

    The original size was 800 x 600, and in the editor where this file was originally created, the file properties show it as 800 x 600 and 705 kb (kilobytes) in size.

    Using the math provided, that would be 800 x 600 x 4 = 1920000.

    That is 1920 kb, so 1.92 mb.

    So why when i delete it from the game, the total memory usage drops 2.6 mb

    1.92, in theory for this image, creates a 2.6 mb drop in the game when it's deleted.

  • If there is a way to actually view each images size, in the project, then I can actually look at it. Instead of deleting it and comparing the before and after total project memory size numbers.

  • Everything LittleStain has said about image size in memory is true.

    You should realize that all images, regardless of their original 'compressed' form - png, gif, jpeg etc - are held in memory in their uncompressed 32-bit ARGB bitmap format in order to be rendered.

    see THIS POST from Ashley.

  • So why when i delete it from the game, the total (ESTIMATED) memory usage drops 2.6 mb

    1.92, in theory (theory?) for this image, creates a (ESTIMATED) 2.6 mb drop in the game when it's deleted.

    It could even be the estimated memory usage is too low if the sprite is put on a "power of 2"-size texture, which (sometimes?) happens..

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