Jump to content

EPSy a particles system for Phaser


Ezelia
 Share

Recommended Posts

Hello folks.

 

For a game I'm developing, I needed a particle system that work with Phaser and Pixi, I didn't find any that's easy to integrate so I started my own.
It's highly inspired from a Matt Greer tutorial .

 

The full source code of the particle system + Phaser, Pixi and Canvas plugins is available here : https://github.com/Ezelia/EPSy

 

usage with phaser is very easy

include EPSY.js and EPSY.Phaser.js

then

var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'gameContainer', { preload: preload, create: create, update: update, render: render });function create() {   game.physics.startSystem(Phaser.Physics.ARCADE);   //initialize the plugin   var epsy = game.plugins.add(Phaser.Plugin.EPSY);   //config contains an exported data from editor or a programmatically generated data   var particleSystem = epsy.loadSystem(config, 200, 200);   // you can let Phaser add the particle system to world group or choose to add it to a specific group  var myGroup = game.add.group();   myGroup.add(particleSystem1);}

I also developed an online editor to make it easy to create and export particle systems.

the exported package is ready to use with phaser as shown on this video.

 

 

Some features

  • Compatible with Pixi and Phaser (WebGL and Canvas).
  • Usable with a standalone Canvas renderer.
  • Possibility to combine multiple emitters.
  • Predefined emitters (more will be added).
  • Use a custom image as particle texture.
  • Easy design with the online editor.
  • Export/import data in json format.
  • Configuration support : Gravity, Colors, Radial/Tangential velocity, move equations ...etc

 

 

TODO

  • Pixi specific export (like phaser)
  • Position Initialisation equations
  • Controlling Emitters (stop/resume/cycles)
  • ==> your suggestions

 

 

You can test the editor here : http://labs.ezelia.com/epsy/

and export Phaser ready particles.

 

 

the exported examples on the video can be downloaded here :

http://labs.ezelia.com/epsy/EPSy-phaser-export1.zip

http://labs.ezelia.com/epsy/EPSy-phaser-export2.zip

 

I'm doing some code clean up and I'll upload the Particles System full source code to github

 

 

please note that the editor is still in beta stage and have some known issues, please report any abnormal behaviour/bug.

 

Your comments and suggestions are welcome :)

Link to comment
Share on other sites

  • 8 months later...
  • 1 year later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...