• Content Count

  • Joined

  • Last visited

Posts posted by shohan4556

  1. 3 hours ago, megmut said:

    Phaser SHOW_ALL doesn't actually scale 100% of the time. Not properly anyway. It sticks to the same aspect ratio calculated from when you created the game, however it doesn't determine if it needs to scale according to maximum width or maximum height. I'm in the process of writing a blog at the moment showing how to fix this issue, it's pretty straight forward but if have a look at the USER_SCALE, and the letterbox in relation to game design, that should be a good guide on where to get started :)


    So Whats the solution of the problem ?

    Should I use SHOW_ALL or USER_SCALE to solve the problem. please share your thought.

  2. Hello, I have noticed that my sprite position is not constant its differ for different mobile device please take a look at the image.

    BasicGame.Game.prototype = {
        init: function () {
         // also tried RESIZ not working 
            this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
            this.scale.pageAlignHorizontally = true;
            this.scale.pageAlignVertically = true;
            this.scale.setResizeCallback(this.gameResized, this);
        preload: function () {
        create: function () {
            this.image1 = this.add.sprite(,,'cake');
            this.image1.anchor.setTo(0.5, 0.5);
        gameResized: function (width, height) {
          // this.image1.x = Math.round(width/2);
           //this.image1.y = Math.round( height-120 );

    I have tried Scale Manager SHOW_ALL AND RESIZE but no result.

    is there any way to fix the problem, please help me.


  3. 34 minutes ago, denisb said:

    Lets say I have this code:

    var mySprite=this.add.sprite('mySprite');


    var mySpriteTween=this.add.tween(mySprite);{alpha:1},1000,'Linear',false,0,0,true);



    When I call start() the second time the tween does not run even though I have yoyo set to true and thus the alpha of mySprite has been tweened back to zero.

    Does the Tween Manager clear the TweenData object owned by mySpriteTween after it has completed?


    I think tween is cleared when its done. you set a timer loop to call the tween many times.