Jason87 Posted July 1, 2015 Share Posted July 1, 2015 Hello, I am relatevely new on phaser, I started building a prototype of a slide puzzle with phaser, wich is pretty basic stuff, just to get started, I have managed it pretty well so far, the thing is I want to put several dificulty levels, by dividing the image on more smaller squares, wich makes it harder, so, I use spritesheets like this: this.game.load.spritesheet("tilesHard","assets/1.jpg",160,96); this.game.load.spritesheet("tilesHarder","assets/1.jpg",120,96); The thing is that aparently this way I have to load the image every time for each diferent size spritesheet. Wich for a large ammount of images, it is a problem, loading the same one several times. My cuestion, is there a way of fixing this, meaning: Can I make the different size spritesheets, from the same image, loading it only one time ? Thanks a lot Link to comment Share on other sites More sharing options...
Skeptron Posted July 16, 2015 Share Posted July 16, 2015 You can load the image once and create different Sprites using the scale attribute. But the problem will be blur / precision loss, if the scale changes are too massive. Phaser example for scale : http://phaser.io/examples/v2/sprites/scale-a-sprite Link to comment Share on other sites More sharing options...
jmp909 Posted October 5, 2015 Share Posted October 5, 2015 Don't really understand how your spritesheet works . You could use copyRect/BitmapData etc to create a partial copy of the image you need . What's the problem with loading it more than once though?Why is this in the Phaser 3 forum though? It's not even released yet is it? Link to comment Share on other sites More sharing options...
Recommended Posts