LameLemon

Members
  • Content count

    1
  • Joined

  • Last visited

  1. I've used a Tiled Map with my project before and it worked perfect, however the second map I made has a black bar on the right and top. I can move into the black space but the Camera will not allow me to move left off screen. My canvas is set to this resoltuion var game = new Phaser.Game(640, 480, null, 'gameDiv'); This is how I load my assets preload: function() { game.stage.backgroundColor = '#000000'; game.load.tilemap('level0', 'assets/map/Level0.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tiles0', 'assets/map/[TILESET]Dirt-City.png'); } This is the code in my play.js create function. create: function () { var map = game.add.tilemap('level0'); map.addTilesetImage('[TILESET]Country', 'tiles0'); this.layer = map.createLayer('Tile Layer 1'); game.world.setBounds(0, 0, 640, 4800); this.player = new Player(300, 4700); } My camera updates it's location based on that of the player like so player.update = function() { game.camera.x = this.x - 150; game.camera.y = this.y - 300; } I have been trying to figure out this problem for quite some time, any help is greatly appreciated. Thank you.