Welcome to Null City Software
Tasty, tasty software.
Null City Logo Home Kitae Breeze Products Login Forums Contact Us About Us
By RobHutchinson on 23rd Sep 2009 @ 07:17PM
I've not worked on the engine a great deal recently, as I've been working quite heavily on the game I'm writing with the engine. However, after manually building a lot of the particle effects I wanted to use in the game, I finally knocked that on the head and started working on the main particle building editor for Kitae. I thought I'd share some of the early results. The particle builder is fully integrated into the Game Editor application and allows you to build and test complicated and often convoluted particle emitter effects on a design surface, rather than in code.

The particle system in Kitae is probably not as high performance as others out there, however it is incredibly powerful. Any kind of actor, be it sprite, animation, text, tile map can be used as a particle within the system and all particles have the same abilities and functionality as any other actor. This of course means you can perform collision detection and other actions against particles. Each particle has a set of controllers which can assist in giving it additional behavior elements, such as physics. Additionally, controllers are also used to manage the lifetime of particles, attaching a CameraCullController object to a particle will remove the particle when it leaves the visible camera area. There are plenty of controllers and that's the bit I've not finished yet.

Having said the performance is a bit squiff, the engine has no problem belting out 10s of thousands of particles in tests I've performed myself. It's easily performant enough for most games. You would have no problem building weather, fire, wind, or even some water effects with the system. Hopefully I'll be able to put up a lot more video demonstrations of different effects in the future.

Here's the editor in playback mode.

On my nearly 2 year old PC, the above effect, despite there being thousands of off-screen particles runs at way above 60fps without ever dropping a frame.

This effect is simply two particle types (essentially sprites), one sort of firey smudge, which provides the outer glow, and one thick white fire spark which is the white particles you can see the most of in the image. These are sprayed from the emitter at differing force, scale, direction, etc. All controlled from the editor. So you can play and test the effects as you build. The editor already supports zoom, pan and layer effects so you can look around as you watch and build your particle effect. Here's a video of me doing exactly that in the editor:

This effect was the first thing I've come up with, and did so in about five minutes, so the potential is there already to build some very impressive particle effects. Of course, once you're done with the designer, all you need do is drag and drop the emitter onto your scene and activate it in game, productivity WIN!

One quite important aspect of creating particles with Kitae is the 'spawn rate' - how and when after the emitter is activated should particles begin appearing. Because this is tricky thing to implement yourself and 'spawn one every X milliseconds' is not good enough, I've gone for the most robust approach I could think of - timeline curves! Each emitter either repeats or is one shot. The spawn rate is responsible for deciding when the emitter has completed, and of course you are alerted to this in the form of an event or simply by monitoring the state of the emitter in your game loop.

As you can see, over a set time period, you can adjust the rate at which particles are spawned, allowing you to, for example, launch an arrow every 3 seconds from a trap, or produce a dealy timed flame-thrower effect that the player must avoid. I'm hoping that this along with the diversity of the controller system will allow users to build just about any effect they can think of, and test it without ever having to launch their game.

That's enough jabber for now, I'll put up some more interesting effects once I've gotten a bit further with the editor.
Rob - Null City Admin
Enter your own comment
Enter your name:

Enter your comment:

Null City Software
Null City is dedicated to developing top quality sofware products for Windows PC, XBox and Windows Phone. We specialise in games and .NET applications & components.