New parallax - what to do?

Discussion and feedback on Construct 2

Post » Sat May 19, 2012 2:23 am

Hello everyone,

I opened C2 to the new update (r91) and was a little confused to see that my HUD layer has been shifted when my window size changes. I know this is in the changelog, but it seems a bit counter-intuitive to me, and I have no idea on how to compensate for this.
Any pointers?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 19, 2012 12:23 pm

Doesn't your HUD layer have a parallax of 0, 0? Can you make a .capx demo?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat May 19, 2012 12:36 pm

http://dl.dropbox.com/u/41931267/Layer_problem.capx
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 19, 2012 1:35 pm

Use the Anchor behavior. Anchor it to window left, window top, window right, window bottom and it works.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat May 19, 2012 1:48 pm

Hmm. I liked it much better being able to set a position on the HUD layer. Ah well, if that's just me, feel free to ignore ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 19, 2012 2:42 pm

Well, the parallax thing is one of those things we can't win: either this doesn't work or other games don't work. TBH the Anchor behavior is designed for doing that positioning for you, so I think it's OK to use that if the events don't work...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat May 19, 2012 3:26 pm

Fair enough - I'm not sure what to do, however, If I want a button on a specific position on the screen...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 19, 2012 6:25 pm

A trick I used was to actually use a sprite the shape of the screen (which I was also using for a custome fade out of levels)which I'd placed many image points in, each image point was the place to put a part of the hud or UI. And sense this fade sprite always automatically scales to match the new screen size, my stuff always stayed i nthe same position. (I had an action..Every tick- place object A at iumage point A etc.)
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Sat May 19, 2012 6:29 pm

@Brashmonkey... That is very clever! I use a similar technique for my menus, but never thought of using it for the HUD.
Cheers, mate ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 19, 2012 6:35 pm

Thanks, Glad to help. It's strange though, I installed this new build and cant find the letterbox settings! What am I missing? I though it would be in the "Fullscreen in Browser" drop down list, but its not. :(
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests