How do I do End Layout?

1 favourites
  • 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.

  • 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.

    Good thing that you fixed it. I am curious, what is the imagesize of your background? Is it a whole sprite? Just for future reference.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

    It's great that it is fixed but try to find the problem in the future because normally unused images are automatically removed on start of layout.

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

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

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