oosyrag's Forum Posts

  • Depending on the particular event, it can, or it might not. There is no solid answer. A single event running physics or pathfinding on a ton of objects may cause more impact than a thousand empty events.

    That is why the best answer is to test it and see. If you can't benchmark/measure any significant difference, then it isn't worth worrying about.

    If you want a straight answer, I'll give you an unofficial one - No, number of events or sub events does not impact speed. You're welcome to show me a specific case where it does, and I will say you're right, but most likely it is a case already covered in https://www.scirra.com/blog/83/optimisa ... -your-time.

    And if you don't trust Scirra for some reason here are other articles to read. It is common advice across all platforms.

    http://www.flounder.com/optimization.htm

    http://www.joshbarczak.com/blog/?p=580

    http://wiki.c2.com/?PrematureOptimization

    Basically it comes down to this: If you can't tell for certain yourself if it makes a difference, and you are unable to create a situation where you are able to tell it does make a difference, and end up having to ask someone else if it does or not... then the information is of absolutely no practical use.

    Edit: As for what really does matter, in terms of deciding how to organize your events, is readability and how the events fit together logically (your own logic). I might be able to combine 10 events down to 1, but it will take a lot of effort and if I need to change anything later it might be a pain. It might also be harder to remember what I was going for in the first place.

  • You do not have permission to view this post

  • Adding the persist behavior to your sprite object should do the trick.

    It would be easier to diagnose if we could see exactly what you have done.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.dropbox.com/s/3gtnd67ty83v9 ... .capx?dl=0

    Some basic trigonometry, using the angle from center to mouse to set the position after determining which edge the object should be on.

    The alternative no math solution would be to do the following every tick:

    Set the object position to the center of the viewport

    ->Use a While loop to check if the object is still within the viewport - Move 1 pixel at angle (Angle from center of viewport to mouse)

    This approach may be heavier in terms of performance though, although that may or may not matter relative to the rest of your project.

  • Without seeing an example of what you have done, all I can say is that a mistake was probably made.

  • Add condition: Buff is visible to your On Clicked Event.

  • oosyrag an example capx will be great to see

    ............

    dropbox.com/s/mtuitc8dsr6i03r/laseranimation.capx

    Rough draft.

    You can improve it by making a more solid core on the explosion sprite to hide the cut. You can also do a gradient on the masking sprite so that cut off edge is softened.

    Also I used mouse distance from the end of the laser to set the width of the mask, you probably want a different method depending on your application.

  • Moot, I recommend you not take responses or lack thereof personally on a web forum, or you'll probably end up like he-who-shall-not-be-named eventually.

    Just because Scirra actively engages with the community doesn't mean they owe everyone who asks a response (generally physically impossible due to being outnumbered, or that they would just never get any actual work done!).

    As for your specific question of " Will we have to wait long for it?", I would guess that he simply doesn't have an answer for that, and it would be silly of him to need to explain why he doesn't have an answer for it. There is no way of determining what your definition of a long wait is, and most likely there is no way of knowing exactly when or how long it will take get done at the moment anyway.

    Anyways TLDR I find it highly unlikely that anyone at Scirra would take your posts personally, so you shouldn't take what they say or don't say personally either.

  • You can do an amazing amount of patterns with the built in behaviors.

    https://www.dropbox.com/s/vf9ub4hq4r5cv ... .capx?dl=0

  • https://www.dropbox.com/s/mtuitc8dsr6i0 ... .capx?dl=0

    Rough draft.

    You can improve it by making a more solid core on the explosion sprite to hide the cut. You can also do a gradient on the masking sprite so that cut off edge is softened.

    Also I used mouse distance from the end of the laser to set the width of the mask, you probably want a different method depending on your application.

  • I can put together an example later today if you don't mind waiting.

  • You're looking for "bitwise" or "neighbor aware" auto tiling. The should be some working examples floating around the forums if you do a search.

    Ref: http://www.saltgames.com/article/awareTiles/

  • I would simply use a really long sprite, and clip it to whatever length I need it to be (with a blending mask) at run time, and put an "explosion" over it at the destination to cover up the cut end.