Emitters Demo

  • Hi all,

    I've made an Emitters class for my games emitters. It extends FlxGroup and I create/define the public emitters in the new() constructor. It also has some functions in the class to emit on objects, particle and points. All the emitters and functions are public static.

    It works great for my game, but I'm wondering if there are any drawbacks doing it the way I am.

    You can check out the demo project here

    It has a few sample emitters defined, but they can be changed and others can be added to the Emitters class as needed.

    I appreciate your feedback, and feel free to use the code however you want. Please let me know what you think of my method, whether it's good or bad.

    If anyone that knows all the ins and outs of defining emitters, I'd love to see some better examples that I can add to this demo.

  • Looks good. Did you try spamming the buttons? I am on a high end PC and it was lagging after a few emitters

  • @bronson-sedeno

    Thanks. Which platform does it seem laggy? I'm on an old laptop with win 7 and don't notice it. Are you in debug mode?

    This demo is more for thoughts on the way I'm doing it with static emitters. I'm doing it this way on my game with ~30 static emitters and I'm mostly targeting windows, android and flash, and it seems to work fine. html5 might have some issues with excessive emitters, but the other platforms seem ok.

    Anyway, thanks for checking it out.

  • Oh ok, yeah I was doing it on your website, so on HTML5. Looks great though

  • Rain lags the simulation a ton, with just a single click. Then again I don't really have the best PC, so that may be why.

  • @vulpicula
    I guess for html5 this isn't so good with some browsers. Maybe it's a problem using static, but I'm using them with windows, android and flash with good results. Maybe I should have made the demo with flash.

  • There is an emitter I pulled that works absolutely amazing in HTML5 with no lag on my end. Then again its with openfl and not flixel.

    Here it is if you want to check it out (not mine):

  • @bronson-sedeno

    Thanks! I'll check it out.

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.