Flocking behaviour in particles

Among the new actions added in version 1.0 are three that cause interaction between particles. These are

ApproachNeighbours which causes nearby particles to move towards each other.

MinimumDistance which causes particles to keep a minimum distance between themselves.

MatchVelocity which causes particles to adjust their velocity to match the average of all near neighbours.

By combining these actions, we can create flocking behaviour, where particles approach each other, but not too close, and match the velocity of the particles around them. I've added an example to the examples section of the site.

Version 1.0.0 released

I uploaded version 1.0.0 this morning. This version features a number of additions and a couple of key structural changes.

The structural changes are

Changes to setCounter

The counter in the emitter is now a getter/setter so rather than

emitter.setCounter( someCounter );

you need

emitter.counter = someCounter

Changes to Rendering

The rendering has been moved out of the emittter into a separate set of classes. So rather than

var emitter:DisplayObjectEmitter = new DisplayObjectEmitter();
addChild( emitter );

You need

var emitter:Emitter = new Emitter();
var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
emitter.renderer = renderer;
addChild( renderer );

This allows much greater flexibility over the renderers, which is particularly important when moving flint over to use in 3D environments, which is the next stage in the project.

All the examples on this site have been updated to reflect these changes. I'll write about the new additions and add some examples to illustrate them over the next few days.

Version 0.9.4 released

Now in SVN and download. The core features haven't changed but I have added a number of new behaviours.

LFPUG Presentation Slides

Yesterday's presentation at the London Flash Platform User Group went well. Everyone was very enthusiastic about Flint and I got a lot of ideas for features from the audience. Thank you to everyone who was there, and to Tink for organising it. I had a good time and I hope you did too.

The slides from the presentation are here.

Presentation about Flint in London

I'm doing a presentation about the Flint this Thursday (28 February) at the London Flash Platform User Group. As well as showing how to use Flint to create particle effects I'll be delving into the underlying code architecture and showing how to customise Flint to your own requirements. I'll also be looking at some of the specific problems I encountered and solutions I employed in developing Flint so hopefully the talk will be of interest to any developer, not just those who want to create particle effects.

Entry is free, so you can just turn up on the night. But if you sign up on the website in advance you could win a Flex or Actionscript book.

Version 0.9.3 released

I uploaded version 0.9.3 today. There's a new counter - the TimePeriod counter - which emits particles for a set period of time and then stops. Easing functions can be used to modify the rate of emission over the time period so more particles are emitted at the beginning or the end.

I also made a number of optimisations to improve the performance, particularly with particle systems containing thousands of particles.

I also modified the emitter to allow prioritising of actions. This was important for actions in which the particles react with each other.

I've added one action in which the particles directly affect each other (there will be more later). It's called MutualGravity and as the name suggests it involves the particles exerting a gravitational force on each other. I'm not sure how it will be used but it seemed like a good place to begin with these intra-particle actions. It's demonstrated in this example.

Making fire with particles

We now have two examples creating fire. The first I mentioned earlier sets fire to the Flint logo. The second creates a fire and smoke effect. Both are in the examples with full source code.

Version 0.9.2 released

I uploaded version 0.9.2 yesterday. I've made a big change to the package structure to reflect the new website - everything is in org.flintparticles instead of bigroom.flint. A couple of the classes have been renamed (all the zone classes end with the name suffix Zone, MoveEuler has become simply Move, and LineShape has become simply Line. I've added some new effects including DeathOffStage for simply removing particles when they leave the stage and two new zones, BitmapDataZone and DisplayObjectZone.

The BitmapDataZone and DisplayObjectZone enable you to use a BitmapData object or a DisplayObject object to define the area in which the emitter emits particles. The initial idea came from Julien who wanted to add particle effects to a logo. With that in mind, I used the BitmapDataZone to create this example.

First post

Hello and welcome to Flint's new home. It's early days yet but as we approach a 1.0 release I felt it was time for Flint to look after himself. There's lots to add to this site but the basics are here. Come back as often as you can; we like having you around.

next posts