Loading images into the memory (quick question)

0 favourites
  • 7 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • I know that the images get loaded into the memory when they're displayed, but there's one part I'm not sure about:

    When I use a high resolution sprite (for ex.: 2048x2048 px) and it get's displayed on a small screen (let's say for ex. on a 640x480 resolution) how much memory will it take up? Will it take up memory based on the source file (which is a high resolution image) or based on the downscaled image shown on screen?

  • The source images from your project are loaded into memory at start up.

  • The source images from your project are loaded into memory at start up.

    Thank you. And what about the GPU memory? If I remember right, the images are all loaded there as bitmaps. In that case the source files load in with their full size?

  • The images go in to RAM and also in to VRAM (graphics card memory) if the rendering is hardware accelerated, which it usually is these days.

    They get decompressed to the same size as the image saved as a 32-bit bitmap, so yes, a 1000x1000 pixel image will always take about 4mb of memory alone. This isn't much when both your computer and graphics card have gigabytes of memory, but bear in mind 4mb is still a lot for a single image on mobile.

    The various compressed formats just package the data in to a smaller filesize. Compressed images cannot be drawn though, so it's normal to decompress the images in to memory whenever they are loaded.

    We have plans for a feature to load textures layout by layout (like Classic can) somewhere on the todo list, to save memory with very large projects.

  • > The images go in to RAM and also in to VRAM (graphics card memory) if the rendering is hardware accelerated, which it usually is these days.

    >

    > They get decompressed to the same size as the image saved as a 32-bit bitmap, so yes, a 1000x1000 pixel image will always take about 4mb of memory alone. This isn't much when both your computer and graphics card have gigabytes of memory, but bear in mind 4mb is still a lot for a single image on mobile.

    >

    > The various compressed formats just package the data in to a smaller filesize. Compressed images cannot be drawn though, so it's normal to decompress the images in to memory whenever they are loaded.

    >

    > We have plans for a feature to load textures layout by layout (like Classic can) somewhere on the todo list, to save memory with very large projects.

    >

    And thank you again. Now it's cleared for me.

  • lennaert - must be an old quote - it's basically accurate except we've supported layout-by-layout texture loading for a long time now!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lennaert - must be an old quote - it's basically accurate except we've supported layout-by-layout texture loading for a long time now!

    Heh, yeah I had noticed, somehow searching for memory related information on the forum brought up the old qoute, I had read it before and referenced it a few times Should have searched the manual :All good now though

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