10.creating-the-pickup-particles

Creating the pickup particles

In this video, we’ll create the little rising stars effect to display on the pickups using the Particles2D node.

New concepts

Particle systems

In games, we often use a technique called particles to create visual effects.

It consists of creating and animating many small sprites that each move based on a set of parameters.

Particle systems are great for creating chaotic effects like fire, smoke, trails, and much more.

They do not support your usual physics interactions to maximize their performance. On a modern computer, you can have millions of particles updating in real-time on the screen.

Particle materials

A material resource drives the particles’ motion. That material is what we call a shader. Shaders are programs that run on your graphics card and update the appearance and position of each particle every frame.

Godot comes with a pre-made material with many properties. If you need more properties, or a specific motion, you can learn to code shaders to manipulate the particles using code.

Just note that programming shaders feels very different from GDScript, and it tends to involve more math.