Phoenixbowman's Recent Forum Activity

  • */\* Thank you all for your kind help. I really appreciate the advice and help you all gave : ) */\*

  • The Image Background is just a little over 700 kilobytes.

  • PS: The memory dropped! When I changed layouts it was fluctuating up and down, instead of only climbing.

    All I did was do End of Layout > Destroy all (Except, I listed every single asset and set each one to Destroy.)

    I don't know, maybe it had to do something with my code. whatever it is, it worked.

    I'm just going to call it "magic" and take it.

  • I ran it again and it's doing fine. I added End of Layout > Destroy Background to each level.

    The background is high resolution (the only high-res graphic.) that may have been what was causing it.

    In the debugger, I noticed that even when timescale was set to 0, it was still doing collision checks. Sprites on future levels don't move until the layout begins, correct? If the Sprite is set to 0, until the code making it move runs (when the layout is active) it stays still?

    Unless Sprites are loaded and moving in Layouts that are not. Sprites are supposed to move, but the Layouts where they're moving are not active yet. As in, when the Layout is active, they move. What i'm getting is that Sprites are not loaded until the Layout is loaded. Meaning they should not be moving.

    Because when the Layout loads, the Sprites are where I placed them in the Layout view. Which means they are not moving when the layout is not active. Yet the debugger shows collision checks.

    If the Sprites on inacvtive, future, layouts are not moving, how can there be collision checks when timescale = 0

    Im concerned about this because I don't want to melt the phones of people who get this game. Better to solve it now, then end up wrecking peoples' phones.

  • Going from a layout to another one, instances are deleted, but the texture for the sprite object stays in memory.

    If you keep piling memory (or memory leak) perhaps do you have some loop in your code that tries to create/destroy objects which could cause such an issue.

    C2 has its own garbage collection so you don't have to worry about this normally, unless you're going against this logic somehow.

    Debug/profile your project to see what may be going on.

    No, no loops in my code that create/destroy objects.

  • I did read that Ashley tutorial document. Those are general tips. Saying "Read this" doesn't address a specific cause as to why the memory keeps climbing up and up.

    Something is making it go up and up. I read that, and it did not help.

  • There ought to be a function that checks to see if Sprites are used on the next layout. If they are, then there should be the option to flush them from memory. That way, they're not piling up.

  • As in, A B and C are present on the current layout. WIll the End of Layout Destroy function flush them from memory, even if they are present on the next layout?

    So they're flushed from memory, so they don't keep piling up. That way, they're only present in memory when on the active layout. So there are not instances of them still existing from previous layouts.

  • > Something is causing memory to keep increasing. The memory goes up and up. If objects were being flushed than memory would drop. Something is still running in previous layouts. I re-use Sprites from previous layouts.

    >

    > Do Sprites that are used later persist in memory from previous layouts?

    >

    In my past experiments. There are some cases.

    If the sprites from your old layout is present in your new layout then it won't be flushed but if it isn't present in the next layout then it will be flushed.

    The Sprites from the old layout are present in the new layout.

    Thank you for this information. That could explain what is going on.

    Will doing at End of Layout > Destroy A destroy the sprite and flush it from memory?

    On End of Layout > Destroy A

    Destroy B

    Destroy C

    A B C and are on the current layout. Will that function destroy A B and C, even if they are present on the next layout?

  • My FPS is steady. The game runs smoothly, so it's not too many sprites on the screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something is causing memory to keep increasing. The memory goes up and up. If objects were being flushed than memory would drop. Something is still running in previous layouts. I re-use Sprites from previous layouts.

    Do Sprites that are used later persist in memory from previous layouts?

  • All of my objects are on the layout view, none are loaded by events. If it were too many objects on a layout, then memory would be fluctuating up and down. From when the app runs, memory goes up, keeps going up, and keeps climbing. It never drops until the app is closed.

    If it were objects, then the memory would go up and down depending on the objects on screen. The memory is not going up and down. It only goes up and up the more layouts were passed.

Phoenixbowman's avatar

Phoenixbowman

Member since 18 Sep, 2015

None one is following Phoenixbowman yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies