Forums

OverviewV-Play 1 Support › Daily builds 1.3.7 bugs

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5305

    Heini

    Hi,

    after rebuilding my game with the new daily builds 1.3.7, it does not work properly any more.

    There are some bugs:

     

    It seems, that the Image::sourceSize property does not work any more, so that images with their height or width calculated in relation and with bindings to the sourceSize are not displayed correctly.
    On Windows (7 – 64 bit) there are also problems with the sound now. So after starting the game, some of the sounds loaded by the first scene are been played immediately after gamestart, without calling their play()-method. In my case the welcome sound gets played as always, but followed by the bye-sound, that should only be played after pressing the exit button and followed by another welcome(?).

    Greetings

    Heini

    #5309

    Christian
    V-Play Team

    Hi Heini,

    the sourceSize issue has something to do with the optimization we performed, that the image is not held twice in memory any more, which speeds up loading times and requires less memory. In which way do you use the sourceSize property?

    Could you also send us a sample code how you start your game that shows the faulty sound behavior please?

    Cheers, Chris

    #5318

    Heini

    Hi,

    1) i use the sourceSize property to determine the height or widht of an image, in relation to its real dimensions. A typical usecase is this:

    height: 60
    width: (sourceSize.width * height) / sourceSize.height

    I like to work this way, because it is much more exactly then setting the scale-property and its not necessary to have in mind the real dimensions of the image.

    2)Here is some of the relevant code of the first loaded scene, nothing special:

     

    Scene{
        id: menu
            Image{
                id: background
                source: "Mainmenu/mainback-hd.png"
                width: gameWindowAnchorItem.width
                height: gameWindowAnchorItem.height
                x: gameWindowAnchorItem.x
                y: gameWindowAnchorItem.y
    
            }
    
            Image{
                id: enableSound
                source: window.settings.soundEnabled ? "Mainmenu/ton_an.png" : "Mainmenu/ton_aus.png"
                width: 50
                height: 50
                anchors.left: gameWindowAnchorItem.left
                anchors.bottom: gameWindowAnchorItem.bottom
                anchors.leftMargin: 10
                anchors.bottomMargin: 10
    
                MouseArea{
                    anchors.fill: parent
    
                    onClicked: {
                        window.soundEnabled = !window.soundEnabled;
                        window.settings.soundEnabled = window.soundEnabled;
                    }
                }
            }
    
    
            Sound{
                id: soundexit1
                source: "Mainmenu/exit.mp3"
            }
    
    
            Sound{
                id: soundwelcome
                source :"Mainmenu/welcome.mp3"
            }
    
    
            Timer{
                id: soundTimer
                interval: 1000
                repeat: false
                running: false
    
                onTriggered: {
                    if (window.isApplicationStarting) soundwelcome.play();
                    showSchildTimer.start(); //Timer, that starts a numberanimation for the menuitems
                }
            }
    
    
            Component.onCompleted: {
                soundTimer.start()
            }
    }
    

    Thanks,

    Heini

    #5319

    Christian
    V-Play Team

    Hi Heini,

    I see! Did you use you could also use the property fillMode from Image and set it to Image.PreserveAspectFit? That would be more efficient and also easier to read as you do not need any calculation at all! However, we’ll add the sourceSize property with the next daily build update, but in the meantime you could use my suggested approach.

    Cheers, Chris

    #5324

    Heini

    Hi Chris,

    setting the fillrate property did the trick! Didn´t know that property.

    Thanks,

    Heini

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