11/12/2014

first projectile: fireball

The wizard is now ingame and can attack the player with fireballs.

wizard casting a fireball at the player
The fireball itself is a blender model (a half sphere with a cone shaped tail) and it creates an alpha blended sprite every few frames of travel. These sprites have one of three random colors and fade out over half a second.
These sprites (and also the combat-text sprites and the hit-effect sprites) are never destroyed but kept in an array and the next effect will reuse the first currently invisible sprite and only create a new one if no unused sprite is available.

I was looking into three.js particle systems (which are now actually named point cloud) for the animation effects - but in the end I went with simple sprites because it's easier to handle. The amount of sprites can be increased on the fly (this is not possible with point clouds) and also the amount of particles/sprites needed is so low that it does not (yet) matter performance wise.

No comments:

Post a Comment