no full screen on helloPhysics example

Hello Everyone,

I am following the HelloPhysics example and the output only partial of the screen but not full like the tutorial.

Can anyone provide me some advise?

Thank you.

Hello @tritop39,

Because there are so many devices with so many aspect ratios, Corona handles “full screen” via the content area, which is basically a region that will span most (or all) of the screen, with some content overflowing if the aspect ratio is different. Most of the sample projects were designed with an aspect ratio like the iPhone4, so if you run it on a different device aspect ratio, it will not occupy the full screen

To better understand content area, please read this guide:

http://docs.coronalabs.com/guide/basics/configSettings/index.html

Brent

Hi Brent,

Thank you for your reply.

I looked at my config.lua file and it is set to w=340 h=480 scale=letterbox.

The image is 360X480 so I thought it would fit to screen.

I did choose view output with other devices and the outcome

was all the same…partial to screen.

Did I miss something?

Thank you.

Update -

So I create a new project with this statement…

textObject = display.newText( “Hello World!”, 0, 0, native.
systemFont, 40

It looks as if the middle left of the letter ‘W’ is at location 0,0.

Does this help in any way in resolving my issue?

Thank you.

Tri

Hi @Trimeister,

One key aspect of the content area is the width and height, but the other important aspect is the “scale” setting. With letterbox, the entire content area will fit on the screen, no matter what size it is. In other words, if you set the content area as a square (just as an example, not really logical for app design), that content area would span the width of the screen (in portrait orientation), and there would be “letterbox” bars above and below which are outside of the content area.

In comparison, if you set the scale to “zoomEven”, that square would be “expanded” to the entire height of the screen… but at the same time, much of that square would overflow off the left and right sides.

The setting you choose really depends on how you want to handle it. I prefer letterbox, and then I use some simple math to know exactly the “height” of the letterbox bars, so I can easily tuck various elements like a UI bar against the top or bottom of the screen, no matter what device it’s running on. Other people prefer “zoomEven” which is useful when letterbox isn’t so suitable.


As for your text, yes, that is logical. The text object’s center is placed at (0,0), so you’ll need to adjust its x and y position to make it fully fit on the screen.

Brent

Hello @tritop39,

Because there are so many devices with so many aspect ratios, Corona handles “full screen” via the content area, which is basically a region that will span most (or all) of the screen, with some content overflowing if the aspect ratio is different. Most of the sample projects were designed with an aspect ratio like the iPhone4, so if you run it on a different device aspect ratio, it will not occupy the full screen

To better understand content area, please read this guide:

http://docs.coronalabs.com/guide/basics/configSettings/index.html

Brent

Hi Brent,

Thank you for your reply.

I looked at my config.lua file and it is set to w=340 h=480 scale=letterbox.

The image is 360X480 so I thought it would fit to screen.

I did choose view output with other devices and the outcome

was all the same…partial to screen.

Did I miss something?

Thank you.

Update -

So I create a new project with this statement…

textObject = display.newText( “Hello World!”, 0, 0, native.
systemFont, 40

It looks as if the middle left of the letter ‘W’ is at location 0,0.

Does this help in any way in resolving my issue?

Thank you.

Tri

Hi @Trimeister,

One key aspect of the content area is the width and height, but the other important aspect is the “scale” setting. With letterbox, the entire content area will fit on the screen, no matter what size it is. In other words, if you set the content area as a square (just as an example, not really logical for app design), that content area would span the width of the screen (in portrait orientation), and there would be “letterbox” bars above and below which are outside of the content area.

In comparison, if you set the scale to “zoomEven”, that square would be “expanded” to the entire height of the screen… but at the same time, much of that square would overflow off the left and right sides.

The setting you choose really depends on how you want to handle it. I prefer letterbox, and then I use some simple math to know exactly the “height” of the letterbox bars, so I can easily tuck various elements like a UI bar against the top or bottom of the screen, no matter what device it’s running on. Other people prefer “zoomEven” which is useful when letterbox isn’t so suitable.


As for your text, yes, that is logical. The text object’s center is placed at (0,0), so you’ll need to adjust its x and y position to make it fully fit on the screen.

Brent