Screen size question that's making me crazy.

0plus1

  • Posts: 20
I have followed the iPhone screen resolution guide.

I set the resolution to 480x320 and scale to 1.
Scene size 480x320.

In the scene editor the boundaries of the screen size aren't the same size as the scene, infact, when I create an actor at the center of the screen (480/2 x 320/2) either hard coding (240 x 160) or using the sceneSize block the object isn't in the exact center of the screen in the iPhone simulator, I don't really understand why and it's driving me crazy, has any of you any ideas about what the reason for this may be?

Thanks

coleislazy

  • *
  • Posts: 2607
I'm not sure if you've already accounted for it, but the actor's position is measured from the top-left corner of itself. So, if you set its position to 100, 100 and the actor was 20 pixels square, its actual center would be at 110, 110 on the screen.

0plus1

  • Posts: 20
I don't think that is the problem, because it's a lot more in the wrong position than just its size but I'll take a look at it, isn't there a way to set the actor hotspot at its center?

ShaneS429

  • Posts: 76
I just created a quick new scene in my project and the default scene size was 20 tiles x 12 tiles at 32px a tile which makes it 640x384 I believe.

Go into your scene properties tab and change it to 15 tiles x 10 tiles which would then give you a 480x320 scene to fit exactly to the iphone screen size. Or you can just change it from tiles to pixels and manually type in the dimensions.

And as far as I know, there is no way to change the actual origin point of the actors as far as to what it considers the Y/X to be 0