Jump to content

tileSprite memory problem


i3Designer
 Share

Recommended Posts

I'm creating a game, and I'm board using 3 backgrounds with three different movements:

create: function(){

        this.sfondo = game.add.tileSprite(0,h-270,w,162,'sfondo');
        this.testa = game.add.tileSprite(0,h-160,w,92,'prova');
        this.pavimento = game.add.tileSprite(0,h-68,w,68,'pavimento');

}

 

update: function(){

        this.testa.tilePosition.x -= 0.35;
        this.pavimento.tilePosition.x -= 1.5;
        this.sfondo.tilePosition.x -= 0.20;

}

 

If the computer game, the game is perfect, but on the mobile goes very slow.
The problem is the tileSprite, but I can not create a remedy, advice? 

 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...