Search the Community

Showing results for tags 'Particle'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 42 results

  1. Hi fellow game developers. I have a problem: I want to scale up the particles that come out of an emitter, but they should still look like pixels and not have these blurry borders. So i tried "bullet_emitter[number].smoothed = false;", but this didn't work... In the docs it says you need to do someting with "new Particles(game)", but i don't get it. Anyways, if anyone could show me an example on how to set .smoothed = false; on all particles emitted from an emitter, i would be really happy. Here my game: click the "enter the game" button and press space when the game loaded. Now you should a bullet (the particle i want to be .smoothed = false;) emitted from an emitter beneath the player.
  2. icp

    Particle Trail

    I created a particle trail via emitter. It has its x and y properties set to the mainSprite . I would like to adjust the particle anchor so they appear from the back of the sprite , not from its middle. I tried the following : - adjusting the mainSprite anchor, however this affects the physics system and the input manager too so it's not an option. - setting the emitter position to mainSprite.x - offset(it only works if the sprite is moving on the x axis). - making the emitter a child of mainSprite (the trail stops working properly and you can't set the z-depth). If I won't find a solution I will adjust the mainSprite texture size so everything goes well with mainSprite.anchor.setTo(0.5, 0.5).
  3. Hi,I am from Taiwan,Pandjs is so good. My English is poor but I have a problem Now i making a game with panda and cocoonjs My problem is the particle let FPS drop or not? Becase I use lot of particles. In Chrome or FireFox,my game fps is usually 60. But when i use cocoonjs,FPS drop to usually 30~40.(My mobile is Sony Xperia Z1) When particle more in stage,FPS drop more!! Is it normal?
  4. I was implementing some simple fireworks using emitters that looked pretty, but after a couple of minutes on the iPad, they killed the browser. Psudeo code is: Firework Constructor: - Create sprite for positioning, and to be the visible projectile. - Create primary emitter for particle trail and primary explosion. - Create secondary emitter for multicolour explosions. - Call makeParticles on both emitters with a random (out of 4) particle sprite. Firework Update function: - Decrement life timer. - Set emitters position to match projectile sprite position. - When time is up, call begin. - If already started, call boom instead. Firework Begin function: - Reset all positions. - Revive projectile sprite. - Set velocity on the projectile sprite to shoot it up the screen. - Call makeParticles on the secondary emitter with a random particle sprite to change up the explosion colours. - Start emitter 1 to leave a particle trail up the screen. Firework Boom function: - Kill projectile sprite - Call start on primary emitter, set to explode. - 50% chance to call start on secondary emitter, set to explode. This created a really nice visual effect, but after a couple of minutes of running on the iPad, it caused Safari to close. I altered the code to only call makeParticles on the secondary emitter once at the creation of the firework object and now it runs fine without killing the browser. So, lesson for today is to not call makeParticles on an emitter (or 4) every few seconds. It is probably better to have a bunch of secondary emitters from the start, and pick one to explode at random.
  5. I've been trying to figure out who to create a custom particle class. I get the concept of prototype to some extent but I'm not sure how to use that with the emitter.particleClass property. Can someone show a really brief example of how to extend the Particle class with an extra property and or member? Thanks!
  6. Hi Guys, I've been asking around on twitter but as yet don't have an answer so I thought I'd ask here too Does anyone know of a particle editor I could use with the proton lib? ( If not does anyone know any good particle libs I can use with Pixi which also come with a visual editor? Cheers, Dean
  7. Hello All, Is it possible to access and change the properties of individual particles released from an emitter? (without requiring an overlap detection) Let's say I've emitted 3 particles from an emitter... Is there a way to retrieve the properties of each particle (x,y,velocity,rotation, etc) then execute code that will be applied to that single particle if it meets certain criteria? I've been using emitters to create enemies, projectiles, and scene objects. Many times there are multiple on the screen at one time and they need to be accessed and respond individually. A scenario that I've came across is the combination of particles from different emitters that must work together. For example, you have an "enemy" particle, that will shoot a a "fireball" particle from the "enemy" particles current location... then the "fireball" particle will be followed by an emitter to create a smoke trail of particles as the "fireball" particle travels. I've come up with a work around by placing a physics.body that is the full size of the screen and then checking with "game.physics.arcade.overlap". Since any particle will always be overlapping with it, I can execute code on that particle. BUT.. this still only works if there is only one particle of a certain type. It doesnt give me access to indivual particles. Are particles assigned unique identifiers, and can they be accessed so each particle can be controlled individually without requiring overlap/collision detection?
  8. Hi, I'm trying to get an explosion working with animated particles in Phaser. So far I've got the emitted working fine and seem to be able to add animations to the particles, but running these animations does nothing. Since the docs say that "Particles are extended Sprites" I would assume that you can add and run animations in the same way that you do an a normal sprite? Any help would be greatly appreciated!! var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create });var emitter;function preload() { game.load.spritesheet('partAnim', 'assets/partAnim.png', 134, 141);}function create() { game.physics.startSystem(Phaser.Physics.ARCADE); game.stage.backgroundColor = 0x337799; emitter = game.add.emitter(0, 0, 100); emitter.makeParticles('partAnim'); emitter.gravity = 200; game.input.onDown.add(particleBurst, this);}function particleBurst(pointer) { emitter.x = pointer.x; emitter.y = pointer.y; emitter.start(true, 2000, null, 1); var part = emitter.getTop(); part.animations.add('run');'run', 15, true); console.log(part);}
  9. Hi, I made another particle system. This time with the guidance of this YT tutorial. I made a filter showing fire-like using this particle system. As I think this is a interesting topic to those newers like myself, I want to share my approach. The readme: /* README!! This particle system works with some sort of filters. How it works: x: x position, automatically added to Emitter's x (you can't have a particle floating around without a reference point) y: y position vx: x velocity vy: y velocity type: it could be either 'arc' or 'rect' size: the size of the particle, if arc, this represents radio * 2 opacity: self describing colorType: could be either 'rgba' or 'hsla' color: array containing the first 3 params of rgba/hsla, opacity is automatically added particles: the number of particles created every frame, bad performs when reaching the 10 value life: the number of frames this particle will live gravity: gravity force wind: wind force NO NEED to put every value in a filter, it has fallback values */Best regards. The Tutorial: Javascript Motion, Particles and More index.html
  10. I know this isn't much, but I wanted to share with you a simplistic and very basic particle system. This is my little contribution to those newers who want to experiment. Code in attached files. particles.bmp index.html
  11. Hi, Just starting out with Phaser so there may be a simple fix to this: I have a small texture (9x12) that is being used for particles. The bounding box seems to not scale with the particle and is stuck at the original size, making collision detection problematic. I've attached an image of the issue. The particle is in the top left and the BB in green. Has anyone else had this problem? Thanks.
  12. Is it possible to emite particles from one coordonate to another one with Phaser ? If it is, have you got exmple, a way to go ? Thanks !
  13. Hi, I have a scene where a global gravity for Arcade Physics is set to 640. Then I try to set a lower gravity of 10 for a specific particle emitter, so to have the particles seem to float in the air. game.physics.startSystem(Phaser.Physics.ARCADE);// 1. Setting global = 640;game.physics.arcade.frameRate = 1 / 30;game.time.deltaCap = 1 / 30 * 2;emitter = game.add.emitter(0, 0, 100);emitter.makeParticles('particle');// 2. Overriding gravity for particle emitter.// Won't have any effect because of 1.emitter.gravity = 10;But it seems that it's not possible to override the emitter gravity if the global gravity is set. Commenting out game.physics.arcade.gravity.y = 640; makes the particles float in the air as expected. I've attached a test project showing the problem in action.
  14. How to create particles in the pandajs with p2physics? Thanks!
  15. Can anyone tell me how I'd go about setting the z-index of emitted particles? Basically, what if I wanted particles emitted behind an object? Or force them in front? Thanks in advance.
  16. Do you know a good javascript particle library that is easy enough to integrate? It's one of those things you could program yourself easily, but it will still take time. I tried ParticleEmiterJs, a plugin someone made for CreativeJs, but it was really buggy. Any advice?
  17. I wish I knew how to GitHub properly so I could do the whole Pull request thing. I believe I am in the Dev branch. Particles/Arcade/Emitter.js has one line that is breaking things when trying to use a width/height value on the emitter. Line 361: particle.reset(this.emiteX -, this.right), this.emiteY -, this.bottom));Problem 1: "this.emiteX" and "this.emiteY" should be "this.emitX" and "this.emitY". Problem 2:, this.right) and the top/bottom one too both return a value that results in the particles being centered around the origin, rather than the emitters X/Y position. This is because the integerInRange returns a value between the left(top) of the emitter and the right(bottom) of the emitter, and this value is then subtracted from where the emitter is. Example: The emitter is at (300, 300) and is 10x10. The value returned by integerInRange will be somewhere in 290-310. This is subtracted from 300, leaving the particle to spawn in the -10 to 10 range, rather than the 290-310 range one would expect. Possible solutions are to just remove the "this.emitX(Y) - " parts, solving problem 1 at the same time, or the more complicated one is changing the range to be ", this.width/2)". For my version, I'm going with the first solution of removing this.emiteX(Y) entirely.