O'Reilly logo

Mastering Cocos2d Game Development by Alex Ogorek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Three ways to make unit streamers or "ghosts"

If you've ever played games such as Fruit Ninja, Blek, Jetpack Joyride, or Tiny Wings, you've surely seen this effect. There's a position on the screen that generates something similar to stars, a slashing effect, smoke clouds, or a line following the finger.

Sample project – ghosts

Go to the code repository and open the Ghosts project under the Sample Projects folder. If you run it, you will see just three labels as buttons that lead to mostly blank screens that don't really do anything. That's where you come in.

Here, you're going to learn how to make the effects that you just read. There are three general ways to go about making something like this. Let's go over each method, starting with the easiest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required