Menu
CoddyTech

Particles

Part of the Game Feel section of Coddy's Godot journey. Lesson 12 of 23.

Smoke, sparks, flames and dust are made of particles. A particle node throws out many small shapes, moves each one for a while and then removes it.

The node is CPUParticles2D. The robot has one under its feet called Thruster, set up to throw amber flames downward. It starts switched off.

$Thruster.emitting = true

emitting switches it on and off. A few other properties shape the effect:

  • amount: how many particles are alive at once
  • lifetime: how many seconds each one lives
  • direction and spread: where they fly
  • gravity: what pulls them
challenge icon

Challenge

Easy

Give the robot a thicker flame.

  1. In _ready(), set $Thruster.emitting to true.
  2. Set $Thruster.amount to 40.

Press Play: flame pours from under the robot. Then Check.

Try it yourself

extends Node2D

func _ready():
	pass

All lessons in Game Feel

Practice on your own: Godot playground