O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

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

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

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