johann_dev Posted November 7, 2016 Share Posted November 7, 2016 I'm trying to implement a simple tilemap in my Phaser game with this code: function preload() { game.load.tilemap('level0', '../static/images/maps/level0.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('stone0', '../static/images/stone0.png'); game.load.spritesheet('player', '../static/images/player.png', 32, 48); game.stage.backgroundColor = '#000000'; } var map; var tileset; var layer;var player; var facing = 'left'; var jumpTimer = 0; var cursors; var jumpButton; var bg; function create() { game.physics.startSystem(Phaser.Physics.ARCADE); map = game.add.tilemap('level0'); map.addTilesetImage('stone0'); map.setCollision(1); layer = map.createLayer('Tile Layer 1'); // layer.debug = true; layer.resizeWorld(); and when I start up the webpage I get the error: "this.postUpdateCore is not a function" which is occurring within the phaser.js file itself. I'm unclear on how to debug and fix this. Link to comment Share on other sites More sharing options...
johann_dev Posted November 7, 2016 Author Share Posted November 7, 2016 So I switched from using the phaser.js file to the phaser.min.js file and it seemed to fix this issue. I don't have collision working yet for some reason but I'd still like to know if anyone has a fix for the aforementioned issue. Link to comment Share on other sites More sharing options...
samme Posted November 7, 2016 Share Posted November 7, 2016 Are you using Phaser 2.6.2? https://github.com/photonstorm/phaser/issues/1742 erich 1 Link to comment Share on other sites More sharing options...
johann_dev Posted November 13, 2016 Author Share Posted November 13, 2016 Yes I am using 2.6.2 Link to comment Share on other sites More sharing options...
erich Posted December 10, 2016 Share Posted December 10, 2016 thanks for this, I had the same issue and used version 2.6.2 instead and it solved my problem with loading the tilemap Link to comment Share on other sites More sharing options...
Recommended Posts