Getting started with TexturePacker and CoronaSDK image sheets

This is a short tutorial how to use TexturePacker with the new ImageSheet API from Corona SDK. The API is not yet documented and might still be unstable...

You need one of the current nightly builds of CoronaSDK which includes the new API.

To use the new API with TexturePacker you need the current 3.0.0 build which is currently available as beta version from the download section of this page.

Overview over the important files

The complete code

First load the image sheet information file created with TexturePacker into memory

local sheetInfo = require("spritesheet")

Load the created image file:

local myImageSheet = graphics.newImageSheet( "spritesheet.png", sheetInfo:getSheet() )

To place a file create a new image Object with newImage, using the image sheet loaded before. You can select individual sprites by their name using getFrameIndex:

local myImage1 = display.newImage( myImageSheet , sheetInfo:getFrameIndex("drink"))
local myImage2 = display.newImage( myImageSheet , sheetInfo:getFrameIndex("hamburger"))

Did you like the tutorial? Please share!

Source code available for download

The source code is available on GitHub. Clone it using git:

git clone

or download one of the archives: TexturePacker-Corona-ImageSheets.tar.gz