Tutorial: Expression Enhancement Course #1 Let's Use Particles.

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.

STEP 1: Let’s Create a Particle Object

  1. In the Scene tab, press + to create a new Scene tab and create a Game Object.
  2. The creation screen will open. Please configure it as follows:
    Name: Any (here, we will use test_particle.)
    Template: particles
    Type: Empty
  3. Once created, right-click the Scene tab and select Save, or use the Ctrl+S shortcut to save.
  4. The ParticleObject node created here is a dedicated node for handling particles in VisualScript. Select the ParticleObject node in the Scene window.
  5. In the Inspector window on the right, select Particle Template ID. Various preset particles are configured here.
  6. 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.
  7. Click the + button in the top-left corner of the Scene window.
  8. Add a GPUParticles2D node.
  9. 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.

STEP 2: GPU Particles Settings

  1. Select the GPU Particles2D node created in STEP 1 and view the Inspector window.
  2. Click on <Empty> next to Process Material and select New ParticleProcessMaterial.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. Skip the next setting, Angle, as it is a special configuration.
  8. 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.
  9. Try setting the direction to y:1 and Spread to 30. Now they will be emitted at a 30-degree angle downward.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. Finally, let’s add a texture. Drag and drop any image from the File System window under templates > objects > items > I_others into the texture slot.
  16. The dots have now changed to the texture image.

    Next tutorial here:
    チュートリアル: 表現強化コース #2 光と影を使おう。

Ideas for those who want to adjust further.

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.

The features explained here are just the basics of Godot’s 2D particle system. For more details, please refer to the official documentation below:
https://docs.godotengine.org/en/4.x/tutorials/2d/particle_systems_2d.html