Jump to content

Phaser tilemap jumping


Recommended Posts


I try to make a map  in tilemap editor in phaser.

I done it, but when i move player and camerac, the map is jams and lag..

Has anyone can tell mi, what i must to do to create map running fine?

I have 6 layers, and little big tile set (2,91 mb) it can be a problem? What i must correct to do map running fine when move?


I will be gratefull for help :)


Link to comment
Share on other sites

Ok, i found what is the problem.

When i have only one layer, background, the game is working fine, but when i add coliision layer, the work is lagging.

So maybe someone have ide how to create map which will have a little layers and work fine?

Link to comment
Share on other sites

    this.map.addTilesetImage('zew5', 'gamezewnetrzne');
    this.map.addTilesetImage('all3', 'gameall');
    //create layer
    this.backgroundlayer = this.map.createLayer('backgroundLayer');
    this.blockedLayer = this.map.createLayer('blockedLayer');
    this.backgroundLayer2 = this.map.createLayer('backgroundLayer2'); 
   this.blockedLayer1 = this.map.createLayer('blockedLayer1');
    this.secondLayer = this.map.createLayer('secondLayer');
    this.thirdLayer = this.map.createLayer('thirdLayer');
    this.funkcje = this.map.createLayer('funkcje');
    //collision on blockedLayer
     this.map.setCollisionBetween(1, 5000, true, 'blockedLayer');
     this.map.setCollisionBetween(1, 10000, true, 'blockedLayer1');
     this.map.setCollisionBetween(1, 10000, true, 'funkcje');

Here is my code creating layers.

Link to comment
Share on other sites

hi, the game is working very fine when i change:

TopDownGame.game = new Phaser.Game(1024, 640, Phaser.AUTO, 'TRESC');



TopDownGame.game = new Phaser.Game(1024, 640, Phaser.CANVAS, 'TRESC');


What dou You think about this method? It is have any consequences?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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