Tuesday, February 23, 2010

Multiple Updates

Although I have to admit, Star Trek Online has kept a little distracted from Deep Blue, it hasn't been all photons and phasers.

HLSL Pixel Shaders
Thanks to an XNA video session by Shawn Hargreaves I've started playing around with some simple pixel shaders in Deep Blue. Earlier I used a pixel shader to add a subtle underwater "glow" effect to the game. It looks a little like you've been swimming in a pool that's been a tad over chlorinated, but I like it.

I used a glow shader from the XNA library on the site so getting it in the game was the big accomplishment, however at the time it didn't mean that I had a good understanding...or any understanding of the HLSL programming.

Now, thanks in part to Shawn's tutorial, I've successfully implimented a slight water distortion effect to the game. One unexpected side effect has been the loss of my nice smooth 'fade from black' fade-ins and I'm still trying to track that one down.

The last shader I really want to work in would be a circular ripple distortion effect for ship explosions and the bubble burst weapon.

Weapons System Update
The new weapons system is about 90% in place. There's a couple of final things to work out but it's a much more flexible system than the way I originally approached it. There are now three types of ammo and three types of firing patterns. Each ammotype has it's own O2 cost, trajectory and damage with easy to modify numbers for game balancing.

Pixel Perfect Collisions
AH! And in another "big win" moment, initial tests are positive that I finally got the per pixel collision detection working, both on animated and non-animated sprites. Further testing is needed, but things are looking pretty promising right now.

I probably need to make an updated game video soon to show off all this progress. Possibly after I get in the treasure system.