Game Development Reference
In-Depth Information
within the physics shape, this probably won't be too useful. A ring of particles with a
circle physics shape is likely the best possible use case.
Particle effects are also a major source of performance issues. Particle emitters with a total
particles count of over 100 are likely using far too many particles. A three-digit particle
count should definitely ring an alarm bell and be put under tight scrutiny.
A large particle count may be justifiable for a special effect designed to be used in a spe-
cific scene, perhaps as the only particle effect or where the scene isn't performance critic-
al. Also, using a lot of very small particles with a small particle texture can still work
well.
A common mistake is to design particle effects with hundreds of allowed particles only to
realize that this emitter will sink the frame rate to rock bottom even on high-end devices.
Another common mistake is having a particle effect that runs (mostly) fine except for spe-
cific older devices, with the iPhone 4 being a particularly common candidate due to its un-
derpowered graphics hardware. Always be prepared to remove an effect, or have a backup
effect with fewer particles for such cases. Test your particle effects early on a device, and
if you can, test them specifically on the slowest device you have access to.
Particle textures have to be square images. Any nonsquare texture will be scaled and
therefore stretched to match the nearest square size. In general, particle textures should be
rather nondescript, like a cloud or gradient pattern. Particle effects typically look best if
the particle texture has little discernible detail. Exceptions are very specific particle effects
with few individual particles, like dropping leaves or cartoon stars circling around a
knocked-out character's head.
Each particle emitter can only emit particles using a single texture. If you need to combine
multiple textures into the same particle effect, you'll have to create multiple emitter nodes
and decide whose particles should be drawn over or under the other emitter's particles.
The same goes for effects that should have more complex behavior, such as an effect
where most particles should orbit the emitter's position but occasionally some of them
should shoot out and away from the center. This requires two emitters.
Editing Particle System Parameters
For the particle-emitter example, you'll be adding a fire glow to the menu background.
Open MainMenuBackground.ccb in the UserInterface folder. From the Node Library
View , drag and drop a Particle System (emitter) node onto the stage. Then drag and move
Search WWH ::




Custom Search