View Single Post
scratt
Veteran Member
 
Join Date: Jul 2004
Location: M-F: Thailand Weekends : F1 2010 - Various Tracks!
Send a message via Skype™ to scratt 
2010-06-15, 05:57

This is another couple of rough shots from my sandbox, but shows me testing the "Pixel Cube Particle" system for explosions. I'll be augmenting this with a normal particle system too. So we get more eye-candy, and the individual cubes disintegrate at the end of their lifetime.

You can also see some Swarmers, err.. swarming, in the distance!



The cubes are unlit at the moment, so appear to be just one solid colour. That's because I have not sorted out how I am going to light stuff to give it a nice shiny feel. But the cool thing about these particles is that they are actually geometry cubes, that can rotate, and also fall according to gravity and bounce on the landscape. (I noticed that one of my vertices is out on the cubes also when I looked closely at these shots. Easy to fix.)

I was mainly worried that this would be very slow, on the original iPhone particularly. And had some plans to vectorize the maths. But even in simple C, with a bit of clever batching it has turned out super fast. So I still have the vectorisation to use later if I need to squeeze more speed out of things. As it stands we can have a few thousand fragment cubes on screen, flying around, and bouncing on the landscape etc.

When they hit the water level, they'll fizzle out and I'll make some steam rise up also. I just decided! That is if we keep water in the landscape.

I've also got a description system, which is basically text files that describe the positions and colours for the particles for each type of explosion. So we get appropriatly placed and coloured particles for each type of enemy exploding.

Also because these are 3D objects and not particles / sprites they scale properly as they come out of the screen, and look exactly like the "pixel" components of the objects they come from..

'Remember, measure life by the moments that take your breath away, not by how many breaths you take'
Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt
  quote