just 1/4 of screen displaied

Hey guys

I have started corona few days ago.

My first Tutorial goes clear and easy, but since lately i have a problem.

every tutorial i started so far, the simulater is displaying me following:

(take a look below)

 

Whats wrong?

i work with the Corona SDK Starter and Lua Glider editor.

Hello @seyjo,

Is the visual part shown in your screen the entire screen (just smaller than it should be)? Or, is 3/4 of the screen pushed up and left off the edge?

If this is the entire screen shown (just too small), it’s probably an issue in how you’ve configured the content area, size, and alignment.

if this is just part of the screen (and the rest is off the edge), then it may be an issue in how you’ve aligned/positioned the display group or stage on the screen.

Best regards,

Brent

I have an other example

I copied this tutorial 1:1, using the downloaded parts… 

http://mobile.tutsplus.com/tutorials/corona/create-a-balance-ping-pong-game/

thats the result:

all images i used are not centered

(sorry for my bad english…

Hi @seyjo,

Which version of Corona SDK are you using? You can check from within the Corona Simulator by doing “[Corona Simulator] > About Corona Simulator”.

i have the Corona Starter 2013.2100 (2013.13.7)

That tutorial and many like it are based around our old Graphics 1.0 engine. The build  you are using is based on our Graphics 2.0 engine and as such how things get positioned on the screen has changed.   In this case, it looks like they are using:

display.newImage(imagename, x, y)

Which defaults to drawing the image where the provided X and Y parameter are the object’s Top and Left.  Graphics 2.0 changed that X and Y to be the center of the object.   To fix this tutorial you can simply add half the width and half the height of the graphic to the provided X and Y respectfully.  The other thing you can do as a short cut is to change the default anchor point for these objects to be the top left.

Add these two lines to the top of your app:

display.setDefault(“anchorX”, 0)

display.setDefault(“anchorY”, 0)

Now there are consequences to this because after that point, objects are positioned by their top right and you may find you want to position things based on their center.  You could manually set the anchor points for each object individually, or you can set the anchor’s default back to 0.5 and 0.5 after you’re done with all of your Top Left positioned items.

Rob

Hello @seyjo,

Is the visual part shown in your screen the entire screen (just smaller than it should be)? Or, is 3/4 of the screen pushed up and left off the edge?

If this is the entire screen shown (just too small), it’s probably an issue in how you’ve configured the content area, size, and alignment.

if this is just part of the screen (and the rest is off the edge), then it may be an issue in how you’ve aligned/positioned the display group or stage on the screen.

Best regards,

Brent

I have an other example

I copied this tutorial 1:1, using the downloaded parts… 

http://mobile.tutsplus.com/tutorials/corona/create-a-balance-ping-pong-game/

thats the result:

all images i used are not centered

(sorry for my bad english…

Hi @seyjo,

Which version of Corona SDK are you using? You can check from within the Corona Simulator by doing “[Corona Simulator] > About Corona Simulator”.

i have the Corona Starter 2013.2100 (2013.13.7)

That tutorial and many like it are based around our old Graphics 1.0 engine. The build  you are using is based on our Graphics 2.0 engine and as such how things get positioned on the screen has changed.   In this case, it looks like they are using:

display.newImage(imagename, x, y)

Which defaults to drawing the image where the provided X and Y parameter are the object’s Top and Left.  Graphics 2.0 changed that X and Y to be the center of the object.   To fix this tutorial you can simply add half the width and half the height of the graphic to the provided X and Y respectfully.  The other thing you can do as a short cut is to change the default anchor point for these objects to be the top left.

Add these two lines to the top of your app:

display.setDefault(“anchorX”, 0)

display.setDefault(“anchorY”, 0)

Now there are consequences to this because after that point, objects are positioned by their top right and you may find you want to position things based on their center.  You could manually set the anchor points for each object individually, or you can set the anchor’s default back to 0.5 and 0.5 after you’re done with all of your Top Left positioned items.

Rob