*** - Image Sheets - Fractional (decimal) values ???

Hello everyone,

I am creating the image sheets of a game in progress and I have initially created the high resolution image sheet (2x), but to create the 1x image I have told the software that created it to scale the first one to 0.5 and so I got it. The problem is that some of the values obtained in the position properties (X and Y) and the size properties (width and height) are decimal values.

My question: Is this solution feasible. I mea, can decimal values cause problems on the image sheets?

  1. Yes, decimal places will be a problem. There is no such thing as half a pixel.
  2. What tool did you use to create the sheets.

There are 2 solutions for this:

  1. Simplest one: Make original image sizes divisible by 2 so there are no 0.5 values when creating smaller version

  2. When I use Texture packer, it creates two lua files that go with image sheets. Later in code I use display.imageSuffix to check if graphics is @2x or standard to load right sheet.

As @roaminggamer wrote above, it would be heplfull if we could know more about how you create image sheets.

I’m using Free Texture Packer

First option seems more helpful.

@aclementerodrguez I’m still not clear what tool you’re using.

Do you mean this? https://www.codeandweb.com/free-sprite-sheet-packer

If so, I don’t see any way to generate 1x, 2x, … sheets. So, if you’re using the tool linked above, provide a screenshot of the case where you use 0.5 scaling so I can understand how you’re doing it.

Did you mean you’re using the Trial version of the downloadable Texture Packer: https://www.codeandweb.com/texturepacker ?

Notice how when @atanasovskyjiri answered, that answer included links to the tool and api details under discussion. That way, we are all on the same page and know exactly what is being discussed.

Please very specific and clear when asking for help.

Ex: If you use a tool, provide a link to where you got it. If you are referring to a tutorial, link to it. If you have problems with an API feature, link to the API page you’re referencing and having rouble. Never make people guess and you’ll get quicker and better help. While many of us are experienced and have used many tools, etc. The game dev world is constantly moving forward and changing.
Thanks!

I’m using this: http://free-tex-packer.com/

It’s and open source tool.