Unwanted vertical scrolling

  • #1, by birenberggThursday, 25. May 2017, 11:22 7 years ago
    Hi!

    I make a game with background 356*200 and a LucasArts-like bottom verb interface (56*200). When my character gets too close to the interface area the background (with the character) slides up and reveals a black space under it.

    If I remove the interface, this problem doesn't occur.

    The issue happens both on VS4 and VS5.

    Did anyone gets this problem too? Any ideas how to solve it?

    Newbie

    7 Posts


  • #2, by sebastianThursday, 25. May 2017, 11:32 7 years ago
    The engine thinks you want to see the space underneath it... 

    just set the interfaces position to "absolute" and its y coordinate to "height of game resolution " - " height of interface " and it should work as expected. 

    Thread Captain

    2346 Posts

  • #3, by birenberggThursday, 25. May 2017, 11:35 7 years ago
    The engine thinks you want to see the space underneath it... 

    just set the interfaces position to "absolute" and its y coordinate to "height of game resolution " - " height of interface " and it should work as expected. 

    It worked, thanks a lot!

    Newbie

    7 Posts

  • #4, by i-c-gTuesday, 08. December 2020, 19:13 3 years ago
    Sorry for bumping up this thread, but I actually have the exact opposite problem. I created a SCUMM-like interface, taking 56px at the bottom of the screen.
    The useful viewport for the scene is this 256x144 (144 is vertical axis).

    I now have a scene that's supposed to scroll vertically (I made the image well higher than 200 with a black padding at the bottom.

    The problem is that it seems Visionnaire can't guess that my character is near the viewport when it walk it down in the scene.
    When I approach the bottom left or bottom right CORNER, it works, probably since it detects the character is near an edge and "adds padding" to keep it centered, so the image scrolls down, but if I try to walk down the center, it's not working.

    My interface was set to absolute position. I tried to switch it to "bottom" and also to set an image size (? not clear what it does, but it has to do with "overlapping")... nothing worked.

    Manually setting
    game.GameVerticalScrollDistance = 66 -- That's the interface height + 10px
    seems to work but the result is that now the top edge triggers the scrolling when the character is in the middle of the screen. I can't get how I can explicitely make Visionaire to understand that the interface doesn't count against the viewport of my game. Anything obvious I'm missing? Thanks for your help!

    Newbie

    19 Posts

  • #5, by i-c-gMonday, 14. December 2020, 22:21 3 years ago
    It seems I "solved the issue" (worked it around actually) by setting the vertical scroll distance to half the height, as mentioned in may other places. That way the character "drags the view with him" walking until the window can't scroll anymore.

    Still it's a bit strange that there is no way to tell Visionaire that the bottom part of the game viewport is not the edge of the resolution, due to the interface being in the way.

    I still think I'm missing something, if not I guess we have a good candidate for a feature request smile

    Newbie

    19 Posts

  • #6, by afrlmeMonday, 14. December 2020, 23:13 3 years ago
    Technically you can specify the scroll boundaries with script & prevent the engine from scrolling past the area you specify.

    Scenes["example"].ScrollableArea = {0, 0, 1920, 980} -- x, y, width, height


    x, y would be the top-left position of the rectangle area you want to specify.

    Imperator

    7278 Posts