Particle system for OpenFl.

cross, emitter, game, openfl, particle, particles, haxe, particle-designer, particle-emitter
haxelib install zame-particles 1.0.5


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 / Renderer GLView Sprites Tilemap
effects: full,
speed: fast,

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

best choise
n/a effects: almost full,
speed: almost fast,

best choise
effects: no,
speed: fast
cpp n/a effects: almost full,
speed: almost fast,

best choise
effects: no,
speed: fast
neko n/a effects: almost full,
speed: very slow
effects: no,
speed: almost fast,

best choise
flash n/a effects: partial,
speed: not so slow,

best choise
effects: no,
speed: not so slow

Product support

Product still is in development (but not active).

Feature Support status
New features Yes
Non-critical bugfixes Yes
Critical bugfixes Yes
Pull requests Accepted (after review)
Issues Monitored
OpenFL version planned to support Up to 4.x, and probably later, if Tilemap wouldn't be deprecated like Tilesheet
Estimated end-of-life Up to 2019

Roadmap for future

  • Support for .json output format
  • Support for .lap and .pex output formats
  • Support for embedded textures
  • Create importer for particles in luxeengine
  • Implement SpritesRenderer
  • Implement Stage3DRenderer
  • Implement TilemapRenderer
  • Fix rotation calculations (to be the same for all renderers)
  • 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