Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 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
    Felgo 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
    Felgo 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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded