Squarew00t Posted March 11, 2015 Share Posted March 11, 2015 Hello guys, I found about about phaser a few days ago and i really like the simplicity and stuff, but let's get to my question:I am trying to render a single Tile from a 64x64 Tileset image.That's my code:var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render });var set;function preload() { game.load.image('ground_1x1', 'assets/tilemaps/level1.png');}function create() { game.stage.backgroundColor = '#2d2d2d'; set = new Phaser.Tileset('ground_1x1', 0, 64, 64);}function render() { set.draw(Phaser.context, 50, 50, 0);}pretty simple, but it just doesn't draw anything. Sorry if this question is stupid, I'm not sure whether Phaser.context is the correct context to draw to, thank you guys in advance Link to comment Share on other sites More sharing options...
Squarew00t Posted March 15, 2015 Author Share Posted March 15, 2015 Okay, for some reason I can't perform simple canvas operations to the empty game screen, and it doesn't seem to matter whether i use game.context or Phaser.context Link to comment Share on other sites More sharing options...
Recommended Posts