Ultimate “config.lua” File questions

I read through the ultimate config.lua file and modernizing the config.lua file

After reading through both of those, I am still left with a few questions.

  1. With those tutorials in mind, what device should I target as my “base” image that will allow for everything to look nice as I scale up or down for other devices? I found on the forum some people recommend using the iPhone 5 of 6 as the default for image design and then scale images for the other devices?

  2. once I have the device selected that I will base all of my image design off of, how large should the background image be keeping in mind the “bleed area” that is mentioned in the tutorials listed above.

  3. this question is about the suffix @2x. how exactly do I make sure that the correct images are being selected. I understand that my image files will have the names Character.png and Character@2x.png, but how will I know corona is picking the right images?

when I call the image to be used do I have to concatenate the file name with a variable?

I would guess it would look something like this

display.newImage( “Character”…imageSuffix…".png" )

I hope these questions are clear

  1. I target iPhone 5s. Just my pref. I guess what matters is that you try you app out in multiple sizes and orientations - or whatever is appropriate.

  2. I use display.actualContentWidth/Height to ensure that I am covering all of the actual visible area. Other values in the display.* api give you the target or scaled resolution. I like to use the actual size of the screen and use the true top left of the screen as 0,0. I rarely use images in my apps (I really do try to programmatically render all my elements) but when I do use PNGs, I provide as many as I can - usually about 4 resolutions-worth.

  3. Use display.newImageRect to load dynamically scaled images based on their scaling. The image size you provide in the newImageRect call is the target device resolution, so any image loaded from that will be the nearest version of that the which Corona can find. display.imageSuffix will tell you which suffix (eg: @2x) Corona will use. Just print that at the start of your main.lua. No …imageSuffix… needed.

Thanks for the info, that helps clear some things up.

One last question, what if I am using image sheets for a lot of my graphics?

because of this i use display.newSprite() the api reference page for newSprite doesnt mention anything about substituting higher resolution images like it mentions on the display.newImageRect() api page

never mind, I just found the image sheet section on the display.newImageRect api page

  1. I target iPhone 5s. Just my pref. I guess what matters is that you try you app out in multiple sizes and orientations - or whatever is appropriate.

  2. I use display.actualContentWidth/Height to ensure that I am covering all of the actual visible area. Other values in the display.* api give you the target or scaled resolution. I like to use the actual size of the screen and use the true top left of the screen as 0,0. I rarely use images in my apps (I really do try to programmatically render all my elements) but when I do use PNGs, I provide as many as I can - usually about 4 resolutions-worth.

  3. Use display.newImageRect to load dynamically scaled images based on their scaling. The image size you provide in the newImageRect call is the target device resolution, so any image loaded from that will be the nearest version of that the which Corona can find. display.imageSuffix will tell you which suffix (eg: @2x) Corona will use. Just print that at the start of your main.lua. No …imageSuffix… needed.

Thanks for the info, that helps clear some things up.

One last question, what if I am using image sheets for a lot of my graphics?

because of this i use display.newSprite() the api reference page for newSprite doesnt mention anything about substituting higher resolution images like it mentions on the display.newImageRect() api page

never mind, I just found the image sheet section on the display.newImageRect api page