It looks like you're new here. If you want to get involved, click one of these buttons!
[Viewport]
Camera = Camera
BackgroundColor = (0, 0, 0)
[Camera]
FrustumWidth = @Display.ScreenWidth
FrustumHeight = @Display.ScreenHeight
FrustumFar = 1000.0
Position = (0.0, 0.0, 0.0)
[Input]
SetList = InputSet1
[InputSet1]
KEY_LEFT = GoLeft
KEY_RIGHT = GoRight
KEY_UP = ScaleUp
KEY_DOWN = ScaleDown
MOUSE_LEFT = ButtonLeft
KEY_RETURN = Select
[PrincipalMusic]
Music = res/snd/principal.wav
Loop = true
[BackgroundGraphic]
Texture = res/img/boceto.png
Pivot = center
[BackgroundObject]
Graphic = BackgroundGraphic
Position = (0.0, 0.0, 1.0)
[ButtonGraphic]
Texture = res/img/button-1.png
Pivot = center
[ButtonGraphicSelected]
Texture = res/img/button-1-s.png
Pivot = center
[ButtonObjExit]
Graphic = ButtonGraphic
Position = (470.0, 388.0, 2.0)
[ButtonObjJugar]
Graphic = ButtonGraphic
Position = (8.0, 388.0, 1.0)
Comments
I'm asking as your camera is centered in (0, 0, 0) and both buttons use a Y = 388.0, which means that the FrustumHeight of your camera needs to be at least 776 to have their center barely in screen (I don't know how large they are).
Have you tried replacing the button graphic with the background one to rule out some issue with the bitmaps button-1.png and button-1-s.png?
And lastly, which version of orx do you use and on which platform?
a)
b)what is FrustumHeight ?
c) i don't understand, sorry (google translator is very bad)
d) Windows, and i can't compile orx from source, so i'm using 1.3.
button-1.png and button-1-s.png size: 120x60
Try moving your object [ButtonObjExit] and [ButtonObjJugar] much closer to 0,0. At the moment they are both outside your viewing boundaries.
Frustum is the shape of the area that the camera can see.
Be aware, your camera points at the 0,0 location in the world. The location '0x,0y' is in the center of your screen. Up and Left are negative numbers, Down and Right are positive numbers.
In your layout the bottom right corner of your screen will see 400x , 300y.
Edit: Many of us here speak multiple languages, so if you tell us yours, we may be able to help without using google translate.
My new problem: the object "BackgroundGraphic" is about the buttons.
And just in case, I speak Spanish.
Thanks for helping!
So the camera frustum is what you defined here:
By doing so, you define how much of the world the camera will "see". The widht&height defines the 2D rectangle (X-Y axes) of the world it'll see and the near/far will determine how much on the Z axis will be seen.
You have a far = 1000 and a position of (0, 0, 0) which means your camera sees objects with a Z that complies with 0 < z <= 1000.
Now if we look at your config, you have:
- ObjJugar.Z = 0
- Background.Z = 1
- ObjExit.Z = 2
That means that ObjExit will be rendered behind Background and will thus be obstructed by it.
ObjJugar won't be rendered because it's Z = 0 and doesn't fit in 0 < Z <= 1000.
Hope this helps!
PS: Sorry I don't speak Spanish at all but maybe someone else here does!
It is very understandable what you say, but I do not understand is why doesn't work. I don't know what is wrong, now see only the buttons
Sure, no problem!
Mmh, I guess it's because I wasn't clear enough in my explanation. Let's try another time.
The above part puts the Camera at Z = 0 (let's not care about X/Y for now).
It can see as far as 1000 away from where it's placed.
So the camera sees object whose Z > 0 (not Z >= 0) and Z <= 1000.
Here BackgroundObject is set with Z = 0. It's too close from the camera and won't get rendered. Z *needs* to be > 0 in your case.
Here both objects have Z = 1 which satisfy 0 < Z <= 1000, so you're fine.
If you want your background to appear behind your buttons, its Z needs to be > 1.
And now some ASCII art!
You want something like this So if you pick any Z1 & Z2 with 0 < Z1 < Z2 <= 1000 it'll work.
My problem is solved! Thank you very much!
And no worries for the language, my native language isn't English either and it's the same for a lot of people around here.