Jokgee Posted May 14, 2018 Share Posted May 14, 2018 I just started working with Phaser, and I'm trying to use https://opengameart.org/content/breakout-graphics-no-shadow this spritesheet for a simple breakout clone. How can I load the image and split it up automatically in-code? Link to comment Share on other sites More sharing options...
AndreasLoew Posted May 15, 2018 Share Posted May 15, 2018 The problem is that the sprite sheet does not have a regular layout. Some sprites are bigger, some smaller,... Use Photoshop or Gimp and extract the single images as png files. Use TexturePacker to build a sprite sheet. This will also save you memory because it can be much smaller. A tutorial how to use sprite sheets can be found here: https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3 Link to comment Share on other sites More sharing options...
rich Posted May 15, 2018 Share Posted May 15, 2018 You could also use Shoebox and its "Extract Sprites" feature, which will scan the png and rip out all of the images it can find. Might save you some time: https://renderhjs.net/shoebox/ Link to comment Share on other sites More sharing options...
Jokgee Posted May 15, 2018 Author Share Posted May 15, 2018 Thank you both, that helped. Link to comment Share on other sites More sharing options...
Recommended Posts