xronn Posted January 28, 2014 Share Posted January 28, 2014 Hi, I have some, error I think it maybe to do with the way the page loads, I'm just setting up a new phaser game having learnt everything I feel I need to as I setup the base structor to being writing my game I get thrown this; http://puu.sh/6BkIO.png <script src="jquery.js"></script> <script src="phaser.js"></script></head><body><script> var game = new Phaser.Game(640, 480, Phaser.CANVAS, 'DungeonRPG', { preload: preload, create: create, update: update, render: render }); function preload() { game.load.tilemap('level1', 'assets/levels/level1.json', null, Phaser.Tilemap.TILED_JSON); game.load.tileset('tiles', 'assets/tiles/tileset.png', 16, 16); // game.load.spritesheet('hero', 'assets/hero.png', 32, 48); // game.load.image('background', 'assets/tiles/bg.png'); } var bg; function create() { game.stage.backgroundColor = '#000000'; bg = game.add.tileSprite(0, 0, 640, 480, 'background'); bg.fixedToCamera = true; } function update() { } function render(){ }</script> Link to comment Share on other sites More sharing options...
xronn Posted January 28, 2014 Author Share Posted January 28, 2014 Fixed! Note to anyone with a smilar error, the github has many "phaser.js" files, make sure you add the right one to your project -Closed Link to comment Share on other sites More sharing options...
Alvin Posted January 28, 2014 Share Posted January 28, 2014 There could be two things, first, what version of Phaser are you using ?Because game.load.tileset has been removed recently. Link to comment Share on other sites More sharing options...
Alvin Posted January 28, 2014 Share Posted January 28, 2014 Oh all right, you can close it then Link to comment Share on other sites More sharing options...
Recommended Posts