VRAM memory management example

This forum is currently in read-only mode.
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • It's really quite easy. Just put any objects that you want to be dynamically loaded into vram onto another layout and make the objects global.

    Run the "Layout 1" layout and watch the vram usage.

    keys:

    1,q to create and destroy the oval bg.

    2,w to create and destroy the rectangle bg.

    In contrast run the "Textures" layout and see how even though both bgs are destroyed the vram usage remains 4 MB.

    cap req. 0.99.84

  • Nice. This should go on the wiki, now that you're an editor!

    Edit: the objects from a different layout don't need to be global. All global means is the object won't be destroyed upon leaving the layout and it shows up in all event sheets in the editor.

  • That's... Actually very clever. I never really though of that technique.

    Now, how to apply it in order to 'swap out' different sets of textures in a single layout... Like, you move from one area to another, and the textures of the area you go out from are unloaded, and the textures from the area you go in are loaded.

  • Another way to do it: After destroying an object, Unload the textures for the layout you are in. It will flush the destroyed objects from the VRAM while keeping everything else intact.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's interesting, thanks.

    Daize : thank for this technics too.

    Arima : thank you for the informations about global .

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