Wednesday, February 5, 2014

Particles And Special Effects

Explosion
Trailing Particles
Starfield Effect
                   
Ever wonder how some games create those cool effects like a fire burst, engine flame, explosion or smoke?  Well unless they are big fans of creating every frame of an animation and then programming the way each frame's timing, they probably use particles.  Particle system are a programatic way of taking a small image and using a set of commands to make that image appear all over the place in a semi-consistent manner.   You can specify many different aspects of the particle system and get wildly different effects.  Each particle will move, grow, live, die all within the constraints you specify.  Oh yeah, they are super cool too.
    Game developers have been using them for a while, but you had to do some tinkering to get the effect you were thinking about.  In the past, you needed to experiment with a custom coded program to try out the different effects.  You could code up a framework to show off different particle effects  and then capture all the various elements to recreate in your App.   Myself, I found a nifty program called Particle Designer to experiment with the different effects to get my desired results.  It was well worth the money and many developers were creating some excellent examples of what can be done with particles.
    In fact, my first use of particles was in Letter Rain to show the rain drops falling in the background.   I did also use frame animation to show the letters splashing, but a more realistic effect could have been done using particles.  Building the rain effect was a matter of experimenting and adding some custom code overrides into basic UIView, which is the basic 'screen' for most Apps.  It was fun and educational, but tedious to work with when you needed to adjust the system.
   Last year, Apple really upped the ante for developers by making particle effects much easier to use by adding particle design to the XCode development environment.  Now you can view particle designs within the development tool and even better, save the environment file for later import into your App.  It is much easier now to add your favorite effect to a game.  One caveat is that you will need to be using the latest iOS 7 operating system on your device.  C'est la vie.  I had already made this choice when I started building the latest game in Sprite Kit, so I might as well use everything that is available.
    The last few days I have been trying to tie all the various programing elements like physics, 3D images, and now particles into a coherent game design.   It is fun and the effects are well received by the kids, but you can really see how most Apps need a team of specialists to get the right product created.   Given my limited resources, it is simpler to just scale back the expectations in order for the project to get completed on time.   Lucky for me, particles have become much easier to create and use in a game.  It is once less thing I have to scale back my expectations on.  Hopefully, the final product will reflect this.
    Now do I need flames or glowing fireflies behind those throwing disks?





No comments:

Post a Comment