If you’re not clear on what I mean by ‘native resolution’, let me explain by way of example.
Assumptions
- Original image is 100 x 100 PNG.
- Packed into sheet with ‘Texture Packer’ and produced only a 1X sheet.
- The image in the sheet will have been processed by Texture Packer, but it should be the same or very close to the same as the original and still be 100 x 100.
Scenario 1
- config.lua scale is set to 320x480 letterbox.
- Image is displayed using newImageRect() with a size of 100 x 100
- Played on actual iPhone 1 device (320 x 480 resolution).
-
Result: The image is being displayed at ‘native resolution’ and should be (nearly) indistinguishable from original image.
-
Note: There will always be a small variance because iPhone screens use a different display technology than most monitors.
Scenario 2
- config.lua scale is set to 320x480 letterbox.
- Image is displayed using newImageRect() with a size of 50 x 50
- Played on actual iPhone 4 device (640 x 960 resolution). (Scale == 2x)
-
Result: The image is being displayed at ’ native resolution’ (100 x 100 real pixels) and should be (nearly) indistinguishable from original.
Scenario 3
- config.lua scale is set to 320x480 letterbox.
- Image is displayed using newImageRect() with a size of 50 x 50
- Played on actual Nexus 7 device (1920 x 1200 resolution). (Scale == 3.75)
-
Result: The image is being displayed at ’ NON - native resolution’ (188 x 188 real pixels). Image will be blurred due to upscaling.
Displaying In the Simulator
You may also be worrying over nothing because you are assuming what you see on the simulator is what you will get on device. This is not the case. The simulator has a number of factors that may affect the visual accuracy:
- Possible non-integer multiple for scaling. (Staff can confirm or deny this, but I think some scaling is nearest fit when simulating.
- Video Card Driver.
- Other…
The point is, don’t believe what you see. It often looks much better on device. In fact, always test on device to confirm any results of any question.
Developing in the simulator is awesome and fast, but no substitute for testing on device.