bdekk Posted July 22, 2016 Share Posted July 22, 2016 Hello everyone. I am trying to load my map made in tiled into my game. However, the map does not scale properly and I cannot see all the objects. Could someone perhaps point me in the right direction? The map does load, it only scales wrong. Shooter.game = new Phaser.Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO, ''); this.map = this.game.add.tilemap('level3'); //the first parameter is the tileset name as specified in Tiled, the second is the key to the asset this.map.addTilesetImage('tiles_spritesheet', 'gameTiles'); //create layers this.backgroundlayer = this.map.createLayer('background'); this.blockedlayer = this.map.createLayer('blocked'); //collision on blockedLayer this.map.setCollisionBetween(1, 5000, true, 'blocked'); // this.backgroundlayer.scale.set(2); //resizes the game world to match the layer dimensions this.backgroundlayer.wrap = true; this.backgroundlayer.resizeWorld(); Link to comment Share on other sites More sharing options...
bdekk Posted July 26, 2016 Author Share Posted July 26, 2016 It would be nice to get at least some pointers or tips.. Link to comment Share on other sites More sharing options...
drhayes Posted July 26, 2016 Share Posted July 26, 2016 What do you mean it doesn't scale properly? Can you post an image example? Link to comment Share on other sites More sharing options...
Recommended Posts