Rendering particles

So far, we have used a bare ImageParticle element to render particles. It is only one of the three ParticlePainters available, with the others being ItemParticle and CustomParticle. However, before we move on to other renderers, let's focus on tweaking the ImageParticle element to obtain some interesting effects.

The ImageParticle element renders each logical particle as an image. The image can be manipulated separately for each particle by changing its color and rotation, deforming its shape, or using it as a sprite animation.

To influence the color of particles, you can use any of the large number of dedicated properties—alpha, color, alphaVariation, colorVariation, redVariation, greenVariation, and blueVariation. The ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.