🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·🇬🇧 Limited Time — UK Only·🎓 Free Learning for 1 Month·🤖 Free AI Training Included·📚 4,000+ Lessons · 35,000+ Quizzes·🏆 GCSE Mocks · Olympiad Papers·⚡ Selected Students Only · Limited Places·🎁 Free Value Worth £2,000·
🎮 Game Design

Particle Effects — Explosions & Sparkles

Particles are small short-lived visual effects — sparks, smoke, coins flying. You spawn many tiny objects at once, each with a random velocity and a limited lifetime. Each frame, move them and reduce their life. When life reaches 0, remove them.

3 min 10 XP Lesson 8 of 9
Particle Effects — Explosions & Sparkles

Particles are small short-lived visual effects — sparks, smoke, coins flying. You spawn many tiny objects at once, each with a random velocity and a limited lifetime. Each frame, move them and reduce their life. When life reaches 0, remove them.

Quick Quiz

1 / 2

What does p.life -= p.decay do?