Backdrop problems


(Nazo Systems) #1

Hello! I would like to make the backdrop image’s bottom start from the map’s bottom regardless of the map’s height (map made in OGMO). Is there any way to do that?

Thanks in advance!


(TaylorAnderson) #2

Can’t you pull the height of the map from ogmo? I believe its xml.@height


(Nazo Systems) #3

I don’t think you understand. You see the Image used for the backdrop is 550 x 550. The height of the map is different on every map. I know how to pull the height of the map from ogmo, what I don’t know is how to use that to obtain the desired effect. I mean right now the image’s top left corner is, let’s say, attached to the top left corner of the map. I want to make it so that the bottom left corner of the image is attached to the bottom left corner of the map.


(Bora Kasap) #4

backdrop.y = map.height - backdrop.height” should work? what you mean?


(Nazo Systems) #5

scrollingY = 0.3 I think that is part of the problem, but I need it. Can I still get this effect with scrolling on?


(Bora Kasap) #6

is that for something like jumping effect for perspective illusion?


(Nazo Systems) #7

Perspective, to make it feel like it’s farther back.


(Bora Kasap) #8

you should use bigger(as height) image to solve that, you have no other way.

Then you can stop scrolling when jumping is too much.

or decrease scrollY ratio relative to player’s y position

thats something like. your scrollY is 0.3 when player at the ground. but when player jumps you can decrease scrollY like 0.25, 0.20, 0.15 to keep background image in the game stage


(Nazo Systems) #9

Thanks. I’ll see what I can do then.


(azrafe7) #10

Haven’t fully grasped the problem, but I think that Backdrop.shift() could probably help you out.