This is a tutorial course for those who want to try out various expressions first!
Before taking this tutorial course, we recommend completing the following:
Please note that this course continues to use the project created in the first tutorial. If you have deleted it, please prepare a new tutorial project by restarting the tutorial.
Try switching between them. Note that changing this template will overwrite all existing nodes, so avoid modifying it after adding custom particles. Once you are done testing, switch back to NONE to return to a state with no child nodes.
The setup is now complete. The next STEP will explain the basics of creating custom particles.
Explanation
CPUParticles and GPUParticles
There are two similar nodes; what is the difference?
Simply put, the difference lies in whether the processing uses the CPU or the GPU (Graphics Processing Unit).
Correctly speaking, you should choose between them based on what kind of processing is heavy in your game. However, for 2D games where graphics processing tends to be the bottleneck, it is usually better to use GPUParticles.
Look at the central window. If you zoom in, you should see small dots falling downward. This is due to gravity. To make it clearer, let’s temporarily set the gravitational acceleration to 0.
Click on ParticleProcessMaterial to expand it. Change the y value under Accelerations > GravityRate from 98 to 0. Gravity will be disabled, and the particles will no longer fall.
Godot’s particle system is highly advanced with many settings. Here, we will only check the most basic parts. Please ignore all menus except “Spawn” for now.
First is Spawn > Position. This changes the emission range. Try setting it as follows:
Emission Shape Scale: x30 y30
Emission Shape: Sphere
Dots should now appear within a circular area with a radius of 30 centimeters.
Skip the next setting, Angle, as it is a special configuration.
Spawn > Velocity sets the direction and speed of particle emission. Try setting the Initial Velocity min to 10 and max to 100. The particles should move at speeds between 10 and 100 at a 45-degree angle to the right.
Settings other than Spawn make the movement of these particles more complex and will be added according to your needs. For now, close the Process Material and try the other basic menus.
Try changing Max Amount at the top of the Inspector from 8 to 16. This sets the number of particles, so the count should double.
Try changing Time > Lifetime from 1 to 0.3. This indicates the duration of the particles. Since new particles are generated as soon as others disappear, the movement should become more intense.
Try turning on OneShot. Since the particle display will stop, please also turn on the Emitting checkbox. As the name suggests, OneShot emits particles only once and does not regenerate them. Emitting toggles the particle generation state on/off. When OneShot is on, Emitting will automatically turn off after the particle duration ends.
Return to Time and try changing Explosiveness from 0 to 1. As the name suggests, this option creates an explosion-like effect, emitting all particles instantly instead of continuously.
The textures are all at the same angle; I want them to be random.
By changing Spawn > Angle in the Process Material that we skipped earlier, you can randomize the initial angles. I want to add acceleration.
You can adjust acceleration in the Accelerations menu of Process Material. You can set accelerations such as Linear, Radial (from the center), and Tangential (circular motion). I want to add variation to the movement.
You can change the movement, such as angle, direction, and circular motion, using AnimatedVelocity in Process Material. I want to add variation to the appearance.
You can set size, color, animation, etc., in the Display menu of Process Material.