Forums

OverviewV-Play 1 Support › Flappy Bird Ground removal wont trigger a game over!

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

    John

    Hi all….Im trying to remove the ground from flappy bird and just make the player fall off the screen to initiate a game over but im having troubles.

     

    under game/level.qml im removing

     

    Ground {
    id: ground
    anchors.horizontalCenter: parent.horizontalCenter
    y: scene.gameWindowAnchorItem.y+scene.gameWindowAnchorItem.height-height
    }

     

    and that makes him fall off the screen which is what I want but it does not trigger a game over…any ideas how I can trigger a game over as soon as the player goes off the screen. thanks a lot guys

    #7160

    David

    Hi armotechsolutions,

    the BoxCollider in the BorderElement trigger the death of the bird. When you remove the Ground object in Level.qml you need to replace the y position of the second BorderElement, which is now linked to the Ground object. You can move it to the ground.

    y: scene.gameWindowAnchorItem.y+scene.gameWindowAnchorItem.height

     

    For debugging purpose you can use a simple Rectangle as child of the BoxCollider in the BorderElement to make it visible.

    Rectangle {
      anchors.fill: parent
      opacity: 0.5
    }

    Cheers,

    David

    #7165

    John

    thanks for the help, it works great…the play just hits the bottom of the screen and dies but I wanted it to seem that he fell through so I set player.opacity = 0 when he touches the border and sets it back to 1 when reset occurs…works like a charm. thanks for the help

    #7167

    Alex
    V-Play Team

    Hi,

    you could also move the ground even further down, so the bird hits it when it is already off screen, then you don’t need this opacity trick.

    Cheers,
    Alex

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