Forums

OverviewV-Play 1 Support › ParallaxScrollingBackground not visible in every resolution

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5734

    GP

    Hi,

    I’m using ParallaxScrollingBackground for animated clouds in the background but apparently it’s not working in every resolution. I can’t see the clouds in the following resolutions: 320×480, 360×640, 480×854, 480×800

    In every other resolution it works perfectly fine.

    Here is my code:

        ParallaxScrollingBackground {
            movementVelocity: Qt.point(20,0)
            ratio: Qt.point(1.0,0.1)
            sourceImage: "../img/game/backgrounds/clouds-sd.png"
        }

    Cheers,

    Gregor

    #5735

    Alex
    V-Play Team
    #5736

    GP

    Hi Alex,

    the size of the scene is 320×480 and the size of the game window is 640×960.

     

    Cheers,

    Gregor

    #5737

    Alex
    V-Play Team

    And with a setup like this, there are no clouds?

    GameWindow {
      width: 320
      height: 480
      Scene {
        width: 320
        height: 480
        ParallaxScrollingBackground {
          movementVelocity: Qt.point(20,0)
          ratio: Qt.point(1.0,0.1)
          sourceImage: "../img/game/backgrounds/clouds-sd.png"
        }
      }
    }

     

    #5738

    GP

    With a setup like you mentioned above the clouds appear in low resolutions but are not visible in high resolutions. (problem inverted)

    I’ve also tried the solution from the other thread by adding a -sd2 image (half of the resolution from sd) and overwriting the contentScalingFileSuffixes like this:

    contentScalingFileSuffixes: {
            return  {
                "-sd2": { "scaleThreshold": 0.5, "internalContentScaleFactor": 0.5 },
                "-sd": { "scaleThreshold": 1, "internalContentScaleFactor": 1 },
                "-hd": { "scaleThreshold": 2, "internalContentScaleFactor": 2 },
                "-hd2": { "scaleThreshold": 2.5, "internalContentScaleFactor": 4}
            };
        }

    But this also did not solve the problem.

     

    Cheers

    #5739

    Alex
    V-Play Team

    Are you trying to change the resolutions at runtime? Try changing the width and height of your GameWindow directly in the code to e.g. 768 * 1024 and check if it’s visible there.

    Cheers,
    Alex

    #5741

    GP

    Hi Alex,

    I tried to change the resolution of the GameWindow directly in code but this also did not work for me. The strange thing is when I set the QMLRenderer to true I can see the clouds in every resolution like I expect it but only in the “debug window”.

     

    Cheers

     

    #5742

    Alex
    V-Play Team

    Can you send me your whole code or an example in which you experience the error to support@v-play.net? I am not able to recreate that specific problem.

    Cheers,
    Alex

Viewing 8 posts - 1 through 8 (of 8 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support