R95: Issue with Fullscreen + Unbounded Scroll

0 favourites
  • 1 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Please correct me if I'm wrong, but it's my understanding that, with projects in fullscreen, you can still perform pixel-oriented actions as you would on the normal size, and the code "scales" it to fit the new screen size.

    For example: a sprite told to move 32 pixels to the right will move 64 pixels in a double-sized screen, without the need to change the code itself from "Set X to self.X+32" to "Set X to self.X+64".

    So here's my issue: I have my window sized at 640x480, and a Layout with Unbounded Scroll set to no. With that setup, the lowest scroll position I can obtain is 320x240, which is half of the window size (because the "scroll hotspot" is its center). The action "On Start of Layout -> Scroll to (320, 240)" works just fine.

    However, when I enable fullscreen (letterbox scale), I can't set the scroll any lower than half of the new window size. Meaning if it's resized to 960x720, I can't get the scroll any lower than 480x360. The same happens with different screen sizes, as I resize my Google Chrome window and reload the preview. That's weird to me, as I expected the scroll function to work according to the original sizes, like everything else.

    What makes it even more weird is that the bug only happens when I try to position the scroll on start of layout. If I put a "Wait 0.1 seconds" before that "Scroll to" event, it works just fine, which means the scroll does work according to the original sizes, but only after the first tick. On start of layout, it takes into account the resized screen size.

    I can bypass the bug with that "Wait 0.1 seconds" trick or by setting Unbounded Scroll to yes, but I thought I should report the bug anyway as it is pretty weird to have the scroll act differently on the first tick only. Here's a capx reproducing the bug: dl.dropbox.com/u/8647071/fullscreenscrollbug.capx

    You can try toggling the "Wait 0.1 seconds" function and setting Unbounded Scroll to yes, while resizing your browser window and refreshing the preview to reproduce all the different behaviors. I hope it helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)