5mb stage image memory with only 1 sprite font

0 favourites
  • 9 posts
From the Asset Store
Creepy Sprite Font suitable font for your Dark/Horror/Halloween games.
  • I would like to understand that. I just added a sprite font of 8x14 (image dimensions of 128x128) in a layout in which I intend to make the menu, and in debug I have this size of 5 MB for stage image memory. Does anyone know why? In a layout of my game I have several objects and it has 1.5 mb of memory for images, I wanted to understand all this size that the sprite font is occupying.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Even an empty layout uses about 3MB of memory. I wouldn't worry much about that.

  • Thanks for the answer. It actually uses 1 mb of memory in an empty layout. And I have one with several objects and background, which is 1.5 mb. So I would like to understand why the sprite font takes up so much. But in the end I shouldn't have to worry about that, right. I would like to keep things absurdly optimized in terms of images in the game ...

  • On my pc an empty layout uses 2.4 mb, when I add a standard Spritefont, it increases to just 2.6 mb

    Are you saying that a spritefont with 128x128 px image size takes 4 mb of memory? Maybe you configured it wrong? Could you post your project file?

  • Thanks for the answer.

    I found out that it is because I have 18 sprite source objects so far. Each menu option is a different source sprite. I could use buttons, but I'm using sprite font. This is normal? In another layout I tested it with just one font sprite and it dropped to 1.5 mb.

    Maybe I could use just one sprite font object, and copy multiple instances. But I wouldn't know how to reference them in the code.

  • Yes, when possible you should use multiple instances, instead of cloning the object. There are lots of ways you can reference instances, the most common is by adding an instance variable. Then you can use "MyButton Compare instance variable" condition to pick the right instance.

  • Perfect, I had just discovered this in the post below the forum. Thank you very much, you are absolutely right. I will have to change the code for my entire menu, but it is necessary.

    construct.net/en/forum/construct-2/how-do-i-18/selecting-uid-109870

  • Modern desktops with dedicated GPU's generally have have 4-8 GB of vram. Mobile devices don't have dedicated VRAM, but I'd say they generally also have 2-4 GB avavilable. If you don't go nuts with huge levels with thousands of unique sprites, or giant sprites that span areas larger than your viewport regularly, you're going to be fine. Long animations can also be a source of heavy VRAM usage.

    If you see your estimated VRAM usage going up over 1GB, then you might want to reconsider your approach and think about optimizing.

  • In fact I would think to optimize well before 1 GB. In fact, I'm always thinking about graphics in terms of how to optimize. One question: is the estimated use of V-ram in debugging the stage Image memory?

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