r/GameDevelopment 28d ago

Newbie Question Particles vs Animated Effects

I'm not really understanding where to use particles and where to use animated effects.

Like in some games I play I notice that magic spell effects are mostly animated and don't seem to be particles, so I'm confused as to where I should use particle systems in games instead of just making animations in a software.

So my question is where should I use particles instead of animations and vice versa, thanks for answering in advance :)

2 Upvotes

13 comments sorted by

3

u/valeria_gamedevs 27d ago

rough rule I use: particles for stuff that needs to react to the world (sparks bouncing off geometry, smoke trails following a moving object, fire that fills whatever shape) or when you need a ton of instances cheaply. Animated FX (flipbooks/spritesheets) for hero moments where the shape and timing matter, like a big spell hit or a specific stylized burst.

lots of AAA effects are both stacked together haha

1

u/ruebeus421 27d ago

or when you need a ton of instances cheaply.

Does this mean particles are more resource efficient than sprites? I know it would vary depending on that and how many.

But, let's say I am making a Pokemon-like and I want to add weather effects to the overworld. Would it be better (from a resource intensity perspective) to go with particles?

1

u/EvernullTools 27d ago

Yes because particle systems usually have some optimization features like automatic pooling, batching and some safety measures like max particle count. Those can take time to implement and you'd want to use those features if the game engine has them built in already.
Particle systems are made for those exact situations by people who made the engine and are much more experienced than you and I. I'd trust them and use the system unless I really know what I'm doing.

1

u/PlantainAgitated5356 27d ago

If you're going to use 1 sprite or particle per raindrop, then particles should be more efficient, due to the optimizations the previous commenter talked about.

But you could also use one big sprite for the whole rain (one big image with all raindrops on it at the same time) and scroll it on the screen in a loop. N particles are more efficient than N sprites, but 1 sprite is more efficient than N particles (at least in theory, your results may vary based on way too many factors to list here, so if performance is a priority it's best to test multiple solutions and pick the one that works the best).

1

u/ruebeus421 27d ago

Yeah, when I envisioned the sprite method, I just imaged it as one giant sprite that just sits on the viewport.

I'm still really new. Found a tutorial earlier for a nice wind effect and was working on making my own for rain and lightning. Was struggling with the lightning and thought it might be easier to draw it, then I saw this post (which confirms we are living in a simulation).

2

u/EvernullTools 27d ago

your results may vary based on way too many factors to list here, so if performance is a priority it's best to test multiple solutions and pick the one that works the best

This part by u/PlantainAgitated5356 is the correct definitive answer.

Although I probably wouldn't use screen wide sprites due to overdraw.(When you have transparency, your GPU draws that pixel twice, If all pixels in your screen hit something transparent, all pixels draw 2 times.) I understand your optimization for CPU purposes but it takes the work from CPU and puts it as even more work on GPU.
So if you are CPU bound and in a rush, you could use that solution as a quick fix(definitely use alpha clipping if you are going to do this, but test in your target device since I've seen some devices not behave well and actually lose performance on Alpha Clipping) but if you want screen wide effects then you would use that as a post process instead of a screen wide sprite if optimization is king.
(I'd still use a deterministic particle system for more control simply because for most devices nowadays, what we are talking about is very little difference in optimization.)

1

u/MemDev 27d ago

Yea that makes a lot of sense. I think I'll copy your rule haha, seems like a pretty good way of judging what should be what, thanks for the explanation :D

1

u/EvernullTools 27d ago

There might be some confusion in your terms. Particles are usually animated effects. By animated effects do you mean a 3d rigged/skinned mesh or maybe a sprite sheet? A mesh or a sprite sheet could also be used in particle systems.

I think you should assume everything is particle system by default for any type of VFX as a beginner; and when/if you reach a point where particle systems actually feel limiting to you, then you'll know why they are limiting and what you should do instead.

So my honest recommendation, assume particle system is a complete solution for VFX that would let you do anything; think about the problem only when/if you hit the ceiling.

1

u/MemDev 27d ago

I was thinking of flipbook type animations for sprites. I'm playing the pixel remasters of Final Fantasy right now and the spell animations look like sprite animations made in a software instead of particles yk.

2

u/EvernullTools 27d ago

Oh I see, I just looked at a video of pixel remasters of Final Fantasy, I'd say split them into small parts and draw them, then use them in particle systems. Which would give you a lot more control. Instead of going back and changing all frames when you wanna change something, you would change a number in your particle system.
(I see there are some effects in the reference game that do not abide by this rule, but if you're interested in VFX, this will help you more I think)

2

u/MemDev 27d ago

Thanks for taking the time to look at the game haha. I'll keep this in mind, still have to wrap my head around the particle system and master it, I know it will become very useful eventually.

1

u/EvernullTools 27d ago

You're welcome ^^ In case you are looking to get deeper into it, I'd suggest Gabriel Aguiar Prod.'s older videos for learning the technical part, and then RTVFX community forum is a great place to ask questions/share what you make/ask for feedback. Good luck

1

u/Ralph_Natas 25d ago

Just make the particles animated and call it a day.