Forums

OverviewV-Play 1 Support › MultiResolutionImage images not showing on smaller screens

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5671

    Raimonds

    I have a problem that MultiResolutionImage is not visible if screen is smaller than default scene ize eg. small android screen

    GameWindow {
    id: window
    width: 480*0.9    
    height: 320*0.9
    ..

     

    Is there is some other filename suffix for smaller images than sd?

    When i run project with normal window size – on PC runs it’s all right, but when i deploy my game on small Android (Samsung – GT-S5300) no MultiResolutionImage’s visible – only simple Images visible…

     

    From http://v-play.net/doc/vplay-different-screen-sizes.html
    MultiResolutionImage
    The correct file name suffix is automatically added based on the scene scale factor, so either -sd (for resolutions up to 480 pixels), -hd (up to 960px) or -hd2 (above 960px).

    #5686

    Alex
    V-Play Team

    Hi Raimonds,

    the problem is that the default width and height of a scene is 480 x 320. If you make the GameWindow smaller than this, the scale factor of the scene becomes lower than 1. The default scaleThreshold for the -sd file suffix is at least 1 though. Now you have two options:

    1. change the scaleThreshold via changing the contentScalingFileSuffixes property of your GameWindow (http://v-play.net/doc/vplay1-gamewindow.html#contentScalingFileSuffixes-prop)

    2. change the width and height of your Scene to be equal or less than the GameWindow, which of course would effect the logical size of your game field

    Cheers,
    Alex

    #5693

    Raimonds
    #5708

    Raimonds

    Hi,

    overwriting “contentScalingFileSuffixes” solved my problem with small Android screen images – thanks Alex

     

    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}
                       };
           }

    Best Regards

    Raimonds

Viewing 4 posts - 1 through 4 (of 4 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