Jump to content

Multiplayer phaser game - constant emitter


Recommended Posts

Hi all, 


I'm creating a phaser+socketIO game where people have to race each other.

I'm providing all players with an emitter as a trail.

Ideally I'd like to keep a constant flow on the emitter but it always shoots out in bursts -_- 

When I look into the rain example I see a constant particle flow: http://phaser.io/examples/v2/particles/rain


But with my project it only bursts. I know that it has to do with lifecycle and frequency but I'm a bit confused after all my tries.

Emitter is made inside a Player object which holds the body sprite as well.

​this.emitter = game.add.emitter(this.sprite.x, this.sprite.y);this.emitter.makeParticles('particle');    //this.emitter.setXSpeed(10, 10);    //this.emitter.setRotation(0, 0);    this.emitter.setAlpha(1, 0, 1000);    this.emitter.setScale(0.8, 0, 0.8, 0, 3000);    this.emitter.minRotation = 0;    this.emitter.maxRotation = 0;    this.emitter.gravity = 0;    this.emitter.setXSpeed(-400, 0);    this.emitter.setYSpeed(-5, 5);    this.emitter.start(false, 1600, 5, 0);

Thanks guys, phaser kicks ass!

Link to comment
Share on other sites


  • Recently Browsing   0 members

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