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

Flappy Bird Game

 import Felgo 4.0
 import QtQuick 2.0
 import "scenes"
 import "common"

 GameWindow {
   id: window
   screenWidth: 640
   screenHeight: 960

   // You get free licenseKeys from https://felgo.com/licenseKey
   // With a licenseKey you can:
   //  * Publish your games & apps for the app stores
   //  * Remove the Felgo Splash Screen or set a custom one (available with the Pro Licenses)
   //  * Add plugins to monetize, analyze & improve your apps (available with the Pro Licenses)
   //licenseKey: "<generate one from https://felgo.com/licenseKey>"

   property alias window: window
   activeScene: splash

   // show the splash and start the loading process as soon as the GameWindow is ready
   Component.onCompleted: {
     splash.opacity = 1
     mainItemDelay.start()
   }

   // since the splash has a fade in animation, we delay the loading of the game until the splash is fully displayed for sure
   Timer {
     id: mainItemDelay
     interval: 500
     onTriggered: {
       mainItemLoader.source = "MainItem.qml"
     }
   }

   // as soon as we set the source property, the loader will load the game
   Loader {
     id: mainItemLoader
     onLoaded: {
       if(item) {
         hideSplashDelay.start()
       }
     }
   }

   // give the game a little time to fully display before hiding the splash, just to be sure it looks smooth also on low-end devices
   Timer {
     id: hideSplashDelay
     interval: 200
     onTriggered: {
       splash.opacity = 0
     }
   }

   SplashScene {
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded