Kashin Ginn's Recent Forum Activity

  • Ashley

  • So I've been creating small test projects with timelines. I have an object A with some sprites as its children.. and I created multiple timelines with those, namely timeline X and timeline Y on a test project.

    Note that there's only 1 instance of object A in the test project.

    But when I'm satisfied with the animation and try to copy those test timelines on my current project... it creates 2 instance of the object A and each one of them has their own children.

    If I play timeline X, only 1 object A will play and the other will play for timeline Y only.

    But I wanted them to be like my test project... meaning only 1 instance of object A and its children playing for timeline X then Y.

    Now, I have to manually swap instances on the timeline Y, so that it picks only the instance from the timeline X while I delete the redundant ones (the duplicate object A and its children).

    But... is this normal? Or am I copying and pasting it wrong?

  • Ashley

    Okay, I understand now. So it's more about how C3 handles the creation/loading of the objects.

    I'll stick to this like before... "The easiest solution is to place the object on the layout, and destroy it on startup"

    Thanks.

  • Ashley

    Hello, my issue is the render time before we can paste on the drawingCanvas object. I have noticed that when the object is on a grave layout and will be created on a new layout via code... it takes few m/s before I can paste it on the drawingCanvas. This is worst on low/mid end devices (Tested on J7, A30 and few others).

    1st solution is to add it to the layout itself but having too many objects will increase the image memory on low end devices. Right now I have approx 15 tiles. Later I might have 30 or even 50, so this solution is not the best.

    2nd solution is to use wait 0.1s if there's none of the sprite/tile on the screen. Or use "wait for previous actions" when creating and pasting... but this doesn't work all the time.

    Anyways... on C2, the canvas plugin was updated by R0J0hound and currently this is fast and works on low end devices without any issue.

    On C3, even though it is not the same plugin... it still is a step down for me, since the waiting time is so much visible on some devices; and players will see unintended items while the wait is in process (yeah even by m/s). The issue below happens when the sprite/tile is in grave layout and this works and sometimes doesn't, because it need to wait for it to render completely. It will work if I use 0.1s but I don't want to.

    I know that Construct 3 can do better. So please check it out.

  • 1) Move the knife above the "texture" sprite

    2) Set the knife's blend mode to "destination over"

  • Alright,

    For the time being, I'll put them in the layout, since it is working fine without any delay.

    I'll still file an issue later on why the Canvas plugin is working better in C2 compared to DrawingCanvas in C3. For Ashley

    Thanks! dop2000

  • dop2000

    Hello, I added the action, but it still is not working.

    Yes I need the wait to reduce as much as possible but in my game, it will not be a good idea to set all sprites or tiles on the layout because there are 10-15 sprites and are nearly 400*400px which may affect performance.

    Maybe I did it wrong.

    Or I should do that on start of layout? But still there's too many sprites to be loaded in memory

    In construct 2, there were no such issue using the Canvas plugin. So this looks like a step down to me of how the DrawingCanvas works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I have a sprite in layout B and I want to create the sprite in layout A via actions so that I can use the DrawingCanvas object to paste it and make a replica visually.

    But since it has not been rendered at all.. I have to wait atleast 0.1s after creating it so that I can paste the sprite. This doesn't happen if the sprite was already in the layout.

    Is there any other way I can create the sprite without having to wait because there're a lot of sprites and I cannot set them all on the layout.

  • The way Superxonic did it seems to work fine on my PC.

    The enemies going through the wall is due to their rotate speed being slightly low. I had to set it to 500-600 and everything seems to work good.

  • Since you asked when to use them.. I'll make it as simple as possible from my POV.

    "Pick all" -> "mySprite.big = 1" OR simply "mySprite.big = 1"

    - will do exactly what you want... which is to pick and do something to the sprite. It is faster when you have lots of the same objects and have to do something to them... except it won't give you the UID or loopindex for each sprite in case you need it for something.

    "for each" -> "mySprite.big = 1" OR "mySprite.big = 1" -> "for each" (which is more optimised by adding the for each after the pick) will actually loop on all the picked object and you will have all the properties of the sprite since construct is processing each 1 of them, For e.g mySprite.UID, mySprite.instanceVariable, the loopindex, etc

    The "pick" is faster from what I tested and I use it everytime for simple actions whereas I use the "for each" when I have to make use of their properties like the UIDs or the loopindex for some purposes; this is suitable when I need to call a function for each 1 of the sprite and make use of their properties there.

  • Use another sprite X. You can spawn it at the same position and use the same size as your button; also make it invisible.

    Your cursor should be over object X instead of the button, and if yes... then tween the button. boom

  • Hello, I didn't had time to explain but in my example, you need to make adjustments with the 2 variables...

    counter_sound => the max sound you want to hear if you are calling it rapidly (via every tick or every 0.X sec or on multi-collision)

    sound_fakeStop => the duration of the sound where you think will be appropriate to play another sound at that particular time... (So if your sound is about 2 sec... and want to hear another sound plays 0.5 sec after instead after waiting for it to fully finish..., you will need to set it at 0.5 sec

    If it's working good without the "counter_sound" then good for you.

    Also, if the example's one works better, then you will need to fully understand how it works and include it in your project. I might check it later when I'm free. Cya

Kashin Ginn's avatar

Kashin Ginn

Member since 27 Apr, 2024

None one is following Kashin Ginn yet!

Connect with Kashin Ginn

Trophy Case

  • 1-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies