Where did the retina sprite option go?

So there was this feature where you could switch a slider when importing an image asset that said something along the lines of “retina sprite” which would essentially half the pixel count of the sprite and have the pixels at 0.5 intervals. Now with the new update the slider is gone and if i want to import new sprites, I either have to half the resolution myself, which looks blurry, or half the size of the sprite in code, which is impractical as well. Has this feature been removed or can i find it somewhere else?

@itsNizart I remember that switch also but didn’t miss it. There’s normally 2 images that are saved, one as somename.png and another as somename@2x.png. The 2x is for retina devices and has the .5 values. For example, the Planet Cute sprints are non 2x while the Cargo Bot sprites are both. So you shouldn’t have to do anything to get the .5 sprites if they’re there.

Wow, I never thought anyone would miss that option :sweat_smile:

So we took this option out because all it did was, like you said, save the sprite at its full resolution with the suffix @2x and save it at half-resolution without that suffix. This was fine when Retina screens were only using 2x scaling, now we have 3x scaling (iPhone) as well as non-integer scalings (when you use display zoom options)

I thought it might simplify things to remove this as a hard-coded option, as it didn’t cover all cases. That said, I can understand your issue

You would like to use the “logical” size of the sprite but have Codea render the @2x version on appropriate devices (which today, is all iPads and iPhones, nothing uses 1x any more). This seems very reasonable and I am struggling to think of a solution that doesn’t hard code a “scale factor” on saving the image

Some options:

  • Perhaps all images could be saved with their scale factor by default (@2x or @3x) with a numeric dropdown to select a custom scale factor for the image
  • Update the image(...) constructor to allow you to specify a scale factor, and have support setting myImage.scale = 2 to indicate Codea should render this at the scale factor

For now, there’s a bit of a work-around:

  • Import the sprite once with the name you want, eg. MySpriteName
  • Import the sprite AGAIN with the name appended with @2x eg. MySpriteName@2x

You should see that the sprite’s size changes to half its original size, and it will render as if you had ticked the retina option from before