I’m trying to implement an image sheet that I made in Texturepacker and I there are some things I can’t figure out. And by can’t figure it out I mean that it looks bad and I can’t figure out why.
I have 3 .lua files and three .png files. each one is file, file@2x, file@4x
I put the .png files in a folder called images in the resources directory.
I am using the corona recommended ultimate config.lua file.
First question: Do I need to require all three .lua modules or does the image suffix thing work for all of them?
Second question, do I need to figure out which of these tables to use or is there a built in way to do that? If I need to do it in the code, I don’t understand the benefit of using the config file suffix thing.
I read this:
----------------------
Important
This feature is only supported by images displayed using display.newImageRect() or by sprites and images taken from image sheets that contain the overall sheet size parameters.
I’m not sure how sheet parameters are implemented, do I add the size of the entire sheet to every single entry in the sheet.lua file? That seems kind of… well, messy, to copy and paste it in every single definition.
sheetContentWidth =70-- width of original 1x size of entire sheet
sheetContentHeight = 82 – height of original 1x size of entire sheet
Finally, I have a border that is a 1 pixel wide by 6 pixel long file that I stretch. It seems that the image sheet is swallowing it, probably because it is being added to the @4x version and you can’t reduce an image that is one pixel wide. Is it best to just leave it out of the image sheet or should I blow it up to 4 px x 24 px?