• Content Count

  • Joined

  • Last visited

About adeptnix

  • Rank

Contact Methods

  • Twitter
  1. My own implementation of memory game, but I used different order of colors instead of different images. Before start you can choose palette. It's on phaser3, source code there
  2. Turns out that I should iterate over pairs:'collisionstart', (event) => { event.pairs.forEach(pair => { const { bodyA, bodyB } = pair; if (bodyA.label === 'car' && bodyB.label === 'cone') { bodyB.cone.down(); } else if (bodyA.label === 'cone' && bodyB.label === 'car') { bodyA.cone.down(); } else if (bodyA.label === 'man' && bodyB.label === 'cone') { bodyB.cone.up(); } else if (bodyA.label === 'cone' && bodyB.label === 'man') { bodyA.cone.up(); } }); if (this.cones.filter(cone => cone.isUp).length === 0) { this.scene.start('GameOver'); } });
  3. Hi guys, I have different objects in my game, something like this scene.matter.add.image(x, y, 'car'); scene.matter.add.image(x, y, 'cone1'); scene.matter.add.image(x, y, 'man'); And I try identify what kind of objects collides'collisionstart', (event, bodyA, bodyB) => { if (bodyA.label === 'car' && bodyB.label === 'cone') { bodyB.cone.body.setTexture('cone2'); } if (bodyA.label === 'cone' && bodyB.label === 'car') { bodyA.cone.body.setTexture('cone2'); } if (bodyA.label === 'man' && bodyB.label === 'cone') { bodyB.cone.body.setTexture('cone1'); } if (bodyA.label === 'cone' && bodyB.label === 'man') { bodyA.cone.body.setTexture('cone1'); } }); But sometimes cone object don't change his texture despite I hit it by a car. If it can help, full code there -
  4. Thanks for testing! I agreed, this is the hard game and it has lack of good manual. And I'm going to fix it later. bind space for jump add notes about moves to left and to right on start screen add background with parallax show scores on the screen of death and may be offer to gamer level of difficulty (normal | hard) For now I will save this tasks in TODO file. But now I want to finish my two-years-old prototype with a guy on picture below.
  5. This is my first game after a two years break in gamedev. Basically you have to jump to platforms for growing your size (and energy in that case). Each jump take a bit of size of the box (part of energy). If you will get too small, you will die. Source code -
  6. Hi. How to set a constant speed, so that it did not decrease in collisions with other bodies and boundaries of the world?