O'Reilly logo

Mastering SFML Game Development by Raimondas Pupius

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

Particle generators

Having all of these updaters really does nothing unless certain base values are generated for the particles. Whether it is the initial position of a particle, the range of colors, or the name of a texture that gets attached to our flying little data structures, having that initial data set based on some pre-conceived notion is important. There are quite a few generators we support, not to mention tons of candidates for new generators, and thus new types of particles. Having said that, let us take a look at a couple of basics that we need to get some basic effects going.

Point position

The simplest generator we can possibly have in this entire system is a point position. Essentially, it just sets all positions of fed-in particles ...

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