2D Game effects

Hi, I would like to know how to achieve this kind of effect.

something which follows the sprite/your character, in other words “flying effect”.

I, actually have my idea already. But I don’t if it’s efficient.
my idea is to spawn squares on that certain point. There are two points, which is the XY of the character/hero, and the other one is for the point where the squares should end up. The squares will keep on spawning with MoveTo/MoveBy, and ScaleTo. ScaleTo, squares is big at start and ends up small. The range where the square should end up will always follow the hero’s Y, but should have delay.

May be MotionStreak

1 Like

Thanks, I’ll try this.

In my opinion, may be it’s used Particle Effect

thanks, spritebuilder right?

that’s a ribbon. You create the geometry in realtime.
Here’s some code example in Processing (a very simple java based language) i just found online http://www.openprocessing.org/sketch/47911
The hard part about doing it in cocos2d-x is that usualy you have to draw the triangles using a triangle strip or quad strip. In cocos2d-x you could use DrawNode to draw its triangles.

1 Like

Thanks, noted. Will check on this :smile: