How do I reduce estimate image memory?

0 favourites
  • 5 posts
From the Asset Store
Test and challenge your memory in this amazing Christmas themed memory game!
  • I know the funny answer is to just not have any images in my game, but withstanding some Friday fun humor, what really causes this number to be high?

    I currently have 1633mb +- running per the debug layout and that seems way too high for what I am doing. I have a simple 896 x 512 layout with 2-d cartoon style graphics.

    Is the estimated image memory based on the original size of a sprite frame? For example, if I have a hammer that is a 512x512 pixel image but I only use it as a 64x64 image in my actual layout, is the estimate image memory based on instances live in the game or based on actual sprite object values? Does my question make sense?

    My debug also seems to have found 560 active objects too. I wonder if my layouts such as my GUI are also affecting it. For example, I have a layer for player inventory and skills, which has a lot of buttons, shapes, and icons as you may imagine. Nothing I can really do about that since I want the player to be able to access them on the battlefield.

    I think I answered my own question.

    Always learning...

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Images are loaded into memory at their original resolution, then scaled.

    So use native sized sprites whenever possible unless they need to grow significantly during runtime, then you probably want the higher resolution sprite.

    This is probably having a massive effect on your memory use.

  • Thanks. I got a 40% reduction by right-sizing the enemy units in the sprite. More work to be done but the path is clear. I also had an old worldmap in 4k resolution. Oops. "Just because you can, doesn't mean you should."

  • Glad it made a difference. Especially true since modern hardware lets us get away with a lot, so it's easy to overlook things like this. It works fine, until it doesn't.

  • Exactly. I teach data science at the graduate and undergraduate level and it's the same way. It's easy to get carried away with the ease of developing models without understanding how to make the more efficient.

    I got the in-memory down to 200MB, quite a contrast to the 1600MB.

    That still seems like a lot. I am going to test it a bit more. I have over 300 skill icons. My original plan was 10 classes and 30 skills each. The sprites are probably more detailed than they need to be. Most of my sprites at run time are scaled to get to be used at 16s, so 16, 32, 48, 64, 96, 128, but I still have a lot of images at 128, 256 stored natively. No more 512s though anymore and that world map at 8k resolution is tweaked down.

    This experience is going to be a good analogy in class when we talk about useless independent variables in our regression models. Although I come to Construct 3 to play and get away from work. :-) Worlds colliding...

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