Book Image

Mastering Cocos2d Game Development

By : Alex Ogorek
Book Image

Mastering Cocos2d Game Development

By: Alex Ogorek

Overview of this book

Table of Contents (15 chapters)
Mastering Cocos2d Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 and ending with the hardest.

Method 1 – particle systems

Particle systems are basically sprites that are created en masse, such as a firework effect, a gushing water fountain, or a flickering candle. The difference between using a particle system...