Search the Community

Showing results for tags 'destructible'.

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
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • 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 3 results

  1. Hello, I'm trying to implement the code from this tutorial in a game I'm making. Actually I can make the holes on the texture using bitmapData. This is how I'm doing: this.bmd = game.make.bitmapData(360, 150); this.bmd.copy('ground'); //ground = image key //Makes two "holes" this.bmd.blendDestinationOut();, 10, 20, 'rgba(0, 0, 0, 255');, 10, 20, 'rgba(0, 0, 0, 255'); this.bmd.blendReset(); this.bmd.update(); this.ground = this.add.sprite(0, 630, this.bmd);; this.ground.body.allowGravity = false; this.ground.body.immovable = true; However, when I move my player, it walks like if there's no hole on the ground: How can I fix this?
  2. Hey, I want to create a scratch card effect, as there are in games with luck and all where you scratch on some image and in the scratched area you can see the image below it. I think this can be done by manipulating pixels somehow, but i am not experienced with pixi and don,t know how to do it exactly. It will be a great help if you point out a way or tutorial to do it, or give a basic code snippet here to help me figure this mechanism out. Regards.
  3. Hi all, I've managed to do a very simple but not very flexible code to damage and destruct tiles when shooting at them. I have a Json map, one layer with an image for not destructible tiles and a second layer with a sprite-sheet with 4 frames for the 4 damage levels (see image). My problem is that one bullet collision result in one step in the damage progression. What I want is to have different damage thresholds for different weapons: a pistol has to shoot 10 bullets to move to the next damage level, a machine gun needs only 5, and a bomb destroys the tile immediately. Thank you for any help I'm pasting here only the relevant code, I've omitted stuff like moving the player or particle effects: (edited code formatting) create: function() { this.createWorld(); //OTHER CODE OMITTED... },update: function() {} update: function() { game.physics.arcade.collide(this.player, this.layerWorld); game.physics.arcade.collide(this.player, this.layerDirt); game.physics.arcade.overlap(this.bulletPool, this.layerDirt, this.destroyTerrain, null, this); this.shootBullet(); //OTHER CODE OMITTED... },//OTHER CODE OMITTED... createWorld: function(){ //create the tilemap = game.add.tilemap('level1'); //add tileset images to the map'worldBase');'worldDirt'); //crete layers from every json layer this.layerWorld ='worldBase'); this.layerDirt ='worldDirt'); //enable collisions for the first frame, true, this.layerWorld); //enable collision for all frames in sprite[26,27,28,29], true, this.layerDirt); //set the world size to match the size of the layer this.layerWorld.resizeWorld(); //set bounds to world,0,3200, 320); },//OTHER CODE OMITTED... destroyTerrain: function(bullet, tile) { //move the emitter at the bullet's point of contact with the tile this.dirtParticles.x = bullet.x; this.dirtParticles.y = bullet.y; //start emitting //start(explode, lifespan, frequency, quantity) this.dirtParticles.start(true, 2000, null, 15); //advance to the next tile's id tile.index += this.BULLET_DAMAGE; if(tile.index < 29) {, tile.x, tile.y, this.layerDirt); } else if (tile.index >= 29) {, tile.y, this.layerDirt); } bullet.kill();},