#VFX Management

1 messages · Page 1 of 1 (latest)

high hornet
#

Hey,

Recently I've been digging deeper into architectures, but one question stuck me about visual effects. What I call "effects" is any visual cue that aims to improve QoL, the juice of the game or both.
For instance, right now, I have a project where I roll dice. I want the result of the dice to pop up above it when it stops rolling, then does a little animation. The animation part is not the problem here.

Is there any advice on managing these kinds of things ? Right now the dice each have their ResultAnimation script, but the way i've done it is instantiating an object that would show the number and play the animation when the result rolls. However, having that script on all dice doesn't seem that much scalable and a good practice.
Isn't there any commonly used way to centralize this ? Making it generic enough for anything to play any effect ? If I want to reference sprites for animations or something, having them all on each dice must not be a good way of doing it, right ?

plucky granite
#

not sure about the systems aspect, but for the dice effect specifically - since it's applied on all dice, why not just have it be part of the prefab, then activated rather than instantiated?

#

kinda like object pooling

sinful gate
#

There's not really any harm in having it on the prefab itself i.e. having it on all dice.

If you actually want a centralized scalable system for juice effects, you might need to author one yourself according to your needs, or maybe have a look at more mountains MMFeedback and Feel unity assets

high hornet
#

Alright, I see.
Out of curiosity, how do bigger games generally handle these kinds of things?

high hornet
plucky granite
#

im not saying to use object pooling

#

just the idea of not instantiating every time

cerulean geode
# high hornet Hey, Recently I've been digging deeper into architectures, but one question stu...

Keeping it on the prefab is fine, otherwise you can have a centralize system for the VFX via singleton that you can call and instantiate an effect when given coordinates and the effect you want, but you're still hardcoding that type of effect (via key) on the dice prefab one way or another. The reason to do it this way however has the benefit of being able to pool effects, but it's not a requirement for most games.

#

Benefit of keeping it on the prefab too is unity will load the dependency when bundled, but keeping it centralize will require a bit more management for how these dependencies are handled.

#

But again, many small games can just upfront a lot of that cost as mem is cheap ;p