[Request] "Unload from memory" action

0 favourites
From the Asset Store
11 loops of RPG, chiptune/8-bit music. Suitable for any pixel art game.
  • Ashley

    1) load 100mb of images on startup

    2) draw them in to Paster (which only uses ~16mb)

    3) (the request) release the 100mb of images

    at point 3. after releasing all 100mb of images same time I'm removing every instance of every object I don't need anymore. So after a "clean up" there should be only one object in the layout - Paster, and this layout should use only ~16mb altogether because there is nothing else.

    i do not say that device can't handle this or there are crashes of any kind.

    As I see it. There are hundreds of different kind of objects in the layout, that are using ~100mb in textures. And they are doing nothing. No tests, no collisions. They are simply a "background image". But they take quite a lot of memory and probably quite few draw calls and some CPU just for being there. So instead of keeping them I could exchange them for only one object that takes less of everything.

    And this goes only for my example. There a lot of other things that could benefit from ability of dynamic unloading from memory.

  • My point is if you're going to run out of memory at any point, it will be step 2, before there's any chance to unload anything, meaning the feature doesn't help prevent the device running out of memory.

  • doesnt a game that has 100mb in memory run slower then a game that has only 16mb in memory? so even if you dont run out of memory you should get a better performance on older devices wright?

  • Why would it run slower? It either has enough memory or not.

  • maybe im wrong but i figured this because i have 4gb of ram on my pc and when the browser uses >1gb everythign kind of lags so i thought on a mobile its the same, even if the game doesnt use all of the memory (or more then available), other tasks in the background too need memory and everything just runs slower when you come near the memory limit. is that wrong?

  • Like I said before, it's not about running out of a memory but about "why using 100mb and 100 objects if you could use only 16mb and 1 object".

  • Bump

    Ashley

    I don't understand. Can you explain it bluntly WHY this request cannot be fulfiled? Oh and please don't argue that We don't need it - because this sounds like Microsoft.

    If there are some heavy technical difficulties to implement this - okey. But if its just a matter of "you don't think its needed" then not okey. I might be getting the wrong impresion, and don't feel offended if so - but it sounds like you are giving excuses instead of explanation.

    Because i have a similiar issue - i have shit load of GFX assets which i use to generate content and past it into Paster and then never to see it again. And my paster, when the content generation is done, is 5mg. and my content is about 200 mb.

    The way it works in my case:

    1. Spawn object A

    2. Paste Object A into Paster

    3. Delete Object A

    4. Spawn Object B

    5. Paste Object B into paster

    6. Destroy Object B

    And so on, rise and repeat. So at any given moment i never have more then 20mb VRAM in use. At least i should be. Because the freaking textures are stuck in VRAM long after i discared them and the player won't see them again. And i have no means, that i am aware of, of getting rid of this garbage textures sitting in VRAM.

    So whats the problem? And why the heck out of 10 requests - 6 always needs to end up as arguing. Sure if there are technical obstacles - in such case i can relate and understand. But in many cases i keep hearing "No because you dont need it/We think its pointless" => thread closed.

    Sorry if the "tone" of this post sounds a bit raging.

    EDIT:

    Lol, when googling i've found this

    And i was like YAY, and then i noticed the forum path...

    "Board index ‹ Construct Classic ‹ Construct Classic Discussion ‹ Help & Support using Construct Classic"

    So apparently even CC had that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Fictional made up example.

    Open world single layout project.

    20gb of graphics....

    Only need 100mb loaded/on screen at any given time.

    Currently not possible. To make this amazing game.

    If we could unload memory it would be possible.

    Why does my mountain/snow area have my tropical assets loaded?

    Wasting memory is bad.

    Memory wasted is memory that could have been used to make the game better.

  • This feature is in my wish list already

  • Bump.

    I'm loading some assets externally for an editor. If an image is loaded, then the source image modified, then uploaded again, nothing happens. I can only assume this is because C2 is loading the image from memory instead of reloading the source image. If that is correct, then I support this request.

  • I think this was asked for before. Around the time the room region thing was implemented.

    I thought the answer was basically no. Value wasn't seen in it. Which is absurd. Open world and single layout games would greatly benifit among other things. But I believe the answer was along the lines of use multiple layouts.

    I believe the main concern was such a feature would likely be misused. And many people would complain about objects popping in as they load etc.

    Anyways, I would love to see this implemented.

    I think it's not that there's no value in it - I think it's just too difficult to implement into C2. And there's no reason to make it something the user should be able to control; in theory all that should happen is when an object is destroyed, it does a check to see if that object still exists in the layout. If it doesn't, then it unloads the object from memory.

  • Bump.

    I'm loading some assets externally for an editor. If an image is loaded, then the source image modified, then uploaded again, nothing happens. I can only assume this is because C2 is loading the image from memory instead of reloading the source image. If that is correct, then I support this request.

    If you are using file chooser to pick the file and picking the same file it's quite likely this (it's not even loading):

  • If you are using file chooser to pick the file and picking the same file it's quite likely this (it's not even loading):

    Ah. I'm actually loading it from disk based on data from a text file, but that might still be the issue.

  • Ashley - Is there any reason why unloading textures can't be implemented? This is preventing me from having multiple enemies in larger layouts. I have a lot of animations and large sprites for enemies and these need to be loaded and unloaded. I also want to separate out player abilities into different sprites that I can remove when not equipped. Another thing I'd like to test for my game is possibly having one large world and streaming the textures.

    Any chance this can be looked at again?

  • bumpy ^^

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