C++17 In Detail

14 March 2014

Three Particle Effects

See my new website at cppstories.com

For some time I have been playing around with my particle system. It seems to be a very interesting experiment to do! Today I just want to present some of current results and thoughts on future development.
So far I managed to create three different effects:
  • star tunnel: just round position generator + position update
  • attractors: four attractors that affect acceleration of each particle
  • fountain: simple collision detection with a floor
Let us see some of the results...

The Series


Particle system

Particle system

Particle system

Particle system with AntTweakBar

Fountain particle system

Particle tunnel with AntTweakBar

Particle tunnel



  • Create more effects! This will make my system more reusable. I often see particle tutorials that are very simple and cannot be easily extended. My idea is to have decent amount of flexibility.
  • Optimize!
    • I have rough numbers about the system: 250k particles (in the attractor effect) take around 13ms to calculate (on CPU). Fps drops to 30fps.
    • It would be nice to create a million particle system and run it at 30fps at least. I target CPU, not GPU currently
  • Test several methods of drawing and updating GPU buffers.
I do not want to set any deadlines by now. Hopefully there will be some more interesting posts about this experiments in near future :)

If you want to get additional C++ resources, exlusive articles, early access content, private Discord server and weekly curated news, check out my Patreon website: (see all benefits):

© 2017, Bartlomiej Filipek, Blogger platform
Disclaimer: Any opinions expressed herein are in no way representative of those of my employers. All data and information provided on this site is for informational purposes only. I try to write complete and accurate articles, but the web-site will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.