Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

iPad resolution

edited May 2013 in General Posts: 14

Since I use Codea to code my games, I do it on an iPad mini. Today, I got an iPad 4th generation Retina to test my games in 2048x1536 and I wanted to see the resolution in a test project using the print(WIDTH) and print(HEIGHT). I was surprised to see that it showed 1024x768 !!!!!!!!!! Codea does not seem to properly recognize the resolution!!! Any comments?



  • Posts: 97

    The default behaviour is for everything to look the same size on retina display or non-retina display. When you have 2 images, one in normal resolution (image.png) and another one in
    "retina" resolution (image@2x.png) Codea will load the @2x version on retina devices.

  • SimeonSimeon Admin Mod
    Posts: 5,417

    @dreamergb that is correct behaviour. Codea correctly uses the full 2048x1536 resolution of the retina iPad, but reports 1024x768 display size — this reported size is in points, not pixels.

    Vector drawing will be much sharper on a retina iPad and as @Cabernet says, images with @2x variants will load on retina devices. This gives the added benefit of your code working identically on non-retina and retina devices (except it will look much sharper on retina devices).

  • Posts: 100

    Courious how you practically manage the two png images. I have , until now, made my image in 2048 x1536, saved it with @2x name and copied it and removed @2x from the name. That is I am working on a 4 gen iPad.
    The 1024x768 image will only show a quadrant I expect on a lower gen iPad, so I will have to shrink the image by a factor 2. Is it just shrinking or do I realy need to make a new image, similar but lower resolution to show properly and everything in place ?
    I do not have the hardware to test, so wondering how it goes on the App store.
    Re Peter

  • SimeonSimeon Admin Mod
    Posts: 5,417

    @macflyerdk make your @2x images and then downscale them and remove the suffix. There are quite a few free tools for this, I have used Resizer for Mac (free) in the past, you can find it here:

  • Posts: 563

    I did a tute on this whole pixels vs points business - since it confused me so much!

Sign In or Register to comment.