How do you deal with these situations?

I’m just starting with TexturePacker I had a few general questions. 

  1. How do you handle sprite sequences? It seems that you can call up a sprite by name, I didn’t see a system to pull up a set of frames. 

If I work with starting frame and count, it’s hard to tell what the frame number if for a sprite. 

  1. How do you deal with sprites of different sizes? They tend to shift around when then the sprites are different sizes. 

  2. Once you’ve separated the sprite from the main window how do you put it back? 

Maybe this answers part of your question?  From TP I export a Corona SDK image sheet then the code in my project looks something like this:

local sheetData = require ("mySheet") local sheet = graphics.newImageSheet( "mySheet.png", sheetData:getSheet()) local sequenceData = { {name="run", start=1, count=5, time=200, loopCount = 0}, {name="jump", start=6, count=2, time=200, loopCount = 1}, } local sprite = display.newSprite( sheet, sequenceData) sprite:setSequence("run") sprite:play()

You would have to look in the mySheet.lua to get the frame numbers and code them manually as far as I can gather. 

I deal with different size sprites my drawing an invisible (alpha 0) box around them, the maximum size of the biggest sprite to help keep them centered.  It depends on the size difference though I guess as to wether this is practical for you or not as the physics will use this box for it’s collisions. 

The Texture packer tutorials are really bad!

Hope this helps :slight_smile:

I posted something similar on another thread but I’ve found it easier to use Level Director (www.retrofitproductions.com/level-director).

You can import texturepacker & physicseditor files then create and view animation sequences.

It does all the hard work for you and exports a lua file with all the data in it (I use the template export option). 

Thanks for the reply. Level Director looks pretty cool, sadly I am using a Mac and can not use it. 

I’m curious about this the Template Export System. I’d like to learn more about this.

Maybe this answers part of your question?  From TP I export a Corona SDK image sheet then the code in my project looks something like this:

local sheetData = require ("mySheet") local sheet = graphics.newImageSheet( "mySheet.png", sheetData:getSheet()) local sequenceData = { {name="run", start=1, count=5, time=200, loopCount = 0}, {name="jump", start=6, count=2, time=200, loopCount = 1}, } local sprite = display.newSprite( sheet, sequenceData) sprite:setSequence("run") sprite:play()

You would have to look in the mySheet.lua to get the frame numbers and code them manually as far as I can gather. 

I deal with different size sprites my drawing an invisible (alpha 0) box around them, the maximum size of the biggest sprite to help keep them centered.  It depends on the size difference though I guess as to wether this is practical for you or not as the physics will use this box for it’s collisions. 

The Texture packer tutorials are really bad!

Hope this helps :slight_smile:

I posted something similar on another thread but I’ve found it easier to use Level Director (www.retrofitproductions.com/level-director).

You can import texturepacker & physicseditor files then create and view animation sequences.

It does all the hard work for you and exports a lua file with all the data in it (I use the template export option). 

Thanks for the reply. Level Director looks pretty cool, sadly I am using a Mac and can not use it. 

I’m curious about this the Template Export System. I’d like to learn more about this.