EddyDingDongs's Recent Forum Activity

  • There is no need for a preload feature. Construct 2 already preloads any objects placed on the layout. If you create an object at runtime which is not in the layout, it has to load it then and there, which can introduce a jank - so just place the object in the layout and destroy it on start of layout. They will still be preloaded. Any objects placed in the layout will not be unloaded until the end of the layout. Objects loaded at runtime may also be unloaded at runtime if the last instance is destroyed.

    Thank you Ashley, if you could please copy & paste what you just said into the Manual then it would avoid anyone else asking the same questions. You could add it to the "Sprites" section, i think that would be best since the optimization sections might not be reached as directly.

    Thank you again for your clarification and continued hard work, recent performance improvements for PC under nodewebkit have been very awesome!

  • > .... and other sprites are coded with the "Fade" behaviour, so even if they are created off layout they will only last for 3-seconds before they are destroyed by the fade behaviour. And once they are destroyed 3-seconds after layout start then they will be unloaded from video memory, thus negating all my efforts to preload a god damn texture!

    >

    This is a straight forward RTFM issue my friend.... Switch the fade's Destroy property to "No" and you are done....

    I understand that, but for some particular sprites I need to have the destroy property to "yes", otherwise I won't know when to delete particular sprites. But according to some of you here nothing should be unloaded while a layout is active, so if that is true then it's not an issue.

  • Nobody ever gives all the pertinent information.

    Leave the objects in the layout, and destroy them at the start of layout.

    The fact that loading the images into memory will slow it down can not be bypassed.

    So Newt, are you sure that no sprites get unloaded while a layout is active?

    Do sprites only get unloaded at end of a layout?

  • C2 loads everything into memory at the start of layout, so the objects already exist in memory.

    There is no reason for the creation to cause a slow down.

    Perhaps something else is happening when you run the creation events.

    I'll explain a bit more, basically i have two "UNUSED" Layouts which I store my first instances of each sprite. This is necessary in my game as I have character selection and most of the sprites will not be used as only 2 out of 8 characters will only be in use at any one time.

    Thus I create these sprites (eg. special FX sprites & projectiles specific to each character) as they are needed and they do not exist on my level Layouts beforehand.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the info Aphrodite, not sure that sprites get unloaded only at end of layout, it seems like they get unloaded when the last sprite is deleted. I would like confirmation of this from Scirra.

  • In my game i create various sprites and animated sprites when they are needed.

    Now performance wise I get a smooth frame rate (50-60-fps) up until the points when these sprites are created.

    At which point I get stutters and pauses of the frame rate when these sprite objects are created.

    Now the only solution would be to create these sprites on start of layout and have them outside the layout boundaries, so they are invisible. BUT this doesn't work becos many of my sprites are coded to continue moving in one direction (as they are projectiles), and other sprites are coded to animate and keep on scaling, and other sprites are coded with the "Fade" behaviour, so even if they are created off layout they will only last for 3-seconds before they are destroyed by the fade behaviour. And once they are destroyed 3-seconds after layout start then they will be unloaded from video memory, thus negating all my efforts to preload a god damn texture!

    * I think this is a serious performance issue with C2, and should be put ontop of the priority list. Basically what I what is an Action added eg. On Start of Layout -> Preload Sprites -> from Family "XYZ".

  • I complied my project in both yesterday and these are the results:

    Crosswalk: 45-fps average

    CoocoonJS: 60-fps average

    So from a performance perspective I can't use Crosswalk as it is right now, not good enough.

  • I just used the NEW slider bar for first time but while it does show in chrome for android, it seems to NOT be compatible with CocoonJS so in my ludei export for Android the slider bar wasn't there.

    The recommended Android exporter (crosswalk) at the moment runs like a piece of sh!t. My project gets 60-fps in cocoonjs but via crosswalk i get sub 45-fps but mostly 30-fps, so half the performance, that is crap!

    It would run faster on a Atari 2600, so that is my reason for NOT using the C2 "recommended" android exporter.

  • "Wait 0 seconds" is the equivalent of waiting one tick.

    Thanks seven, but for my own logic's sake i'll leave it at Wait 0.1 seconds hehe

    Becos Wait 0-seconds looks like a bug i might accidentally delete in future lol

  • That's not really a bug; how can you position a sound at an instance that doesn't exist yet? Use a Wait command, or On Created, or something similar as a workaround.

    Yes you're right, I figured it out that same day with a Wait action of 0.1 seconds after start of layout. And that fixed the problem since the object has already been created before the sound is positioned to it.

    I know it's not technically a bug, but what if the the positional sound was programmed to try again one more tick after layout start if the object named was not found on the first tick??

  • I think I figured it out, it seems as though there is bug in positioned audio code in the sense that it you create an object on start of layout - that object will NOT play sound IF you Positioned Audio: Play at Object also on start of layout.

    So it seems the object needs to already exist on the layout before hand, on you have an invisible object that positions itself to your moving object.

  • Hi, i'd like to know if u use play at position say Sprite.X, Sprite.Y, if that sprite is a moving object, will the sounds position move with it or stay at the start position?

    In a simple new project I can get Play at Object working no problems, just doesn't work at all in my more complex project. Really annoying that I have no controls to manually adjust left/right stereo mix using variables.

EddyDingDongs's avatar

EddyDingDongs

Member since 7 Sep, 2013

None one is following EddyDingDongs yet!

Trophy Case

  • 11-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Email Verified

Progress

14/44
How to earn trophies