Layout View Zoom & Window Resolution

For questions about using Classic.

Post » Sun Sep 28, 2008 3:33 am

Two small issues I have grown tired of trying to figure out on my own:

1) Layout View Zoom?
Is it possible to zoom in while in the layout view? I am making/prefer to make games in a low resolution (320 x 240 usually) to get that more retro feel, and it is much nicer to work in that resolution if I can zoom in. Is this feature available currently? How do I use it?

2) Window Resolution?
As said before I like to make games at smaller resolutions. So, say I have a game that has a res of 320 x 240, and I want it to run in a window, BUT, I want the window to have a resolution of twice that size, and have the game stretch to fit. I cannot for the life of me find any options that let me do this, but surely it must be doable? If so, how?

Thanks ahead of time! :wink:
B
1
G
4
Posts: 8
Reputation: 1,041

Post » Sun Sep 28, 2008 4:15 am

1. Hold down control and use the mouse wheel to zoom in.

2. Set the window size to 320x240, but at the start of the layout, using the window object, set the window size to 640x480. That should double the size.

Hope that helps. :)
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Sun Sep 28, 2008 4:17 am

I'm curious why there isn't a stretch display checkbox already though.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Sun Sep 28, 2008 4:44 am

[quote="linkman2004":3obh1ch6]1. Hold down control and use the mouse wheel to zoom in.

2. Set the window size to 320x240, but at the start of the layout, using the window object, set the window size to 640x480. That should double the size.

Hope that helps. :)[/quote:3obh1ch6]

Thank you thank you thank you! One problem though.

When I resize the window (to 640 x 480, exactly two times the size of the game) it kind of blurs the pixels, which totally ruins the retroness. Any way around this?

Edit: Oh and yes, sampling is set to point in case you were wondering.
B
1
G
4
Posts: 8
Reputation: 1,041

Post » Sun Sep 28, 2008 7:08 am

[quote="BuddytheRat":fpu7xygb]When I resize the window (to 640 x 480, exactly two times the size of the game) it kind of blurs the pixels, which totally ruins the retroness. Any way around this?

Edit: Oh and yes, sampling is set to point in case you were wondering.[/quote:fpu7xygb]

To keep point filtering, instead of stretching the window with the window object, you will have to zoom each of your layers 200% for x and y.

But there's a problem... you also need to make your layout bigger around the edges to compensate for this. For 320x200 scaled up, you will need an extra 160 pixels at the top and bottom of your layouts, and an extra 100 pixels on either side, to make a buffer of sorts. Otherwise those areas won't be visible when you zoom in. But this will respect point filtering.

Of course, you could avoid the pixel boundary problem by setting your layout to "Unbounded scrolling," but the character will always be in the center of the screen, and you have to add extra decorative graphics around the edge of your layout anyway because the game will scroll outside the boundaries.

You might consider just making your sprites and tiles all scaled 2x before importing them into construct and use an unscaled resolution of 640x480. Sure, it will appear to have sub-pixel movement to the trained eye (because every pixel is actually made of four pixels) but you still get that chunky retro look without the headache of doing any of the above. This is how I'm doing my game.

It's really up to you though. No way is perfect, so you have to decide which of the evils are lesser enough to still work with. I think Rich or someone mentioned something about point filtering when stretching the display recently but I can't remember, I just woke up and my head is all fuzzy.

Hope this helps.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Sep 28, 2008 9:32 am

[quote="deadeye":1j4qedvw]For 320x200 scaled up, you will need an extra 160 pixels at the top and bottom of your layouts, and an extra 100 pixels on either side, to make a buffer of sorts. Otherwise those areas won't be visible when you zoom in. But this will respect point filtering.[/quote:1j4qedvw]

So, what's the math involved in reaching those numbers? Right now the resolution of my game is 320 x 240. I COULD make it smaller but the more space the better for my purposes, and I might end up making it wider.

What is the likelihood that this problem will be addressed in later versions of Construct? Should probably write up a request or something.

Thanks for the help! I'll much around with what you said and see if I can figure out the numbers on my own.
B
1
G
4
Posts: 8
Reputation: 1,041

Post » Sun Sep 28, 2008 9:48 am

[quote="BuddytheRat":2am9i9ns][quote="deadeye":2am9i9ns]For 320x200 scaled up, you will need an extra 160 pixels at the top and bottom of your layouts, and an extra 100 pixels on either side, to make a buffer of sorts. Otherwise those areas won't be visible when you zoom in. But this will respect point filtering.[/quote:2am9i9ns]

So, what's the math involved in reaching those numbers? Right now the resolution of my game is 320 x 240.[/quote:2am9i9ns]

Well, that would be 320/2=160 and 240/2=100 as filtered through my fuzzy brain right after waking up :P (for some reason I was thinking 320x200)

Regarding the zoomed display needing extra space, Ashley has stated it's staying exactly the way it is. As for the point sampling on stretched windows, I don't know.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Sep 28, 2008 2:42 pm

If you resize the window, DirectX has a hard-coded linear-filtered stretch it does. I don't know why they designed it like that but you can't change it as far as I know. I would recommend Deadeye's solution with Unbounded scrolling: zoom in the display 2x with point sampling. With unbounded scrolling you might be able to go running off the side of the screen, so make sure you add your own scroll boundaries (a wall the player can't run past for example).
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Sep 28, 2008 7:18 pm

Well I've tried the zoom, and gave it added boundaries as you said, but it's not quite perfect. I could probably change then numbers a bit to fix that, but it's giving me other problems as well. The tiled background I was using as floor and ceiling looks messed up now.



Notice the strange blur on the tiles on the bottom, and I can't even explain what is going on up above. Any idea why it's doing that?

The problems with Direct X are really unfortunate. I am trying my hardest to avoid making all of my graphics 2x the size. That might work for my current project, since the graphics are minimalistic, but for future projects this might be the deal breaker that sends me back to struggling with MMF. :(
B
1
G
4
Posts: 8
Reputation: 1,041

Post » Sun Sep 28, 2008 7:40 pm

What's wrong with the screenshot you posted? I don't know what it's meant to look like, so maybe some comparisons?

You could also try just using unbounded scrolling and setting your own limits manually (eg. ScrollX < 0: scroll to X = 0 etc). That might be a bit easier to set up.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests