January 30, 2016

Deploy Particle2dx system for Cocos2d-x games in Windows OS [Part 1]: Introduce Particle.

Particle are the effects in games which help developer can make the games more addictive and attractive such as Fire, Lighting or Explosion effect. These effects are the chain of the same images and repeat them infinitively. To do this, some game engines support the particle system so that the developers are able to create the effects easier and quicker in development process. In this post, you will be able to understand the Particle and how it works, particular in Cocos2d-x.

In Cocos2d-x 3.x, it contains the Particle classes to help us to toggle the effects in game screens. Here is the example of a Particle object, you can see that there are many of duplicate images are appeared repeatedly and created a chain of images. It looks like a meteorite effects.

Fig 1. An particle example. 
Particle System in Cocos2d-x contains 2 files. First one is a "png" image file. The second one is a plist file in XML format and contains all information about the position of image, transformation from a position to another place. Of course that we can made these file manually but it will waste a lot of time to define the images and locations. We have some tools can help generating this. One of them is Web-base tool and you can use it on-line or off-line as it is open-source. Please refer to "particle2dx.com" and check out that.

In this series of posts, I will walk you though how to create particle objects step by steps including creating images, plist and coding. The next post will be coming soon to create particle objects by using particle2dx.

Yumiki.

No comments :

Post a Comment