BlurrrParticle
1.0.0
|
BlurrrParticle (BLRParticle) is a highly optimized 2D particle system. It utilizes Data Oriented Design priniples to minimize cache misses while also employing SIMD (SSE & NEON) to maximize computation throughput. This implementation was designed with the main purpose of being fast, with the idea that this should be as efficient as possible to keep resources available to do the other work in your game, such as physics, AI, etc.
It is also renderer agnostic in that the system prepares a batched array that can be sumbitted to most hardware accelerated APIs. BlurrrParticle was designed with SDL_gpu in mind, but can still be utilized with other renderers.
BlurrrParticle embraces the Newtonian Laws of Motion for particle behaviors. Instead of arbitrary implementation specific quirks, all motion obeys several different equations.
Linear: s = s0 + v0*t + 1/2*a*t^2
Angular: theta = theta0 + omega0*t + 1/2*alpha*t^2
Linear Interpolation: (1-t)*s0 + t*s1;
By using deterministic equations instead of implementation specific quirks, particle behavior can be made more consistent across varying frame rates, and additional performance optimizations can be utilized. Additionally, because these equations are well specified, 3rd party tools can easily be made to work with BlurrrParticle.
Try the Blurrr SDK particle editor "Sparkle Sparkle". Sparkle Sparkle source code is also made available as an example.
Particle properties may also be saved and loaded through JSON.
Sample Usage:
Performance Tips: