I am new to game development and I wanted to ask a question.
I am reading the simple game example from here.
1) I want to ask why we define bucket.x = 800 / 2 - 48 / 2 ? How is that? Why not just set bucket.x=400 ( at the middle position).
... camera.setToOrtho(false, 800, 480); ... bucket = new Rectangle(); bucket.x = 800 / 2 - 48 / 2; bucket.y = 20; bucket.width = 48; bucket.height = 48;
2) The bucket width and height are seet 1/10 of our screen size.Ok. But what about the real dimensions of bucket object?I mean , the bucket what size must be?32x32 pix?48X48 pix?How we handle that?
3) Also, I am a bit confused about x and y dimensions. x refers to width and y to height as we see the cell phone in portrait mode? So , if we are in landscape mode , y is "x"?