GideonSam

Members
  • Content count

    32
  • Joined

  • Last visited

About GideonSam

  • Rank
    Advanced Member

Recent Profile Visitors

669 profile views
  1. May be becuase of the auido played in the update loop if (hitFace){ this.sound2.play(); hitFace = false }
  2. this.game.onPause.add(this.yourGamePausedFunc, this); this.game.onResume.add(this.yourGameResumedFunc, this); yourGamePausedFunc: function () { this.game.input.mspointer.stop(); }, yourGameResumedFunc: function () { this.game.input.mspointer.stop(); } you should add key to overrride defaults keyactions this.upKey = game.input.keyboard.addKey(Phaser.Keyboard.UP); try this it worked for me
  3. GideonSam

    Bug with Phaser.Tilemap.TILED_JSON

    When you are adding a tileset check the Embed in Map box
  4. Hi All I've been working on a top down endless runner , where the player jumps from one platform to another and should not leave the screen. How to make a platform move horizontally I'm spawning platforms and adding x and y velocity its working but is it a right of doing it ? if not how to make it look better this.initX = this.x; this.body.velocity.y = -200; platform.prototype.update = function () { if (this.moving) { if (this.x > (this.initX + this.width)) { this.speed = -200; } if (this.x < (this.initX)) { this.speed = 200; } this.body.velocity.x = this.speed; }
  5. GideonSam

    Phaser 2 Box2d performance on IOS

    Hi I have ported a flash box2d game into phaser box2d game It works fine on pc browser and android browser but the performance is very low when it comes to ios Any ideas please, I have been banging my head in these for few days
  6. GideonSam

    Matter Physics Phaser 3

    Hi All, I'M learning Phaser 3 Matter physics. I have a static rectangle body with its angle rotated to make a slope. when i drop a ball from the top its slides in the slope , the ball is not rotating while moving down the slope. (it slides without rotating) kindly help var rectangle = _this.matter.add.rectangle(px, py, w, h, { restitution: 0.9 }); rectangle.isStatic = true Phaser.Physics.Matter.Matter.Body.setAngle(rectangle,a) var ball = _this.matter.add.sprite(320, 10, "ball"); ball.setCircle(); ball.setBounce(1);
  7. GideonSam

    Set anchor in Phaser 3

    Check this https://labs.phaser.io/edit.html?src=src\transform\originX.js
  8. GideonSam

    Box2D FPS drop in Mobiles

    its working fine in android only in IOS the frame rate drops
  9. GideonSam

    Box2D FPS drop in Mobiles

    im using the one used in this sample http://www.emanueleferonato.com/2017/12/22/play-stack-the-crates-html5-game-my-take-on-tipsy-tower-concept-source-code-available/
  10. GideonSam

    Box2D FPS drop in Mobiles

    Hi All, I have been developing a box2D game in Phaser 2, it works fine in the Desktop browsers. When comes to the Mobiles the FPS drops. There are only three sprites in the stage, one static body and a dynamic body. Please kindly help. Thanks, Gideon
  11. GideonSam

    Brush tool in Phaser

    Hi All, I have been working on a Simple paint app for kids. I have a problem in implementing the simple brush tool. Im getting small dots and line here there in the screen Unable to draw on free hand movement like a brush. kindly help. playGame.prototype = { preload: function () { }, create: function () { game.stage.backgroundColor = '#222222'; game.input.onDown.add(this.onStageDOwn, this); game.input.onUp.add(this.onStageUP, this); }, onStageUP: function () { game.input.deleteMoveCallback(this.paints, this); }, onStageDOwn: function (pointer, x, y) { graphicsMC = this.game.add.graphics(); graphicsMC.lineStyle(2, 0xffd900, 1); graphicsMC.moveTo(pointer.x, pointer.y); game.input.addMoveCallback(this.paints, this); }, paints: function (pointer, x, y) { graphicsMC.lineTo(pointer.x, pointer.y); } };
  12. GideonSam

    TileSprite Alternative

    Thanks mate it works fine now
  13. GideonSam

    TileSprite Alternative

    Hi All, I have been working on a Endless Runner game for mobile and web . Initially i Used TileSprite for the looping background,but it affects the performance on mobile. Then i used the classic method of moving two backgrounds simultaneously. But if i increase the speed of the movement , it gives a gap between two backgrounds. Kindly help me with the logic bgSpeed = 10 update() { mainBg1.y += bgSpeed; mainBg2.y += bgSpeed; if(mainBg1.y >= this.game.height) { mainBg1.y = -this.game.height; } if(mainBg2.y >= this.game.height) { mainBg2.y = -this.game.height; } }
  14. GideonSam

    attach an emitter as child of sprite

    its true and available in the world but its not woking