Search the Community

Showing results for tags 'particles'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 88 results

  1. ANSWERED Hi, By updating the phaser 2.x version I stumbled upon >all particles are broken<. this is the extended Phaser.Particles.Arcade.Emitter class: as line7>> "this.start(false <- should revive a particle at the emitters position after "lifetime". it just doesn't do anything. All particles are done once, and they do not repeat themselves anymore. Was there a breaking change I did not get? note: The v2.7.x gravity change is not the case here constructor (config: any, amount: number = 10) { super (config.game, config.x, config.y, amount); config.level.layers.effects.add(this); this.setYSpeed(-20, -200); this.setXSpeed(-5, 5); this.makeParticles('assets', 52); this.start(false, 100, 150, amount); //this should revive particles after lifespan(2), but doesn't console.log(this.children); } Any thoughts? regards
  2. PG: https://www.babylonjs-playground.com/indexStable.html#PU4WYI#33 I tried set the `color1` or change the texture pic but it seems that the particleSystem just made black paricles transparent.
  3. Hi everyone ! I've seen that a particleSystem as an emitter attribute, where the particles come from. However I didn't see anything about a "receiver" attribute, in order not only to emit particles from one point but to really create a stream of particles between 2 points. I know I can kind of simulate that with the direction of the particles, their speed, their lifetime, etc... but the point here is to have a simple way to change emitters and receivers so we can create stream between 2 objects on demand. Is there a way to do so ? Big thanks !
  4. Hi, guys. NeutrinoParticles plugin for PIXI is tested and released. You can download the Editor and check out video tutorials, samples and live demos at https://neutrinoparticles.com/ It is the best particle editor for PIXI. Isn't it?
  5. bobonthenet

    Adding an emitter to a group

    Should it be possible to create emitters in a loop and then add them to a group? I'm trying to use particle emitters as explosions and I might need to fire off multiple at a time. I figured I would use basically the same strategy used with bullets. Maybe there is a better strategy? this.explosions = this.add.group(); let particles; let emitter; for(let i=0; i<3; i++) { particles = this.add.particles('spark'); emitter = particles.createEmitter(); emitter.setSpeed(200); emitter.setBlendMode(Phaser.BlendModes.ADD); emitter.on = false; this.explosions.add(emitter); //this line causes an error. }
  6. I'm playing around with the particle system, trying to create subtle background particles wafting randomly around. I think i have something (https://www.babylonjs-playground.com/#WJBZQH), but I'd like to fade in particles - not just out. Particles suddenly appearing is a little jarring. Is that even possible? I know a "soft birth" of particles has been mention here before, but I couldn't really make much sense of it as is also tried to do alot more. Also: how can i use particles with a transparent scene clearColor? With that, particles are simply not visible until they appear over some geometry in the scene. Any tips?
  7. Shex

    Particle system

    Hi I am building a new game for facebook Instant games and they ask for a lightweight game that doesn't use hardware acceleration. Does the particles().createEmitter() uses some sort of hardware acceleration? Usually its a yes when we talk about particles systems, but on the website it says its lightweight so I was wondering. Thank you!
  8. PhilT

    Low FPS

    The playground http://www.babylonjs-playground.com/#CGSXR from http://doc.babylonjs.com/samples/grid_moves runs at 10fps on my Razor Blade laptop with nVidia GTX 1060. Is that normal?
  9. jerome

    Solid Particle Parenting

    Hi Folks, Here's a SPS new feature : the particle parenting. Simple to understand : once a particle has a parent, all its rotation, position and pivot are then expressed in the parent particle local space. Simple to use : sps.initParticles = function() { for (var i = 1; i < sps.nbParticles; i++) { // declare each previous particle as the parent of the current one sps.particles[i].parentId = i - 1; } }; sps.updateParticle = function(p) { // each particle will rotate for +0.001 in the already rotated parent space particle.rotation.z += 0.001; } examples : the green box is parented to the translating red one, it also rotates around a local pivot http://jerome.bousquie.fr/BJS/test/spsParenting.html 600 boxes, parented per groups (stems) of 10, each rotating around its pivot : http://jerome.bousquie.fr/BJS/test/spsParenting2.html
  10. I'm interested in the Particle Storm plugin, but I'll be updating my game to Phaser 3.0 shortly. WIll the plugin be updated for 3.0, or will the code work in 3.0?
  11. negrant

    Particles dispose

    Hi! Have some problem, I create many particles systems in my game and very often delete them after first playing, but if I using the same texture in particle systems, then after first disposing of particle system the texture disposing too. And I should to cloning each one new texture, but it is bad for performance. How I can to create a particles systems with same texture but after disposing particles system do not dispose texture? Thanks!
  12. I don't undestand why the updateFunction of my particle system is still called after I stop the system. See console in this playground : https://www.babylonjs-playground.com/#DJVT90 I stop the particle system after a 1 second timeout and the console show that the updateFunction is still called. Thanks, Pichou
  13. Greetings! I'm currently playing around with PIXI.particles.ParticleContainer and am having a blast. What an awesome container! I'm writing because I'm having a peculiar issue regarding mouse events and the particles inside the ParticleContainer. Specifically, I create the ParticleContainer, add sprites to it via PIXI.Sprite.fromImage and then bind mouse down events to each sprite and specify a hit area for the sprite as well. That works! Specifically, it works if I add the sprites to the ParticleContainer and don't specify a position, and all the sprites show up in the top left corner of the ParticleContainer. However if I move the sprites around in the container by adjusting the sprite's x,y values, the hit area remains in the in the top left corner and I can still trigger the mouse event there, but that's clearly not the intent. I had guessed that the hit area would follow the sprites as they move around the container. Is this true? I'm posting below a section of my code to help explain. Thank you to any PIXI wizards who might have insight here. // Create the graph container this.graphContainer = new PIXI.particles.ParticleContainer( numNodes, { scale: true, position: true, rotation: false, uvs: false, alpha: false } ); this.graphContainer.hitArea = new PIXI.Rectangle(0, 0, 1000, 1000); this.graphContainer.interactive = true; this.graphContainer.interactiveChildren = true; // Create the graph nodes for (var i=0; i<numNodes; i++) { var x = graphData['nodes'][i]['x']; var y = graphData['nodes'][i]['y']; var node = new Node(this.top, null, x, y); this.nodes.push(node); this.graphContainer.addChild(node.getSprite()); } class Node { constructor(top, type, x, y) { this.top = top; this.initPosition = { 'x': x, 'y': y }; this.createSprite(); } createSprite() { this.sprite = new PIXI.Sprite.fromImage('images/bcat.png'); this.sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100); this.sprite.interactive = true; this.sprite.buttonMode = true; this.sprite.on('mousedown', (event) => { console.log('sprite event'); }); this.sprite.anchor.set(0.5); this.sprite.x = this.initPosition['x']; this.sprite.y = this.initPosition['y']; } getSprite() { return this.sprite; } }
  14. Hello, I need my particles affected by an airplane propeller flying through them. How might I accomplish this? Thanks, DB
  15. Hi everyone, so i have a question about how i can make my particles emitter to move from point to point and is it possible to do this. I have an exact example of what i need. Can someone give me a simple code example ? Thanks.
  16. Rechi

    Interactive Snowcone

    For a Christmas Newsletter we created an interactive snowcone. The model represents our hometowns city tower. On desktop the snow is simply triggered by mouse drag, on mobile you can actually "shake" to let it snow. This was actually my first Babylon.js project and I'm quite happy with the result. http://www.pundr.at/xmas/
  17. Hi guys, I am using AnimateCC to output canvas animations and would love to know how I would go about using the json file that is made available for download when using: http://pixijs.io/pixi-particles-editor/# . My objective is to simply create a particle emitter and then use it within my animation, but I have trouble connecting the dots. Ideally the Pixi json would need to be included in the published js file. Any tips on where that code would need to go exactly? I added the pixi library as a global script to the Animate file, but was wondering if someone could walk me through the process of combining the power of AnimateCC with PIxi.js Any tips are welcome! Thanks!
  18. trsh

    Need advice for some project

    Hi guys. I want to create a effect in PIXI, that looks like first frames in this video -> http://hubblesite.org/video/513/news_release/2006-01 (stars shooting/flying by). What would more experienced PIXI'oniers advice to achieve such effect? Performance is critical, I want it also to work on mobiles. For now I'm thinking: 1) Particle container, that's for sure? Maybe with some 1-3 star sprites? 2) Projection plane for start movement? Or just calculate it with some custom simple logic?
  19. Hi, when manualEmitCount is set on ParticleSystem it rendered only one wave of particles, is that desired behaviour? Looking in code I found that if manualEmitCount > -1 than its set to 0 so next time 0 particles are emitted. PG
  20. Hi, I created particle system to add some particles in the game but couldn't find a way to blend particles in (now they just appear immediately and than start to blend and move). Is there any why to to it that I have missed ? As I checked code, looks like there is no direct way to do it as all methods are privet and colour is set on birth.
  21. hi, I would use a special effect with my prototype weapon. this special effect is : some particles when the weapon fire. concern the lines : this.animate_when_fire() game.time.events.loop( this.frequency,this.animate_when_fire,this ) When is use the function animate_when_fire with a loop, after a certain delay my game lag a lot. However i use only 3 particle each time of frequency (+/- 200ms). I use the same process for my other particles and i don't see any lag... what i'm doing wrong ? thanks for the assist _canon = function(delay,posx,posy,speed,frequency,variance,angular,_flag,kill_with_world){ this.delay=delay this.posx=posx this.posy=posy this.speed=speed this.frequency=frequency this.variance=variance this.angular=angular this.kill_with_world=kill_with_world this._flag=_flag this.flag_for_fire=true this._flag=true //canon Phaser.Sprite.call(this,game,this.posx,this.posy,'canon') this.angle=this.angular this.animate_when_fire() game.time.events.loop( this.frequency,this.animate_when_fire,this ) game.physics.arcade.enable(this); this.weapon=game.add.weapon(9,'bullet') if(this.kill_with_world){ this.weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; }else{ for (var i = 0; i < 9; i++) { this.weapon.bulletCollideWorldBounds=true this.weapon.bullets.children[i].body.bounce.setTo(1,1) } } // Because our bullet is drawn facing up, we need to offset its rotation: this.weapon.bulletAngleOffset = 0; // The speed at which the bullet is fired this.weapon.bulletSpeed = this.speed; // Speed-up the rate of fire, allowing them to shoot 1 bullet every 60ms this.weapon.fireRate = this.frequency ; // Add a variance to the bullet angle by +- this value this.weapon.bulletAngleVariance = this.variance; // Tell the Weapon to track the 'player' Sprite, offset by 14px horizontally, 0 vertically this.weapon.trackSprite(this,0,0,true); game.time.events.add( this.delay,function(){this._flag=false},this ) } _canon.prototype = Object.create(Phaser.Sprite.prototype) _canon.prototype.constructor = _canon _canon.prototype.update = function(){ if(this._flag==false && this.flag_for_fire){ this.weapon.fire() } } _canon.prototype.fire = function() { this.flag_for_fire=true this.weapon.fireRate = this.frequency ; this.weapon.bulletSpeed = this.speed; this.angle=this.angular this.weapon.bulletAngleVariance = this.variance; } _canon.prototype.animate_when_fire = function() { if(this.visible){ this.particlex = game.add.emitter(this.x+35,this.y) this.particlex.makeParticles("particle_canon") this.particlex.minParticleSpeed.setTo(100,-190) this.particlex.maxParticleSpeed.setTo(500,240) this.particlex.setAlpha(.4, .1) this.particlex.minParticleScale = .4 this.particlex.maxParticleScale = .7 this.particlex.minRotation = 0 this.particlex.maxRotation = 0 this.particlex.on=false this.particlex.start(true,200,null,3) } }
  22. Question about using emitters in Phaser and what is the best practice for perfomance and memory use. Let's say a typical game where the player collects coins and occasionally there is a bomb. Whenever the player collects a coin there appear a few (like 3 or 4) particles, when a bomb explodes there are different type particles and when the player dies a few star particles appear. A typical game probably has more, but just as an example here it's three different particle effects. What would be the best way to handle this in Phaser? 1. create three emitters at start of game, reuse same three throughout game 2. create one emitters for coin particles and reuse throughout game, and create new bomb/stars emitters as needed 3. create new emitters for each instance that particles are needed About that 3rd option, I figure that will take a toll on memory usage because emitters don't auto-destroy once they are finished. So would you need to destroy them manually, and if so how? Or is creating many emitters just not a good idea at all? I'd love to hear any ideas or best practices on this.
  23. In the online documentation, I can read that the emitter's update() function require a delta parameter in seconds, (in bold): http://pixijs.github.io/pixi-particles/docs/PIXI.particles.Emitter.html#update But, as far as my experiments go, converting my frame time in seconds seems not to work. It does in milliseconds. Am I wrong somewhere?
  24. I'm noticing from the profiler that when I run the particle emitter in my game, the heap builds up over the course of a couple seconds and then drops back down after the garbage collection. To be sure the test is accurate, I've turned off everything else in my game so it is *only* the particle emitter that is running. My understanding is that once the initial pool of particles are created (in my case, 200), no more objects should be dynamically allocated, so why is this happening? My emitter uses a custom particle class that calls the kill() method on the particle when the particle gets more than a certain distance away from the source. My impression is that by calling kill rather than destroy, Phaser should be able to use the same particles over and over again. Why is Phaser, apparently, not reusing the particles? I'm using Phaser 2.6.2.
  25. Phaser CE v2.8.0 | WebGL I have a game with lots of enemies, and each enemy needs to shoot out blood particles when attacked. My problem is, my world size is much larger than the size of the emitter bitmapdata that ParticleStorm creates. I tried making it larger, but that caused extreme lag. Then I tried making an emitter for each enemy, and moving the x/y coordinates of the emitter's display to the enemy's location: this also caused heavy lag after just 2 or 3 emitters were created. Any ideas on what I can do to have enemies emit particles across a large map (1920x1920)?