What Is The "Memory Use" ?

Discussion and feedback on Construct 2

Post » Wed Aug 03, 2016 8:41 am

Hi guys.Here's my question.

What is the "memory use" bottom of the construct 2 screen?

Is that RAM use or total used disk space on device?

Image
B
29
S
14
G
1
Posts: 133
Reputation: 3,214

Post » Wed Aug 03, 2016 8:49 am

It's regarding RAM memory.
ImageImageImage
B
27
S
16
G
82
Posts: 1,030
Reputation: 45,779

Post » Wed Aug 03, 2016 8:52 am

BackendFreak wrote:It's regarding RAM memory.


Thanks
B
29
S
14
G
1
Posts: 133
Reputation: 3,214

Post » Wed Aug 03, 2016 10:59 am

that's how much your sprites take in memory.
maybe all images compressed and spritesheeted use ~10mb but when cut and loaded in memory in their raw format they use 205mb. on that layout
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Wed Aug 03, 2016 1:23 pm

saiyadjin wrote:that's how much your sprites take in memory.
maybe all images compressed and spritesheeted use ~10mb but when cut and loaded in memory in their raw format they use 205mb. on that layout


if you are sure about that,that's a good news.
Last edited by takamoto on Wed Aug 03, 2016 2:51 pm, edited 1 time in total.
B
29
S
14
G
1
Posts: 133
Reputation: 3,214

Post » Wed Aug 03, 2016 1:33 pm

Yes, the images are decompressed before loaded into memory.

https://www.scirra.com/manual/183/memory-usage

First of all it is important to note the image format has no effect on memory use. You can save on your project's download size by setting some images to PNG-8 or JPEG format in the image editor. However this does nothing to memory use: compressed images cannot be directly rendered, so upon loading all images are decompressed in to a 32-bit ARGB bitmap format. This means each pixel takes four bytes for the alpha, red, green and blue channels.

Consequently, the approximate memory use of an image is simply its number of pixels multiplied by 4. For example a 100x100 image would use 100 x 100 x 4 = 40000 bytes, or about 39kb. A HD-sized image at 1920x1080 would take 1920 x 1080 x 4 = 8294400 bytes, or about 7.9mb.
ImageImageImage
B
27
S
16
G
82
Posts: 1,030
Reputation: 45,779

Post » Sat Jan 21, 2017 2:15 pm

Hi,
I'm developping a game for Ios and Android with construct 2, and I would like to know the maximum memory I shouldn't exceed.
I have 60 sprites (360*640 pixels) and it already consumes 50 Mb of memory, could I go up to 250 Mb without slowing the game ?
I have used sprite sheets to reduce consumption, if you have some advises I want.
Thanks
B
13
S
3
Posts: 32
Reputation: 847

Post » Sat Jan 21, 2017 7:19 pm

mahe wrote:Hi,
I'm developping a game for Ios and Android with construct 2, and I would like to know the maximum memory I shouldn't exceed.
I have 60 sprites (360*640 pixels) and it already consumes 50 Mb of memory, could I go up to 250 Mb without slowing the game ?
I have used sprite sheets to reduce consumption, if you have some advises I want.
Thanks


For Android NO. 50 MB is just about right for Android. The lower the better.
For iOS I don't know. I think it was 100 MB but I haven't tested that myself. Of course it would vary for each device.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,244

Post » Sat Jan 21, 2017 8:25 pm

Thanks MPPlantOfficial,
I have a png32 spritesheet wich is 424 ko,
When I import the spritesheet it takes 24 Mb of memory due to decompression,
I intend to do 5 more spritesheets like this, not counting the backgrounds and etc..
I have found a super software called TexturePacker, there is a mode called trim wich optimize the space between sprites and the image is two times less weight.
But I find No way to import trim spritesheets in construct 2, is there a way to do this ?
B
13
S
3
Posts: 32
Reputation: 847

Post » Sun Jan 22, 2017 2:01 am

@mahe: Constuct 2 handles spritesheeting on export of your project nonetheless, so it does not matter what kind of spritesheet you import, the exported spritesheet used in the project will be as detailed in this tutorial.

As for the "Memory use" within the editor, note that it is only an estimation not the actual measure on execution.
Nothing beats testing directly on the target platform, and this is the way you will be sure what your platform may handle.

Finally, make sure to not waste your memory.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests