How's it going so far, how's your game coming along?
I made a quick adjustment to the player speed to bring it back to two.
So it's not moving around as quickly because this is a dynamic value that's going to be constantly moving.
And in order to introduce gravity, gravity, it's going to be very, very simple.
So we're taking the value of player Y and before we're out putting it on the screen, we're going to
just simply add in a value and we want to add the gravity to be whatever the player speed times to.
Or we could set an actual value here for gravity.
But for now, we'll use the player speed.
So what's going to happen here is before we hit the setting, it's going to drop the player down.
So unless they're actually clicking, it's not going to fly them up.
And that means that we also need to increase that a little bit quicker, because what's happening here
is we're dropping it down and we're running way, way down there.
So we want to make sure that the player has an opportunity to decrease their position for their y value.
So taking that player speed and let's multiply it, we can multiply it by a factor of five.
And then there's also that option to make it dynamic.
So doing a factor of five is going to give the player the ability to touch it a few times and it's going
to move up faster than it's moving down.
But we still have that downward lag on the character.
So let's also introduce scoring.
So that was really easy to add in.
And we also want to add in the scoring.
So updating our player score so the longer the player is able to play the game, the better they're
going to score.
So over here, we're we're seeing some of the player values and that should be player.
So started out at zero, and then we're going to increment the player score and we should also output
the score.
So using that score object, updating our entire text of it, we're going to output the value to the
player.
So taking score and our player score, object and output that to the player.
So now the longer they're staying alive, the higher the score is going to go.
And there's also one other thing that we need to do, and that's going to be that we need to have a
way to lose.
So having this constant decrease and constant lag down, we can take the value of bird and check its
offset position.
And if the offset top position is greater than game area offset height, then what's going to happen
here is that the game's over.
So we can say in the console we can output the game over and we can introduce our game over functionality.
So that can be another function that we can set up at a later time.
So for now, add in the score, add in the automatic gravity, adjust your player up arrow speed so
that they can move up faster than it drags them down.
And you're ready to move on to the next part of the game where we can have the play over area and we
can also have the restarting of the game and have all of the conditions and functions working.
And then we're going to introduce the obstacles.
So that's still all yet to come.