Smoke, fire, rain, snow, explosions and magic effects all come from the same underlying idea: spawn a burst of tiny short-lived objects that move, fade, and disappear. This module builds one reusable ParticleSystem that powers every effect by changing only its emit parameters.
self.vel *= 0.98 do each frame?1-B 2-B 3-B 4-B | 5 lifetime (compared to age) 6 emit (e.g. emit_explosion) 7 = Particle and ParticleSystem 8 = e.g. velocity/speed, color, lifetime (also radius) 9 = Rebuilding a list each frame allocates new memory; at hundreds of particles the cost is trivial, but at thousands the constant allocation/garbage collection becomes a real performance hit | 10 = Use an object pool that reuses dead Particle instances instead of allocating new ones every frame, and/or cap the spawn count for very large bursts