All about the particles

Particle animations are one of the easiest things to implement in Pixel Game Maker MV, and they are something that can completely change a game! Using Particles helps to have a nice, polished, and dynamic effect in your game.

In this guide, we will learn more about how to make Particles and some tips about them!

### How to create a Particle

To create a Particle, go to animation > right-click > Add Animation

It will open a large window with preset Particles and the choice to Start with a Blank State.
You can explore the presets to find ideas or samples.

Let’s choose to Start with a Blank State.

The red rectangle in the middle is called the emitter, that is the source of our Particle. You can change the emitter’s height and length as you want.

On the right panel, you have many options to personalize your Particle.
We will review the main options:

* **Duration:** that is how long the Particle effect lasts - if you need a persistent effect, set it to be a looped animation
* **Amount:**the number of Particles emitted during the effect’s duration
* **Lifetime:**how long one Particle will stay in the game
* **Direction:**the direction in which the Particles are emitted.
* **Speed:** the velocity of the Particle emission
* **Starting Size and Ending Size:**You can change the size of the Particle here, making it bigger or smaller over time
* **Angle:**if you want your Particle to rotate, you can adjust the parameters here.

For each, you can change the variation so any Particle will never be the same!

There are two **Motions Patterns** you can choose from:

* **Gravity**, which is the basic setting for Particle. You can choose the direction in which the gravity pulls each Particle, great if you want to simulate some wind effect!
You can adjust the strength of the gravity, making the Particle lighter or heavier.
* **Rotation**, making the Particle rotate in a way or another. You can also use negative values here to change the rotation direction.

Then comes the **Particle Color** panel!

You can choose the opacity, color for the beginning, middle and end of the Particle, allowing to make some nice gradients and cool effects.
The colors are input in RGB (Red Green Blue) and have also the variation option to have more variety in the colors. Try this out!

You have plenty of forms to choose from in the already included **Particles Template**but you can add your own Particle! You just have to click on the  + and add a picture that is 24x24 pixel large.

Caution! The color you choose affects the Particle. If your Particle is already colored and you don’t want it to be affected by the Particle Color, choose an opaque white as the Particle Color.

**Others:**

The Others section includes the settings for what Particles should do when a Wall or Collision Detection occurs.
If you choose Don’t Add Detection, the Particle will overlay the layer where it is set.

**Layered Particles**

You can combine several Particles to make a truly unique effect by adding additional layers.

Click on the +  in the upper right part of the Particle panel, and it will add a new Particle layer.

*Example from the Puzzle sample game with three layers*

**Tip:** You can see in real-time the changes to the Particle by clicking on the player located on the bottom left!

### How to attach a Particle to an Object Edit

For this example, we open the Universe sample project and have a Particule animation displayed when the player fires a bullet.

Click on the “bullet” object and, in the right panel, on “Other Runtime Actions”

In Particle to Show, select the Particle [player]particule\_bullet created beforehand.

You can connect it to the center of the object or to a connection point you would select, or even a custom center of the object.
We decided to keep it at the center of the object.

Use the preview button to check the result.

And here we are!

### How to use Particles in a Scene Edit

The uses of Particles are infinite, but there two primary categories:

* As a background element to add atmosphere to your Scene like in our Sample games Witch & 66 Mushroom:

*The mushroom (object) and the pot (tile) have both Particles to give them life!*

* Or as a way to add juice and pop to your game like in the Sample Game Rabbit:

*The bricks debris, the effects on the blue box, the fire and the dust when the Player moves are Particles.*

You can use Particles to emulate leaves falling from a tree, explosions splash of water, the glowing eye of an enemy or the scarf of a hero… as with many things in Pixel Game Maker MV, the only limit is your imagination!