I’m in the beginning of designing a client side view level system to play combat effects.
So basically when an entity perform a combat action like melee attack/ aoe attack /projectile attack /heal spell,…) at server side we are mainly playing with Stats, increasing some stats, decreasing other stats and so on and so forth. I have already come up with base implementation for this part.
But what happens in client side, actually we listen to those action entities and when ever an action for example
MeleeAttackAction( Name:"BigSword", State:"Start" ) starts we play animation, sound, particle effect, …
So I want to design a flexible system at client side to do those.
Now there are bunch of ways come to my mind :
For each attack type (ex : “BigSword” Attack) I can create a groovy script which needs to play the animation/sound/particle effects for that attack.
Using Tweens, Lemur includes an abstract Tween based mechanism for playing tween effects.
I am interested for the later approach, but I am uncertain how best I should put things together.
Should I create one Tween for playing sound, one for playing particle, one for animation, and then mix them together to create final effect !?
Should I use EffectControl for playing those effects !?
How should I save the mixed tweens, should I serialize them to JSON !?
I want to hear from pros about their ideas, and what approach they would chose.
Feel free to share what you think about this.