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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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