Monday, May 24, 2010

Particulars

When it came time to decide on different types of weapons, I realized that I would need to implement some sort of explosion system, rather than a simple projectile collision like I had to start. I debated having a defined, hard-coded explosion/splash radius, but I was working through a particle engine tutorial (RB's tutorials are very helpful and easy to follow!) to learn C# and decided to try that instead. It looked beautiful for explosions, so I worked it into my projectile system. That was a while ago - today I finally hooked it up so that each projectile checks if it is hitting a unit and actually deals damage.

With the particle engine, I get unique, somewhat random explosions every time, so there's no relying on a rocket doing X damage within a radius of Y. The particles go in random directions, and each carry a bit of the rocket's total damage with them. I can tweak the engine for each weapon type to vary the size, velocity and damage it does. This reduces the need for more complex sprite designs, too. Each explosion is just a combination of one basic shape.

Here is a screen showing all the different particles I have so far:


Please keep in mind that they are hard to catch mid-explosion, and don't look as impressive when taken as a single frame - they are moving, fleeting splashes of color.

No comments:

Post a Comment