sprite sheet problem

hello,

i am currently following this guide (https://docs.coronalabs.com/guide/programming/02/index.html) and I want to use my own sprites. i am using TexturePacker but my ship with the laser keep going up. is there anything I can do to put those sprites down?   here is a photo .

my ship with the laser keep going up…

What is it exactly that is happening and where? Would you be a little more specific?

If you are worried about the images “moving up” on the image sheet, then you don’t need to worry at all. Most likely TexturePacker is automatically arranging your images according to best fit and it doesn’t matter at all as to where those individual images on the sheet are. TexturePacker outputs a lua file with the information on all assets on a sheet and Corona will use it to find the correct sprites/frames.

If you are wondering about how to use TexturePacker created sheets with Corona, check out https://www.codeandweb.com/texturepacker/tutorials#corona.

hello, 

I need a .png file so that .lua file (probably) won’t help.

I need to know where the ship and the asteroids are in the .png file.

this is the code that I need to fill in:

– Configure image sheet

local sheetOptions =

{

    frames =

    {

        {   – 1) asteroid 1

            x = 

            y = 

            width = 

            height = 

        },

        {   – 2) asteroid 2

            x = 

            y = 

            width = 

            height = 

        },

        {   – 3) asteroid 3

            x = 

            y = 

            width = 

            height = 

        },

        {   – 4) ship

            x = 

            y = 

            width = 

            height = 

        },

        {   – 5) laser

            x = 

            y = 

            width = 

            height = 

        },

    },

}

Please read the post from XeduR again and look at the link he posted. The lua file means you don’t have to know where each sprite is on the sheet.

hello,

so I can just use .tps?

in the guide it says .png

Texture packer will export a png and lua file when you publish in corona format. .tps is the texture packer file that contains all your settings, Corona doesn’t use this.

i have exported the file and it is now a .png file.

but it only exported half. the rest are in red and says : to use please buy full version.

is there a other good corona sprite sheet tool?

picture:

I’ve not tried any of these as I’ve got the paid edition of Texture Packer, but maybe worth a try:

https://forums.coronalabs.com/topic/71178-sprite-sheets-for-developers-on-a-budget/

thank you all for the reactions! it helped a lot

my ship with the laser keep going up…

What is it exactly that is happening and where? Would you be a little more specific?

If you are worried about the images “moving up” on the image sheet, then you don’t need to worry at all. Most likely TexturePacker is automatically arranging your images according to best fit and it doesn’t matter at all as to where those individual images on the sheet are. TexturePacker outputs a lua file with the information on all assets on a sheet and Corona will use it to find the correct sprites/frames.

If you are wondering about how to use TexturePacker created sheets with Corona, check out https://www.codeandweb.com/texturepacker/tutorials#corona.

hello, 

I need a .png file so that .lua file (probably) won’t help.

I need to know where the ship and the asteroids are in the .png file.

this is the code that I need to fill in:

– Configure image sheet

local sheetOptions =

{

    frames =

    {

        {   – 1) asteroid 1

            x = 

            y = 

            width = 

            height = 

        },

        {   – 2) asteroid 2

            x = 

            y = 

            width = 

            height = 

        },

        {   – 3) asteroid 3

            x = 

            y = 

            width = 

            height = 

        },

        {   – 4) ship

            x = 

            y = 

            width = 

            height = 

        },

        {   – 5) laser

            x = 

            y = 

            width = 

            height = 

        },

    },

}

Please read the post from XeduR again and look at the link he posted. The lua file means you don’t have to know where each sprite is on the sheet.

hello,

so I can just use .tps?

in the guide it says .png

Texture packer will export a png and lua file when you publish in corona format. .tps is the texture packer file that contains all your settings, Corona doesn’t use this.

i have exported the file and it is now a .png file.

but it only exported half. the rest are in red and says : to use please buy full version.

is there a other good corona sprite sheet tool?

picture:

I’ve not tried any of these as I’ve got the paid edition of Texture Packer, but maybe worth a try:

https://forums.coronalabs.com/topic/71178-sprite-sheets-for-developers-on-a-budget/

thank you all for the reactions! it helped a lot