Game Development Community

2D Motion Trails?

by CharlesL · in iTorque 2D · 02/04/2013 (3:03 pm) · 3 replies

Can someone tell me how to make motion trails (like in fruit ninja and angry birds)? I couldn't make a particle system the worked, even though I set it on maximum quantity.

If the only way to do it is via particles, is there a way to generate more?

Thanks,
- Charles

#1
02/05/2013 (12:30 pm)
Particles are very expensive to use in terms of performance. My advice is to make an animation of your motion trails and use that - you set the animation to play over e.g. 5 seconds s you will see your particles decay/fade etc.

Another way is to use the old 'snake' trick.

As you move the object, stamp out the trail and for for each stamp schedule a timer, passing in a reference to the piece of the trail. When the timer expires you just fade it out.
#2
02/09/2013 (2:41 pm)
What do you mean by saying to make an animation of the trials? Do you mean to animate the character sprite?

What function is it that would stamp out a trail, I didn't realize that there was such a function?

Anyway, Thanks :D
-Charles
#3
02/09/2013 (6:09 pm)
By stamp, I mean clone the sprite and leave it in a static position and then fade it. Your original sprite keeps moving and the cloned sprites just fade away, giving the appearance of motion trails.