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

Creating updaters

With the core particle system all built up, it is time to focus on individual bits and pieces that will give our system its functionality and polish. By the time we are done, these are some of the effects that will be possible:

Creating updaters

The only way to get there is to keep going, so let us get to it!

Spatial updater

First, and probably the most obvious task is adjusting particle positions based on their kinematic states. As small as they may be, they still operate based on changes in velocity, acceleration, and position:

class SpatialUpdater : public BaseUpdater { public: void Update(float l_dT, ParticleContainer* l_particles) { auto& velocities ...

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