Layout View Zoom & Window Resolution

This forum is currently in read-only mode.
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • 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!

  • 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.

  • I'm curious why there isn't a stretch display checkbox already though.

  • 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.

    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.

  • 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.

    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.

  • 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.

    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.

  • > 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.

    >

    So, what's the math involved in reaching those numbers? Right now the resolution of my game is 320 x 240.

    Well, that would be 320/2=160 and 240/2=100 as filtered through my fuzzy brain right after waking up (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.

  • 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).

  • 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.

    <img src="http://perryhome.com/nathan/images/screeny1.png">

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

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

    Ah sorry. The floor and ceiling should just be white blocks with a black two pixel border. If you look closely on the bottom there is a little bit of blurring between the black and the blue background, and the top, well it's just all sorts of messed up.

    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.

    The main problem with using unbounded scrolling is that my game needs to have zelda like scrolling. (Where the screen doesn't move until you are at the edge, and then it freezes the action to scroll over to the next sector.) This is useful advice nonetheless which I might use in later games.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)