[Solved] Need an idea of how to scale to show full screen

Get help using Construct 2

Post » Sun Mar 01, 2015 4:48 pm

I have a big detailed isometric game board layout. It's literally 3x the normal 1920 x 1080 viewport. It's 5760 x 3240. You can scroll around while playing to see all the areas on the game board.

What I'd like to do is provide a HUD button you can click to momentarily re-scale the big layout so it's fully visible within the 1920 x 1080 viewport. I'm sure this is possible but it's not coming to me quickly.

Is there a simple way to do this?
Last edited by locohost on Sun Mar 01, 2015 8:31 pm, edited 1 time in total.
B
13
S
4
Posts: 280
Reputation: 1,566

Post » Sun Mar 01, 2015 5:02 pm

Have you tried using the browser object to set to "scale inner" ?
Image
B
75
S
23
G
3
Posts: 672
Reputation: 9,224

Post » Sun Mar 01, 2015 5:50 pm

I have. It doesn't do anything that I can see. Screen looks same.
B
13
S
4
Posts: 280
Reputation: 1,566

Post » Sun Mar 01, 2015 5:54 pm

Looks like you have to set Window size to the full game board size of 5760 x 3240. Haven't tried this yet while the game is running, on button click. Will try now...
B
13
S
4
Posts: 280
Reputation: 1,566

Post » Sun Mar 01, 2015 6:04 pm

Ok this works...

C2ZoomOutIn.PNG
You do not have the required permissions to view the files attached to this post.
B
13
S
4
Posts: 280
Reputation: 1,566

Post » Sun Mar 01, 2015 6:05 pm

You shouldn't have to set the window size to the layout size, and I wouldn't recommend doing that. Try setting the layout scale -- since your layout is three times bigger than the view port, a scale value of 0.3333 should make the whole layout visible.
Moderator
B
106
S
41
G
20
Posts: 1,584
Reputation: 18,917

Post » Sun Mar 01, 2015 6:12 pm

linkman2004 wrote:You shouldn't have to set the window size to the layout size, and I wouldn't recommend doing that. Try setting the layout scale -- since your layout is three times bigger than the view port, a scale value of 0.3333 should make the whole layout visible.


That works too. Thanks @linkman2004. Why do you "not recommend" setting canvas size?
B
13
S
4
Posts: 280
Reputation: 1,566

Post » Sun Mar 01, 2015 6:13 pm

:)

zoom out
set layoutscale = lerp(layoutscale, (viewportRight("hud") / layoutwidth), 0.5*dt)

zoom back in
set layoutscale = lerp(layoutscale, 1, 0.5*dt)
Who dares wins
B
50
S
10
G
10
Posts: 1,728
Reputation: 12,875

Post » Sun Mar 01, 2015 6:13 pm

linkman2004 wrote:You shouldn't have to set the window size to the layout size, and I wouldn't recommend doing that. Try setting the layout scale -- since your layout is three times bigger than the view port, a scale value of 0.3333 should make the whole layout visible.
that is so wrong in so many cases


For the poster @locohost :

that depends on the layout size, but usually if ur designing ur game in a 800x600 or 1280x960 u can resize it to the layout size.... if ur layout size is bigger then the one i said that will be landscape 12:9 then u need to use the scroll to behavior so the screen size follows the player in the big layout(as a platformer will have)

if u don't want that u could use yes the the layout zoom but who uses that? unless its looking for big pixelated graphics, the man just wanted to fit layout to screen.....
ImageImage
B
56
S
15
G
64
Posts: 1,259
Reputation: 39,696

Post » Sun Mar 01, 2015 6:17 pm

@gamecorpstudio yes I have screen scroll control setup. That part works fine. I just want a way for the player to temporarily see the entire game board whenever they want.
B
13
S
4
Posts: 280
Reputation: 1,566

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests