Jump to content

Sprite Sheet for images only


Recommended Posts


I want to load multiple images which currently I am loading individually from JSON with for loop in Preload and Create function like this below. Its loading about 20/25 images and I want to know whats the best way to load these images. I looked in sprite sheet and atlasXML but looks like its more for Animation and not not for static images. 



Thank you

Link to comment
Share on other sites

Hi @alflashy,

For better graphic performance and save http calls to the server, use a spritesheet is a good idea:

// In your preload function


// In your create function

 var Image1 = game.add.image(0,0,'atlas_key','frameName1');
 var Image2 = game.add.image(50,50,'atlas_key','frameName2');
  /* ....................... */

To create the spritesheet I use:

https://www.leshylabs.com/apps/sstool/   (select the "JSON-TP-Array" format)


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...