Particle system for OpenFl.

To install, run:

haxelib install zame-particles 1.0.5 

See using Haxelib in Haxelib documentation for more information.

Particle system for OpenFl

(and for KHA, see below)

Demo (old version)


  • Can load files from Particle Designer or Particle Designer 2.
  • Support for embedded textures, both zipped or not.
  • Can load files from Starling Particle Editor.
  • Has 3 renderers - Sprites, Tilemap (OpenFL 4), and GL renderer.

Work in progress, more features coming.

OpenFL 3 note

This version supports OpenFL 4 only. If you still use OpenFL 3, find older version under branch openfl3.


Stable version from haxelib:

haxelib install zame-particles

Latest development version:

haxelib git zame-particles


First of all, append following to your project.xml:

<haxelib name="zame-particles" />

Next, in code, create particle renderer and add it as child to container:

var renderer = DefaultParticleRenderer.createInstance();
addChild(cast renderer);

Than load particle emitter config from file, and add loaded particle system to renderer:

var ps = ParticleLoader.load("particle/fire.plist");

Finally, call emit() where you need:

ps.emit(stage.stageWidth / 2, stage.stageHeight / 2);

See minimal example under samples/minimal for more info.

If you have multiple particle systems (particle emitters), you should use only one renderer for them:

var renderer = DefaultParticleRenderer.createInstance();
addChild(cast renderer);

var ps1 = ParticleLoader.load("particle/ps1.plist");

var ps2 = ParticleLoader.load("particle/ps2.plist");

var ps3 = ParticleLoader.load("particle/ps3.plist");

In some cases you may need several renderers, for example some particles on background layer, than player sprite, than some particles over player sprite. It is safe to use several renderers, but there is one important note about GL renderer for html5 with -Ddom. Browser give you limited number of WebGL contexts, so don't use too much renderers and test you game in various browsers.

Export notes

Embedded textures is supported, hovewer it is not recommended to use them for large images. For large texture images it is recommended to uncheck "embed" before export.

Renderer notes

  • html5 with -Ddom (GL renderer) - link
  • html5 in canvas mode (drawTiles renderer) - link
  • flash (old version of sprites renderer) - link

GL renderer is the best choise for html5 (with -Ddom) - it support many features and super fast. It use "hacked" version of OpenGLView to be able to add canvas with proper z-index. However GL renderer is available only for html with -Ddom.

Sprites renderer is best for flash, because it support color effects. Also use sprites renderer for cpp target (mac, linux, windows, android, ios) with OpenFL 4.

All other targets should use Tilemap renderer.

  • html5 in canvas mode - fast, but doesn't support color effects.
  • native - fast and doesn't support color effects too (but this can be changed in future).


Usually you don't need to choose renderer manually, just use DefaultParticleRenderer.createInstance() to create best renderer.

Renderers comparison

Target / RendererGLViewSpritesTilemap
effects: full,
speed: fast,

best choise
effects: no,
speed: very slow
effects: no,
speed: slow
n/aeffects: no,
speed: almost fast
effects: no,
speed: fast,

best choise
n/aeffects: almost full,
speed: almost fast,

best choise
effects: no,
speed: fast
cppn/aeffects: almost full,
speed: almost fast,

best choise
effects: no,
speed: fast
nekon/aeffects: almost full,
speed: very slow
effects: no,
speed: almost fast,

best choise
flashn/aeffects: partial,
speed: not so slow,

best choise
effects: no,
speed: not so slow

Product support

Product still is in development (but not active).

FeatureSupport status
New featuresYes
Non-critical bugfixesYes
Critical bugfixesYes
Pull requestsAccepted (after review)
OpenFL version planned to supportUp to 4.x, and probably later, if Tilemap wouldn't be deprecated like Tilesheet
Estimated end-of-lifeUp to 2019

Roadmap for future

  • [x] Support for .json output format
  • [x] Support for .lap and .pex output formats
  • [x] Support for embedded textures
  • [x] Create importer for particles in luxeengine
  • [x] Implement SpritesRenderer
  • [x] Implement Stage3DRenderer
  • [x] Implement TilemapRenderer
  • [x] Fix rotation calculations (to be the same for all renderers)
  • [x] Partial support for pixi particles
  • [ ] Full support for pixi particles
  • [ ] Allow to pass BitmapData to loader
  • [ ] Allow to change particle system parameters dynamically
  • [ ] Move non openfl-related stuff to core (particle, particle system, utils, base loaders)
  • [ ] Support for lime / snow directly without openfl / luxeengine
  • [ ] Support for HaxeFlixel and / or HaxePunk?
  • [ ] Support KHA directly in this library

KHA port by RafaelOliveira

3 months ago

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser!

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github