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

Forums

OverviewFelgo 1 Support › Flappy Bird Grafik Bug?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7003

    Alex

    I’ve done everything as it is on the website yet unfortunately I get the problem that is not playing on full screen

    Screen:http://s14.directupload.net/images/140304/cmtkv8u2.png

    main.qml

    import VPlay 1.0
    import QtQuick 1.1
    import "scenes"
    import "common"
    
    GameWindow {
        id: window
          width: 320
          height: 480
      minimizeable: true
      // sceneLoader and managers should be available in every scene
      property alias window: window
      property alias audioManager: audioManager
      property alias entityManager: entityManager
      property alias gameNetwork: vplayGameNetworkScene.gameNetwork
      // for easier reference from GameOverScreen
      property int highscore: gameNetwork.userHighscoreForCurrentActiveLeaderboard
      // this is set to either "", "exitConfirmation" or "visitVPlayWebsite"
      // it is needed to distnguish which button caused the nativeUtils.displayMessageBox() call
      property string messageBoxInputState: ""
      contentScalingFileSuffixes: {
          "-sd": { "scaleThreshold": 1, "internalContentScaleFactor": 1 },
          // the original Flappy Bird graphics are only sd, so we scale them up on higher-res devices
          // for your game, design graphics for the highst resolution
          //"-hd": { "scaleThreshold": 2, "internalContentScaleFactor": 2 },
          //"-hd2": { "scaleThreshold": 2.5, "internalContentScaleFactor": 4}
        }
    
      // global music and sound management
      AudioManager {
        id: audioManager
      }
    
      MenuScene {
        id: menuScene
        onGamePressed: {
          window.state = "game"
        }
        onNetworkPressed: {
          vplayGameNetworkScene.initialStateBeforeShow = "menu"
          window.state = "gameNetwork"
        }
        onBackPressed: {
          messageBoxInputState = "exitConfirmation"
          nativeUtils.displayMessageBox("Really quit the game?", "", 2);
        }
    
        Connections {
          // nativeUtils should only be connected, when this is the active scene
          target: activeScene === gameScene ? nativeUtils : null
          onMessageBoxFinished: {
            if(accepted) {
              if(messageBoxInputState === "exitConfirmation") {
                Qt.quit()
              } else if(messageBoxInputState === "visitVPlayWebsite") {
                nativeUtils.openUrl("http://felgo.com/2014/02/how-to-make-a-flappy-bird-game/?utm_medium=game&utm_source=flappybird&utm_campaign=flappybird");
              }
            }
            messageBoxInputState = ""
          }
        }
      }
    
      GameScene {
        id: gameScene
        onMenuPressed: {
          window.state = "menu"
        }
        onNetworkPressed: {
          vplayGameNetworkScene.initialStateBeforeShow = "game"
          window.state = "gameNetwork"
        }
      }
    
      VPlayGameNetworkScene {
        id: vplayGameNetworkScene
        onBackPressed: {
          // go back to the state from where it was called
          window.state = vplayGameNetworkScene.initialStateBeforeShow
        }
      }
      EntityManager {
        id: entityManager
        // entities shall only be created in the gameScene
        entityContainer: gameScene.entityContainer
      }
      state: "menu"
      activeScene: menuScene
      states: [
        State {
          name: "menu"
          PropertyChanges {target: menuScene; opacity: 1}
          PropertyChanges {target: window; activeScene: menuScene}
          StateChangeScript {
            script: {
              audioManager.play(audioManager.idSWOOSHING)
            }
          }
        },
        State {
          name: "gameNetwork"
          PropertyChanges {target: vplayGameNetworkScene; opacity: 1}
          PropertyChanges {target: window; activeScene: vplayGameNetworkScene}
        },
        State {
          name: "game"
          PropertyChanges {target: gameScene; opacity: 1}
          PropertyChanges {target: window; activeScene: gameScene}
          StateChangeScript {
            script: {
              gameScene.enterScene()
              audioManager.play(audioManager.idSWOOSHING)
            }
          }
        }
      ]
    }

     

    #7004

    Alex

    On my Pc work the game perfect but at the Mobile Phone i have a problem with grafik.

    #7013

    Alex
    Felgo Team

    Hi,

    could you please describe your problem more detailed, are you speaking about the issue that your game is running in landscape mode on your Android phone?

    Thanks,

    Alex

    #7023

    Alex

    Yeah,how can I make the game fullscreen?On my Pc is the game full screen and works perfekt but at my android  phone is isnt fullscreen and is in landscape mode.

    Android Screen:http://s14.directupload.net/images/140304/cmtkv8u2.png

    • This reply was modified 10 years, 1 month ago by  Yolopan.
    • This reply was modified 10 years, 1 month ago by  Yolopan.
    #7068

    Alex
    Felgo Team

    You can define the orientation for your mobile builds in your project’s config.json, please follow the link to see how to set the orientation to portrait (and therefore to fullscreen): http://felgo.com/doc/vplay-deployment/#config-json

    Is this the setting you’re looking for?

    Best,

    Alex

    #7083

    Alex

    worked,thx for the help ;D can i change the  icon for android ?or is that just for paying member

    #7105

    David

    Hi Yolopan,

    just add your icon in the qml directory as app_icon.png which gets converted automatically by the buildserver. See the documentation.

     

    Cheers,

    David

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