How do I manage memory and speed up loading

0 favourites
  • 3 posts
From the Asset Store
Test and challenge your memory in this amazing Christmas themed memory game!
  • Hello.

    I am sorry if duplicating these questions, but i could not find clear answers in the forum. Thank you.

    1. if "go to layout N" from layout "N-1", is layout N-1 garbage collected in memory automatically?

    2. if sprite-type is destroyed, is its image memory freed?

    3. a. if "big" sprite-image is scheduled to be loaded dynamically after first layout load is completed, why the sprite apparently (?) sill makes a HTML-request for a "default" empty image in first layout load

    anyway to avoid this?

    b. if sprite had image at design-time, but on later design one needs to remove this image,

    in favor of dynamically loaded image, how to do this?

    4. Apparently, no matter is the N+1 layout is used, it is still loads to the web browser at landing time.

    What are the ways to avoid this? I use just one: make image download dynamic and catching the "onload" event.

    Are there any more organized ways of doing this?

    These links did not help, perhaps i don't understand something:

    Other links concerning memory:

    Memory use, huge problem for large games on mobile

    Thank you.

    Konstantin.

  • I don't think this belong in the beginners section, it is not easy to answer I think.

    And you would probably need Ashley to answer it correctly. Tried doing some tests but the more I tested the less sense the results made, and didn't produce anything that could answer your questions.

    For instant it seems that if you create a image for 1 layout and destroy it straight away the memory is not freed up, which makes a bit of sense if you should need the object later. However if you switch layout some of the memory is freed but not all, even though there are no objects, but you can still make all the objects in your project, again could be because you can then make the objects, however it is still able to free up some. And what exactly are freed up I couldn't figure out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • These kinds of questions come up from time to time, so instead of answering repeatedly on the forum I wrote a new manual entry covering memory use:

    https://www.scirra.com/manual/183/memory-usage

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