Client vs. Server Sided VFX Help

I’ve been working on a project that involves me eventually needing to add particles and meshes to the combat.

Right now, I’m currently handling animations and hit detection on the server. The reason why I put animations on the server is so that I can sync the hitboxes with Animation Events.


The problem arises with VFX. I can easily fire a remote event to the client and tell it to perform VFX, but there’s no guarantee it will sync with the hit detection on the server or remain in sync with the animations currently playing.

I’d imagine that a handful of quick particle emitters aren’t too stressful for the server, but larger effects and ones that involve explosions with debris etc. would begin to cause lag.

If anyone has experience scripting these sorts of things, I’d love to get some advice before I decide to go one way or another with this.

3 Likes

You shouldn’t have to worry about the server telling the client to play an effect to have inconsistent timing compared to animations playing. Both need to be replicated to the client, so even in case of high ping, both should be delayed and still be properly synced.

I recommend you use the approach you described of the server telling the client which effects to play and where. It is much better for performance and even in case of inconsistencies, it is better to design your game with regard to normal conditions, rather than high ping situations where there could be visual errors.

3 Likes