Chadori's Forum Posts

  • >

    > > 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?

    I think you misunderstood something Phoenixbowman .

    The images of the sprite are the only thing stored in the memory not the sprites or objects nor instances. The instances you are talking about (The Objects on the layout, THE number of sprites) are codes that are generated by the things you put in the layout or you created using the eventsheet.

    IE: 100 instances of 1 sprite of 32x32 image

    (100 instances are code during layout and not persisted on next layout in other words they are only available in that layout and is cpu based not memory.)

    (1 sprite of 32x32 image is stored in the memory)

    Explanation:

    1 image of 32x32 image or frame is stored in the memory and the cpu is used to make them 100 instances and do movements.

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

    If the sprites are global then it will never be flushed.

    -------------------------------------------------------------

    //*Persistent Sprites - Don't be fooled of the word, the image is not stored in the memory. The information that it exists is stored in the storage of the device if I am correct.*//

    If the sprites are persistent then the information that it exists is stored in the storage of the device(Not MEMORY).

    So the memory management is still the same above but better optimized because the if the image is not preloaded in the layout but when you are back in the layout

    it automatically preloads itself. But on initial creation, it should be preloaded by adding the object in the layout on startup and destroyed if not needed.

  • How do I make a Low Quality, Medium Quality and High Quality option in a game? It is to enable support for non-HD Phones on GooglePlay. If it is possible, will it have significant improvement in games? My Game has a window scale of 16:9 (1280px720p) and I want to reduce the quality or scale size for performance for lower specs phones.

    Thanks XD in advance.

  • Phoenixbowman Don't be stressed about it. Construct 2 is smart enough to flush out memory of images from past layout to make room for another layout.

    Please read if you have time : (These are helpful and this is from the founder of Construct 2 "Ashley")

    https://www.scirra.com/tutorials/298/pe ... bile-games

    https://www.scirra.com/blog/83/optimisa ... -your-time

    https://www.scirra.com/manual/134/performance-tips

  • Back when there were 10 Layouts, it was not a problem. Something is persisting. I read online that Assets that are used later on are stored in memory.

    Is there anyway around this? It looks like Assets on the previous layouts are staying in memory. thus the more layouts go by, the more memory goes up.

    WIll At End of Layout Destroy Object remove these from memory?

    On End of Layout > Destroy A Destroy B Destroy C

    Will that remove them from memory?

    based on Ashley said:

    https://www.scirra.com/manual/134/performance-tips

    Not placing all used objects in the layout

    If objects are not placed in a layout but are created by events, Construct 2 will load the textures for those objects the moment you create them. This can cause a momentary pause or "jank" and make the game feel less responsive. This can be avoided by placing any used objects in the layout.

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Based on Ashley said, Objects are only preloaded by layout change so nothing to worry about clearing memory when leaving a layout (Exemption for Global Objects). Your memory problems is caused by something else. If I am to guess, the cause must be unseen events that cause looped object creation or too many objects on layout. Try to debug using Construct 2 debugger.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Still though. I think Scirra Manual contents about Admob (https://www.scirra.com/manual/184/admob) should be updated with a working Plugin ID. Game Dev's might get confused about that unworking plugin id and as a result, people might think twice of using Construct 2 for android or even give up. Construct 2 team can fix big issues with no problem but please don't forget about the little things that makes this program amazing like the scirra manual.

  • Thanks Kyatric ! You are a time saver XD .I wouldn't have found this link by myself. I will try it.

  • Nope, it's not that either.

    It's happening on multiple layers it seems

    Have you tried a reboot of your PC? Restart of Construct 2? Reinstall Construct 2? But first, please have a screenshot for it might be a bug.

    Just provide a link to the screenshot image here. Since you don't have enough reputatiion to post a link, please add spaces between the url.

  • Sjryan .How about Layer Visibility , you may have unchecked the visibility of the layer your objects are at?

    https://onedrive.live.com/redir?resid=A ... hoto%2cpng

    Click on the link above to view the photo of the tab of checkboxes you have to check to see the layers and the object it holds.

  • Ashley can you please check whether the admob plugin and Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob are still working because it always crashes my apps on startup and it happens when I import the "Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob" on IntelXDK and when I remove this plugin to fix the app and to build it without the "Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob", it crashes like the Plugin junkfiles are still in the project folder on the IntelXDK Projects. And just to fix this I have to re-export to cordova from Construct 2 again to have a clean folder and remake the Project in the IntelXDK with another project folder and not to add "Plugin ID: com.cranberrygame.phonegap.plugin.ad.admob" in the projects plugin. And no more Admob.

    PS. I still haven't found a solution since December 2015

    Ashley please update the Scirra Manual about this topic. Because it is more than a year old and not supported by IntelXDK anymore.

  • I made a capx to replicate your situation and now I understand the problem and the trick to that is to use variables to store or collect recent pressed "up or down" direction and then use them with mirror in the left or right press actions. Hope it solved the problem XD.

  • Now I get it. Try this capx:

    https://onedrive.live.com/redir?resid=A ... ile%2ccapx

  • https://onedrive.live.com/redir?resid=A ... hoto%2cpng

    On the Image above I tested this event and worked properly.

    Executing Animation up and down with no problem even when going right or left.

    Have you tried removing the condition 8Direction is moving or not when checking for key press? and setting 8 direction angle to "none"

  • - Since your condition: (If 8direction is moving and Down arrow or Up Arrow is down) is only setting animations when down or up arrow is pressed then it will not run animations when left or right key is pressed. Is that the problem because since I can't see the animations or the other events then that is the only possible explanation I can come up with.

    I suggest adding :

    *If Player is moving and

    *******************Right Arrow is pressed then

    ---------------------------------> Set animation to "RunningRight"

    *******************Left Arrow is pressed then

    ---------------------------------> Set animation to "RunningLeft"