#FX system, Overdoing or Extendable?

1 messages · Page 1 of 1 (latest)

tame sluice
#

then I would be able to build a visual effect based on these types...

export const crusherFX: FX.Config = {
    effects: [
        {
            type: FX.Types.ANIMATION,
            assetName: "CRUSHER_TRAP",
            delay: 0,
            config: {
                offset: -5,
                partName: "MOVEMENT",
                downEasingStyle: Enum.EasingStyle.Linear,
                upEasingStyle: Enum.EasingStyle.Quad,
                upDuration: 0.8,
                downDuration: 0.1,
                pauseDuration: 0.5,
            },
        },
        {
            type: FX.Types.SOUND,
            soundId: SoundId.ENERGY,
            delay: 0,
            config: { volume: 0.8, pitch: 0.9 },
        },
        {
            type: FX.Types.PARTICLE,
            assetName: "EXPLODE",
            delay: 0.1,
            config: {
                lifetime: 1,
                emitDelay: 0,
                emitDuration: 0.5,
            },
        },
        {
            type: FX.Types.SOUND,
            soundId: SoundId.SLAM,
            delay: 0.1,
            config: { volume: 1.0, pitch: 1.2 },
        },
        {
            type: FX.Types.PARTICLE,
            assetName: "DUST",
            delay: 0.2,
            config: {
                lifetime: 0.4,
                emitDelay: 0,
                emitDuration: 0.2,
            },
        },
    ],
};

In theory, this makes sense, but it really shrinks the ability to make different effects that are not within such parameters.

#

Making the handlers for all the different FX Types like particles, sounds, Animations, all could technically be streamlined into one single system and abstraction, then allow the Visual effect to be overridden into these templates which tell the Visual Effect how to be handled (essentially just changing the asset), but it is very challenging and not sure if it is worth the effort at this point since it has been several weeks.