How do I turn off memory management?

0 favourites
  • 2 posts
From the Asset Store
Manage time and money, plan the best strategy to make all the customers happy in your restaurant, a hotel, cafe, or any
  • Hi, I'm not sure that I fully understand how the memory management works. So maybe my question or thoughts are just crazy and wrong.. :)

    If I have understood the memory management correctly then everything on a layout is loaded into ram when switching into the layout, and then you also unload the previous layout. When you then go back to the first layout the same thing happens, you unload the current layout and loads the first layout into memory. (Images, sounds, etc)

    If I create a game which just two layouts, is it possible to deactivate the memory management so that you load the entire game directly on the loading screen? So you don't need to unload and load everytime. Since I guess this would avoid the delay when changing layout. And also everything would actually fit into ram just fine.

    One more detailed example is a "multi-card game" I create. Every different game uses its own layout, but the layouts contain the same stuff. (hi res bg, music, and high res deck of cards). I also have a menu screen.

    With the current functionality, everything would be unloaded and loaded every time you switch from one game into menu and then into next game. Since every game basically uses the same assets it seems "bad" to unload and load the same stuff all the time.

    I know there are some events to load and unload stuff manually, would it be good to use those in the above example?

    But as I said in the beginning, maybe I have just misunderstood this all. :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the same assets are used by two consecutive layouts, they don't get unloaded and reloaded.

    If you don't want to use layouts to manage memory, don't use different layouts.

    For organizational purposes on a single layout, you can use event sheet includes and restart layout action with a variable to determine which sub game to load.

    On the other hand, if you don't understand how it works, you probably don't need to worry about it. It doesn't make sense to have assets that are not in use kept in memory. Also if you don't understand how it works, you definitely don't want to manage memory use yourself.

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