Load/unload sprites from RAM

0 favourites
  • 8 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • Hi everyone!

    I was just wandering � is there a way to load sprites into memory by chunks? I mean when i load my game in certain game mode that only needed sprites will be loaded and others flushed from memory? Beacaue i have a big project which on start consumes about 1 GB (thus all of the graphics are loaded into memory in one piece), and if i going to expand the project further it can become a problem...

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not as of now no. If you're planning on making a big game I can promise you it's only gonna get worse. I don't recommend using C2 for a game relying on excessive use of sprites.

  • There is a plug-in in the store to unload sprites from RAM. https://www.construct.net/forum/scirra-website/scirra-store-36/mm-unloader-unload-from-memory-128077

  • It doesn't work the way you think. That unloader only unloads assets in the active layout. Construct cleans the active layout memory when you change a level anyway. Unless your entire game takes place in one layout without changing, the plugin's useless. The cached memory use which is the source to everyone's headache can't bne touched. Once loaded in, it's never unloaded. The nr. 1 biggest design flaw of Construct 2's runtime in my opinion.

  • It doesn't work the way you think. That unloader only unloads assets in the active layout. Construct cleans the active layout memory when you change a level anyway. Unless your entire game takes place in one layout without changing, the plugin's useless. The cached memory use which is the source to everyone's headache can't bne touched. Once loaded in, it's never unloaded. The nr. 1 biggest design flaw of Construct 2's runtime in my opinion.

    What is the difference between cached memory and active layout memory? I use this to unload sprites and it seems to work well for me, although my game is a one layout massive game like you mentioned.

  • There is different terminology for it that can explain it in more detail, but if you play your game exported as NWjs, you will see that it has 3-4 processes in your task manager. One of them is the memory use of what's currently active, shouldn't take too much memory (what the plugin can affect). Then there's a big one, which can easily be up to 1-3 gb depending on how big your game is. This one holds every sprite, tile and preloaded sound file. Notice that nothing you do reduces the size of this beast in any remarkable capacity. It's loaded in on startup.

    The only work-around is storing images in the files folder and loading them into a sprite or tile object during runtime. However once it's loaded in, it can't be unloaded. So you can only postpone the memory bloat.

  • Well...that's upsetting. Thanks for explaining.

  • Well ****...

    Thanks for the info.

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