P4nch0 Posted September 4, 2016 Share Posted September 4, 2016 Hi, 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 More sharing options...
P4nch0 Posted September 4, 2016 Author Share Posted September 4, 2016 I try to make map of the same size like before, but wiht smaller tile set (15,6 kb) and the map if working like before, it is jumping.. where i can look for problem? Link to comment Share on other sites More sharing options...
P4nch0 Posted September 7, 2016 Author Share Posted September 7, 2016 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 More sharing options...
P4nch0 Posted September 7, 2016 Author Share Posted September 7, 2016 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 More sharing options...
P4nch0 Posted September 7, 2016 Author Share Posted September 7, 2016 hi, the game is working very fine when i change: TopDownGame.game = new Phaser.Game(1024, 640, Phaser.AUTO, 'TRESC'); to: 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 More sharing options...
P4nch0 Posted September 8, 2016 Author Share Posted September 8, 2016 Edit: It was working fine one a good computer, but in slower computer it working slow too.. I try on new version of phaser, someone tested it? Link to comment Share on other sites More sharing options...
Recommended Posts