How do I create a smooth curved line?

0 favourites
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • MadSpy Sorry but I have not yet understood, the Enemy sprite bounce on the green sprite, not the viewport.

    LittleStain any solution?

  • the bullet bounce on the limit's viewport...your enemy doesn't interfere with the trajectory of the bullet...

    perhaps LittleStain or one of the hundreds who read this post could explain that better than me (my English has its limits)

  • I'm not quite sure what the effect is you want..

    Right now you are changing the direction of the bullet 180 degrees immediately on collision.

    It's not really strange that this produces a "corner", going from 400px per second Left to going to 400px per second Right

    There are many ways to "solve" this, depending on your needs.

    Decreasing the speed depending on the distance to the turning-point would be the easiest way while keeping the rest of your setup nearly the same,

    but there are probably much better ways of achieving this (using different behaviours and/or without behaviours) if it was clear what you are trying to achieve and when and why..

  • You can still use it MadSpy no matter in what version he creates it. Just take his capx and extract it using something like winrar or 7-zip to a folder. Then in that folder open the caproj file with notepad/wordpad.

    Then on the line

    <saved-with-version>20000</saved-with-version>

    Change that number to your version. If your version is 206 then the number should be 20600, if your version is 200 then change it to 20000, if 207 change to 20700, etc...

  • LittleStain

    I think he wants something like this (in better way I guess)

    VIKINGS

    I haven't thought about it, thanks lol

  • LittleStain Yes, even I had thought of this solution, however, I do not really know how to make them slow down, also because green sprites that move vertically aren't stationary.

    The movement of the Enemy I would that be like Sine behavior but that at random moments it changes direction in order to be unpredictable. I tried to recreate it with Bullet behavior but are not similar.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm still not sure what it is you are aiming for..

    Will the (moving) green squares be visible in the final result or are they only there to interrupt the movement?

    How random would you want the movement to be?

    If the green squares are only meant to create the movement, it would be easier to create the smooth movement without them..

  • Yes, the green squares in the center are just to make the movement more unpredictable and not always the same. At the end they will be transparent so you will not see.

    Well, I had thought to put "Every random(1,2) second" I think it is fast enough

  • Although this is not yet close to what you want I'd thought I'd share:

    https://dl.dropboxusercontent.com/u/485 ... ttry1.capx

  • So simple ... compared to trying to change the trajectory of each bullet... I bow to you master LittleStain lol

  • I bow to you master LittleStain lol

    lol

    hardly a master.. haha

    This example is actually a bit messy, but the idea behind it could be a good way to go..

  • you're absolutely right , I think to do things too complicated (as usual) especially since I knew that the sawtooth effect was dependent displacement of the enemy

  • Exactly, that's what I was looking for, thanks again for saving me one more time

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