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

Get help using Construct 2

Post » Tue Sep 29, 2015 6:29 pm

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?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Sep 29, 2015 7:35 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 29, 2015 7:46 pm

Both images were the same pixel width and height on the screen, but one was half a megabyte and the other 2.5 megabytes.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Sep 29, 2015 7:48 pm

Phoenixbowman wrote: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?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,387
Reputation: 58,456

Post » Tue Sep 29, 2015 8:19 pm

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.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Sep 29, 2015 8:30 pm

How can a 705 kb file end up taking 2.5 mb of data usage in the product?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Sep 29, 2015 8:35 pm

Phoenixbowman wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 29, 2015 8:37 pm

LittleStain wrote:
Phoenixbowman wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 29, 2015 9:08 pm

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.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue Sep 29, 2015 10:32 pm

Phoenixbowman wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, Sup with that? and 49 guests