Fruit Ninja Style Curved Slash?

0 favourites
  • 8 posts
From the Asset Store
Realisitc Fruits 2D
$24.75 USD
25% off
Realisitc Fruits 2D provides you with a variety of realistic fruits.
  • I've managed to create a slashing mechanic but when I studied Fruit Ninja's, it seems like they created this curving polygon ish looking stroke that follows and trails behind your movement.

    Could you anyone give me advice or point me to the right direction to create something similar to this?

  • Yung: It may not be what you're looking for, but I was thinking you could have a particle object that moves with the mouse/touch stroke, emitting particles along the way. If you setup the particles correctly, the ones emitted first (at the beginning of the slash) would fade out first. The radius of particles could be small so it doesn't look like a burst but rather just a streak.

    Another way might be to have a sprite image that stretches from the initial mouse/touch point to the termination point via scaling or just adjusting the width.

  • space Ape: Thanks for the idea! I tried the particle, though it seems promising, it wasn't exactly what I needed. Besides the settings to get near what I want would not be good for performance. But it's definitely a good start.

    I already have that one effect for the slashed effect, but for the slashing effect, I was looking more for a solution that allows curving.

  • Proper curving is difficult. The only possibility I could think of would lie in the unofficial Canvas plugin but even then it's iffy.

    Of course, there's probably a way to fake it reasonable well with segments, but that might take a bit of trial and error.

  • Hmmmm... Hows about making a tiled background, something really small and semi-transparent, and creating that tiled background at the point of mouse/touch contact? If it was round and small, it should easily create a 'drawing' effect in the game. Setting a timer or other device to fade out the opacity and destroy it when the opacity is 0 could create a nice drawn curved effect.

    I'm curious to see what kind of solution you come up with!

  • Yung , hi take a look at this post Slash effect

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • cesisco: Thanks for the link! I saw your example long ago and thought it was cool, but it kept crashing if I move it too fast.

    Thanks for the help everyone. After quite some time of researching, this is the version I am going for, as it's easiest for me to understand and implement, without going to UID picking and looping.

    Here's the capx, for those interested. It's not perfect, but it's good enough for me.

    If any of the expert has a better and proper way to implement this, please do share.

  • Yung C2 release100 broke my example, but Ashley made a new one to fix it.I will test your example as soon as i have the latest release installed.tks

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