Resizing window..

This forum is currently in read-only mode.
  • Is it possible to resize the window of a direct X game without the image interpolation / blurriness? It's ruining my graphics! I'm using the window object btw, not dragging the window.

  • Is it possible to resize the window of a direct X game without the image interpolation / blurriness? It's ruining my graphics! I'm using the window object btw, not dragging the window.

    application properties -> scroll down to runtime properties if you have to -> sampling -> change to "point" and there you go!

    edit: also you might wanna consider changing the text rendering to aliased. cheers!

  • Thanks for the quick reply! However, I'm already using point sampling. What happens is even though I'm using point sampling, the graphics become distorted/blurry after resizing the window; as If I've chosen linear sampling instead. Any idea how that can be fixed?

  • ... What happens is even though I'm using point sampling, the graphics become distorted/blurry after resizing the window; as If I've chosen linear sampling instead. Any idea how that can be fixed?

    That happens if you just change the window size without changing the display size while in the properties you have "Resizing" set to "Disabled" or "Stretch window content"

    My best experience to date was to use System: Set display resolution (More of your game will be revealed or black borders, if you have smaller layouts), esp. when switching during gametime. This action sets the window size automatically in relation to the new resolution, you just may need to reposition it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been dabbling with resizing window on the fly without stretching the content, you'll want to use Window object (wait for next release, Davo's fixed the Window object to be much more useful )

    And yes, System: Set display resolution works nicely.

  • I don't mean to be rude but changing the display resolution does the opposite of what I'm going for ;; It might come in handy for another option though..

    I meant I DO want to stretch the display when resizing the window, but I don't want the interpolation that comes with it. Basically my game's window width and height is 256x224. I just want to stretch the window out to 512x448 or higher so it's easier to see. I used the window object and "set size" to achieve this, but like I said it automatically messes with the graphics and makes them blurry. With that said, is there a way to resize the window and it's contents without distorting the graphics?

    Sorry for any confusion.

  • I don't mean to be rude but changing the display resolution does the opposite of what I'm going for ;; It might come in handy for another option though..

    I meant I DO want to stretch the display when resizing the window, but I don't want the interpolation that comes with it. Basically my game's window width and height is 256x224. I just want to stretch the window out to 512x448 or higher so it's easier to see. I used the window object and "set size" to achieve this, but like I said it automatically messes with the graphics and makes them blurry. With that said, is there a way to resize the window and it's contents without distorting the graphics?

    Sorry for any confusion.

    You are not rude

    Changing the display resolution does what you want (instead of resizing the window), you just need to rework the content to your needs (point sampling is still required, of course).

    Your actual example as pseudo code:

    +(Some trigger, eg On key pressed)

    ->System: Set layout size to 512x448

    ->System: Set zoom to (200, 200)

    ->System: Set display size to 512x448

    The only thing left to do is reposition the "camera", but that's dependant of what you want to show or what other events or plugins you use therefore, so I'll leave it out.

  • I'm having problem with this as well.

    I managed to set display resolution, then zoom in. But no matter how hard I try, I cannot reach the border of my layout (I have a sprite with "scroll to X and Y").

    Of course I can turn unbounded scrolling to do this, but I'd like to come up with a clean solution to that

    Do you guys know what's going on?

    EDIT:

    Ok, I found this... Looks like I have to go with the Unbounded Scrolling anyway...

  • With unbounded scrolling on, do this to scroll to Sprite but not scoll past the edges of the layout.

    + System: Always (every tick)
    -> System: Scroll to X Clamp(Sprite.X, (ScrollXRight-ScrollXLeft)/2, LayoutWidth-(ScrollXRight-ScrollXLeft)/2)
    -> System: Scroll to Y Clamp(Sprite.Y, (ScrollYBottom-ScrollYTop)/2, LayoutHeight-(ScrollYBottom-ScrollYTop)/2)[/code:d47dogvp]
    
    Or for example you have a layout of size 640x480 and set the zoom to 200,200 then:
    [code:d47dogvp]+ System: Always (every tick)
    -> System: Scroll to X Clamp(Sprite.X, 160, 480)
    -> System: Scroll to Y Clamp(Sprite.Y, 120, 360)[/code:d47dogvp]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)