How do I reduce memory use?

0 favourites
  • 7 posts
From the Asset Store
Test and challenge your memory in this amazing Christmas themed memory game!
  • I am making a project with the total size for the assets 5.9 mb with 14 lines of events. The problem is the memory use says 341.1 mb. How could the memory use be that big? And how to reduce it?

    Thanks

  • It sounds like it could be the images you're using. Try converting to .png, compressing and reducing size as much as possible.

  • It sounds like it could be the images you're using. Try converting to .png, compressing and reducing size as much as possible.

    Thanks I have done that by using Pngoo to compress all the images (in png format. Thats whay the total size of my assets (images and sounds) is 5.9mb. Is it too big? Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sound pretty small, maybe you have lots of sprites spawn? or lots of physics / objects / collisions at the same time?

    run debugger and see where the memory goes

  • I ran the debugger, and it shows 288 mb for the images. I dont really get it, how can a 5mb images becomes 288 mb? Thanks for the help

  • Here is a quote from Ashley regarding image sizes:

    [quote:1pnzbq7s]Some people struggle with memory usage on mobile devices with Construct 2, but usually from lack of awareness to how images are stored in memory. Your game might be a 5mb download since all the images are compressed as PNG or JPEG, but they are extracted to uncompressed (basically BMP) in memory for rendering, which can easily make it 5-10x bigger in memory than the download size. Because lots of people ran in to this we recently added a memory usage tracker in the Construct 2 status bar. It's just an estimate, but will give you a useful approximate figure (e.g. 5mb download size, 40mb memory use).

    Source is Here.

    In other words, compressing them is pointless, as they are uncompressed in memory.

    More useful info can be found in Ashley's latest blog:

    Understanding CPU and memory measurements.

    What are your image sizes (largest)?

  • Here is a quote from Ashley regarding image sizes:

    [quote:1mjjt7dk]Some people struggle with memory usage on mobile devices with Construct 2, but usually from lack of awareness to how images are stored in memory. Your game might be a 5mb download since all the images are compressed as PNG or JPEG, but they are extracted to uncompressed (basically BMP) in memory for rendering, which can easily make it 5-10x bigger in memory than the download size. Because lots of people ran in to this we recently added a memory usage tracker in the Construct 2 status bar. It's just an estimate, but will give you a useful approximate figure (e.g. 5mb download size, 40mb memory use).

    Source is Here.

    In other words, compressing them is pointless, as they are uncompressed in memory.

    More useful info can be found in Ashley's latest blog:

    Understanding CPU and memory measurements.

    What are your image sizes (largest)?

    Thanks a lot zenox98, all my questions have been answered. I learned many things also regarding memory use.

    And for your question, the largest image in my game is 400x320 pixels (8kb).

    There are 10 objects with 4 animations each. Each animation has 7 frames with that size of image. I put them all in a single layout.

    Thanks.

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