Author Topic: FlxEmitterExt - An extended emitter class  (Read 4024 times)

krix

  • Member
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
FlxEmitterExt - An extended emitter class
« on: Thu, May 19, 2011 »
If you want a bunch of particles to emit in a 360 angle you'll notice that the FlxEmitter spawns them in a square. The result is that it looks like as if all particles are imprisoned in an extending square. This sucks if you want to use emitters for explosions. Also all emitted particles will disappear at the same time, as you set the same lifespan for all of them. :o

Therefore I wrote this extended FlxEmitter that emits particles in a circle.
It also provides a new function "setMotion" to control particle behavior even more.
Note: This was inspired by the way Chevy Ray Johnston implemented his particle emitter in Flashpunk.

Here is a particle demo to show the new emitter and to compare it the old one.
Also here is the github link to the demo-project and a link to the FlxEmitterExt class.

Cheers,
Dirk

Wing Eraser

  • Guest
Re: FlxEmitterExt - An extended emitter class
« Reply #1 on: Thu, May 19, 2011 »
That's great krix. I was looking for something like this for my next game.
Thanks for sharing.

3WG

  • Active Member
  • ***
  • Posts: 110
  • Karma: +0/-0
    • View Profile
    • Jeux.MU
Re: FlxEmitterExt - An extended emitter class
« Reply #2 on: Sun, May 22, 2011 »
Thanks for sharing
Flash games are FUN !
Jeux.MU

osro

  • Active Member
  • ***
  • Posts: 121
  • Karma: +1/-0
    • View Profile
    • Purppura
Re: FlxEmitterExt - An extended emitter class
« Reply #3 on: Thu, May 26, 2011 »
Sweet, thanks! Just what I needed to improve my explosion  :D

Michael71

  • Member
  • **
  • Posts: 37
  • Karma: +0/-0
  • War... War never changes....
    • View Profile
    • NetGfx
Re: FlxEmitterExt - An extended emitter class
« Reply #4 on: Mon, Jun 6, 2011 »
very nice, thanks m8, I'll be sure to use it!

initials

  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: FlxEmitterExt - An extended emitter class
« Reply #5 on: Mon, Jun 6, 2011 »
That is very nice!
Might try to get this happening for Flixel iOS
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart

Gama11

  • Contributor
  • ****
  • Posts: 390
  • Karma: +0/-0
    • View Profile
Re: FlxEmitterExt - An extended emitter class
« Reply #6 on: Fri, Oct 28, 2011 »
Very nice, thx for sharing this, I might use this in my current project, the demo looks awesome. :D  Should be included in the original flixel library.

camasthecat

  • Contributor
  • ****
  • Posts: 461
  • Karma: +0/-0
  • WOW! 400+ Posts!? Jeez! Do I have a life!?!?
    • View Profile
    • My site for thermalJS, an HTML5/Javascript engine kinda-like flixel:
Re: FlxEmitterExt - An extended emitter class
« Reply #7 on: Fri, Oct 28, 2011 »
Cool, I'm going to have fun with this! Thanks for the code and stuff! :)

dplucenio

  • Member
  • **
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: FlxEmitterExt - An extended emitter class
« Reply #8 on: Mon, Nov 21, 2011 »
Thanks a lot for sharing this, krix. I really like how Flashpunk emitters look so I can't wait to test this in my prototype!