Let's Create Flappy Bird (Complete Godot Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome in this tutorial series we will make a flappy bird game using the godot game engine if all goes well we will have a game like this at the end [Music] i expect you to have some programming experience and also you should know the basics of godot in order to follow along with this tutorials let's go ahead and start creating flappy bird welcome in this first part of the flappy bird series we'll do some setting up first we need to import our assets next we'll do some configuration in the project settings and finally we'll create our main game scene which we will call world i'll see you in there i've created an empty project and first let's import our assets i've included a link in the description which you can use to download them and once you do you'll have a zip folder inside your downloads so just right click and extract once you do that you can just drag and drop them inside godot but first let's go back to godot and take a look at our import settings because if you don't change your import settings and you just import them like that they're going to be imported as regular 2d textures but our textures are pixel art so we need to specify to godot that we're using pixel art to demonstrate this you can click on the icon.png which you have inside your file system drag it inside the scene and if you zoom in you can see that it's a bit blurry it's not the pixels aren't very clear let's click on icon.png make sure it's selected go to the import tab which is next to the scene tab and change the preset to 2d pixel and click on re-import as you can see now the pixels are much more clear this is what we need to use to import our assets so let's go to preset again and set this as default for texture so that godot uses this preset for every texture it imports now we can go back to downloads and drop our assets inside our project inside our assets folder we have textures that we need we have a font that we're going to use to count our score and finally we have some audio effects that we need okay next we need to go to the project settings to do some configuration here i'll go to window which is under display here and i'm gonna set my display size to 480 by 854 which is a good size for mobile games and i'll scroll a bit down and set my orientation to portrait instead of landscape this will ensure that our game is displayed in the portrait mode when we export to a mobile device which is important for our game because we're gonna be developing it for a portrait display next i'll set my stretch mode to 2d and my aspect to keep and this will ensure that my aspect ratio remains the same even if i resize my screen and even if i run my game on a device that has a different aspect ratio a different size and next i'll go to quality which is under rendering and i'll turn on use pixel snap which is a useful feature if you're making a pixel art game and finally here we want to go to pointing which is under input devices and turn on emulate touch from mouse okay we're done here so let's close and let's actually go to the scene tab and let's delete this icon that we used for demonstration purposes and let's scroll back up and as you can see the blue line which represents our camera changed because we changed our display size finally let's create our main game scene to do that let's go to the scene tab and let's click on 2d scene here which will create a basic node 2d which we will rename to world let's hit ctrl c s to save this and i'll just save it inside the res folder and let's add a sprite node to display our background i'll rename this to background and go to my assets textures find the background drag it inside the texture field under my sprite by default it's centered the offset is in the center but let's change that go to offset just unclick centered and it will the offset will start from the top left and it fits perfectly you can zoom in and first turn on pixel snap then try resizing it and as you can see the blue lines are just on top of our image which means that it's perfectly fitting our display size let's save again and we're done for this tutorial okay that was some setting up to do i know it's not very fun but it's necessary in order to start making our game and these settings will be different depending on the type of game you're trying to build and that will come with experience and by making different kinds of games for example if we weren't making a pixel art game some of the settings that we used would be different and things like that so yeah congratulations on starting this series in the next section we'll start building our player character i'll see you in the next one bye [Music] welcome in this tutorial we'll start creating our player character this will be done in two parts in this first part we'll create the player scene and in the next one we'll create a script and start implementing the functionality without further ado let's get into it okay we're back first i'll create a new folder to store my player scene i'm going to create a folder called characters and inside characters i'll create one more folder called player and in this game we'll only gonna have one one character but for some reason if you decide to add more characters you can add them under this folder next i'll create a new scene and this scene will have a rigidbody2d as its root node we'll call it player let's add a sprite and a collision shape 2d i'm going to drag my texture into the sprite and as you can see my texture is actually a sprite sheet which has all the animation frames that we need inside of it for that reason i'm gonna go under the animation and set my horizontal frames to three next i'm going to create a shape for my collision shape and i'm just going to use a regular old circle shape here about up to here next i'm gonna add an animation player and we're only gonna need two animations for our player we're gonna create an idle animation and that's gonna be played before we start flapping and we're also gonna have a flap animation which we're gonna play once we start flapping i'll create the first animation call it idle this is gonna be autoplayed and it will also loop so for idle i'm gonna animate the position of the sprite to give like a flying effect to the bird and to do that let's go to the sprite nodes transform property and let's set the y value to negative five and we'll key this and let's click on 0.5 on the animation timeline and let's set the position y value to 5 and let's also key this if you start the animation you can see that it's going up and down but it looks a bit rigid we want we want it to look more fluid and smooth so let's set the interpolation mode to cubic and as you can see it's much more fluid it looks better now let's start creating the flap animation for flap we're just gonna animate the frame property of our sprite so i'm gonna create a new keyframe and i'm gonna key the next two frames as well and oops this has to start from point one point two okay and this is gonna this is actually gonna take only point three seconds and this will also loop if we start the animation you can see that our bird is flapping but as you can see the position of the sprite is messed up because of the idle animation that we just made idle changes the position of the sprite but let's say we stopped the animation here clearly the sprite is in the wrong position but nothing is actually fixing this once we switch to flap flap isn't correcting the position of the sprite that's why at the beginning of flap we need to set the position back to zero zero so i'll just reset the position and create a keyframe here and now if we switch to idle play stop the sprite is in the wrong position and if you go back to flap boom it's back in zero zero which is what we want finally let's save our scene which i sometimes forget under characters player save done and this tutorial is also done we created our player scene we added the nodes that we need and in the next tutorial we'll start writing some code and implement the functionality of our player i'll see you in the next one [Music] hey welcome back in this tutorial we're continuing off where we left off last time we will start by adding the player to the world scene then we'll create a script and make our bird start flapping so that it can be an actual flappy bird like this i'll see you in there okay this is where we were last time and first i'm gonna go back to the world scene and instance my player so that i can see it in the game i'm gonna place it right in the middle and my display height is 854 so i can just divide it by two here inside the editor and that should give me the exact middle of the screen and i'm just going to move it towards the right a little bit and about here is fine let's say 115 and now if we run the game first you you probably have to select the main scene i already did but you're probably gonna have to select world as your main scene so do that and let's run this again so that's we can see that the bird is actually falling down and that's because the rigid body has a gravity scale and the gravity scale defines how strong the gravity is affecting the rigid body and in this case it's just one so let's go back to the player scene and set this to zero for now we'll change it in a bit and now if you run the scene run the world scene you'll see that the player is just standing in the air and the idle animation is being played now let's create a script and attach it to the player this is going to be an empty script and we'll just say create before we start writing any code let's define an action inside the input map that we'll use when the player wants to flap and will detect the left mouse button for this action i'm gonna check inside my physics physics process if this input action is being pressed or not and we'll use just pressed instead of pressed and let's define a start method that we'll use when the player flaps for the first time because right now our gravity is zero and we want to set the gravity to something else to a positive value once we start flapping let's also define a started boolean that we'll use to check if the game has started or not and inside start if we started just return because we don't have to do anything we can't start twice and if we didn't start yet let's set started to true and let's set the gravity scale to five let's get a reference to our animation player first and let's play the flap animation because remember we're playing idol when the game first begins we don't want to play idle once we start flapping oops i said animator not flap that's funny i made her not play flap i've set this gravity scale to five because gravity scale of one is just too weak and it takes a while for the player to fall down actually so five is better in this case and we only want to call start if the game hasn't started yet now let's define our flap method which we'll use to make the player move up let's think for a second what do we want to happen once the player flaps we want the player to move vertically up and at the same time we want the player to rotate counterclockwise because we want the player to look up when we flap and likewise we want the player to start rotating clockwise once we stop flapping because we want the player to look down once it starts falling and the gravity will take care of falling apart for us okay great so let's define a flat force variable and i'll define this as export so that we can change it from the editor and we'll set this to 200 actually negative 200 has to be negative because we're moving up and inside flap we can use the linear velocity property of the rigid body and we'll set the linear velocity.y to flat force we don't need to change the horizontal velocity because our bird isn't actually going to move and instead we're going to make the the obstacles the pipes move towards the player now let's run the game and see what it looks like i haven't flapped yet so i'm inside the idle animation and the gravity is zero and if i start flapping as you can see the gravity is set to five so the bird starts falling and it's we set it to five because one was too slow but as you can see five is it's decent and every time i click we're running the flap method and we're setting the linear velocity to the flat force variable we defined awesome now the only only thing we need to do is rotate the player so that it looks like it's flapping up and once it's falling it looks like it's falling straight down we can achieve this by using the angular velocity property of the rigid body now to demonstrate this let's set the gravity to zero even if we flap let's actually comment this line out and inside the flat method let's set the angular velocity to something like 8 and now if i flap i'm not going to i'm actually going to move up because i still have the linear velocity set so i'm also going to comment this out and now once i flap my angular velocity will change my rotation each time i flap the angular velocity is changing the rotation using the amount i set it to but as you can see positive values are actually spinning us in the clockwise direction so let's let's set this to negative eight instead of positive and let's let's run it again and let's also actually print our rotation so that we can better understand this oops if i can type let's also print r ah that's fine as you can see at the beginning our rotation is zero but if i click it it changes and it settles down at negative 85. so we don't want our player to keep spinning like this because it's gonna look very funny so let's set a limit to how much the player can spin let's define a constant up here and i'll call this max rotation degrees and we'll set this to negative 30. has to be negative because we want the player to rotate counter clockwise okay now after we call flap let's just check if our rotation degrees which is the rotation our rigid body has if it's less than or equal to max rotation degrees we'll say we'll set the angular velocity to zero because we don't want to rotate anymore and we'll set the rotation degrees to max rotation degrees oops i didn't use an assignment operator there okay let's run the game and see if it works or not and as you can see let's also comment these out so that our gravity works again and the linear force is applied so now as you can see the player can't rotate more than our max rotation degrees let's delete this line clear the output and the last thing we need to do is when the player is falling down it needs to start rotating and look downwards basically and to achieve that we can use the rotation degrees again and we can check our linear velocity and if our linear velocity is greater than zero that means we're falling and if we're falling we'll check if our rotation is greater than 90 and if it is we'll stop rotating because that's the limit we want if linear velocity dot y is greater than zero and if rotation degrees is less than or equal to if it's less than or equal to 90 that means we haven't reached the limit yet so we'll keep rotating so we'll set our angular velocity to three and if we reached 90 or we're over 90 we want to stop so we'll say else angular velocity is zero so now if you run the game and flap a couple of times and as you can see the player falls down head first and it doesn't rotate anymore than that and you can actually comment these lines to see what it looks like if you don't have that and and as you can see it keeps rotating and it doesn't stop okay i'm gonna go back to my world scene to take a look take a good look and in this tutorial we added a script to our player and made it so that the player changes animations once we start flapping and the player can move up once we click the mouse button and rotate accordingly so this is it for this tutorial and i'll see you in the next one welcome in this tutorial we will create the ground scene for our game it's very simple we're only going to create a static body with a sprite and a collision shape and at the end i'll also show you how you can create a scrolling effect like this using a sprite and an animation player let's get started let's create a new scene this is going to be a static body oops not a 3d static body it's going to be a 2d static body let's change that to static body 2d and i'm going to call this ground let's save this and i'm going to create a new folder called environment and this folder is going to have our ground and stuff like pipes and any other scene that we create that's related to the environment save it place it here okay now i'm gonna add a sprite and a collision shape and for the sprite let's drag the ground texture ground.png we don't want it to be centered the the offset to be centered so let's uncheck that and let's create a collision shape and we'll just use our rectangle shape let's resize it this is gonna be a bit tricky make sure you get it right and oops it's a little too big okay perfect it's okay if the collision shape doesn't cover what's outside the display size we're never gonna be able to go there anyway in fact we're never gonna like there will never be a collision from under the shape anyway so like we could just make it just a pixel uh tall but this looks better in my opinion doesn't really matter now before we animate the the ground let's go back to our roll scene and let's instance the ground i'm gonna quickly turn off the collision shape so that it looks a bit more normal and save it let's move it down to where it belongs i'm holding shift as i drag so that it moves directly down and it doesn't move left or right it's a handy little trick and let's place it here okay so now if we play the game it looks fine but it looks like looks very static and it's not moving we want it to be scrolling so let's go back and let's add an animation player so what we're going to do to make it so that it looks like scrolling is we're going to animate the position of the sprite so we'll take the sprite and we'll key the initial position then we'll scroll it to the left like this and then when the animation ends it'll snap back here and it will keep doing this but there's a problem as you can see once we scroll there's a gap here inside the display now and if you go back to world you can see that the background is showing up we don't want that we want the sprite to be wide enough so that even if we scroll it covers the whole display oops let's put this back to zero zero and what we want to do is we want to scale the texture so that it's wide enough we could also go inside photoshop and copy and paste this and make this twice as long and that would also work fine but in this case i'm just gonna scale it on the x-axis by 1.5 and now it is wide enough that we can animate it let's create a new animation call it scroll this is gonna auto play and loop and it's gonna be a second long so first let's key the initial position and at the end we want it to be the trick here is okay first let me show you what happens if i just randomly scroll it i'm just gonna scroll it about this much and key this and play and here you can't really understand it so let's go back to the world scene and let's play it's not a very smooth scrolling effect because once the animation is over and when it starts over it goes back to here again and the pattern isn't the same anymore so we can track any one of these stripes to get a better understanding of this so at the start the first strike stripe or part of the first stripe looks like this but at the end looks like this it's not the same we want this to be the same so that when it snaps back to here like this when it snaps back it should be the same so that it looks like it's seamlessly transitioning so let's delete this keyframe and let's do this again so i'm gonna take a good look at this sprite stripe excuse me and it looks like there is one pixel gap here and [Music] let's keep that in mind and let's start scrolling the sprite but make sure that you're not scrolling so much that it that ends and you can see the background so let's okay i think this looks good so let's check let's go to the beginning and it looks like this and at the end oops i forgot to key make sure you key before you start experimenting so okay let's do that much oops too much okay now let's key this and let's get closer and boom yep looks the same so now if i scroll you can also test it in here if you get close enough yeah it looks good looks like it's if i were to see this and i didn't know that this was being animated i i might think that it's actually infinitely there's like an infant track let's go back to the world scene and see how it looks nice so let's also try so let's also try to see if the collisions are working and perfect it's working okay cool in this tutorial we made the ground scene we animated it so that it looks like it's scrolling and we made it so that our animation looks smooth thank you for watching and i will see you in the next one [Music] bye [Music] hi everyone in this tutorial we'll start working on the obstacle scene this is going to be a short one we're only going to create the pipe scene and in the next one we'll start working on the pipe spawner scene our game is starting to look like an actual game i'm very excited and let's get started let's go ahead and start by creating a new scene this one's gonna be an area 2d and the reason we use an area 2d instead of like a rigid body or like a kinematic body is we only want to detect when the player touches a pipe but we don't necessarily want to calculate any collisions between those objects because in the original game once you touch a pipe the player just falls down falls straight down and there's no collisions you just fall straight through the pipe and that's why we're using an area 2d i'm gonna call this pipe i originally called this pipe but if you're planning to make changes to the game and by changes i'm talking about maybe using different textures and maybe adding other stuff and making it different from the original game you might want to call this something else because if for example you change the pipe texture to a tower for example i don't know it's not gonna look good if it says pipe in the class and that's why i decided to go with a more generic name and i'm gonna call it wall you can call it whatever you want as long as it describes what what it does and it's basically a wall it's a moving wall but i'm just gonna call it wall this is gonna have a sprite and a collision shape for the sprites let's use our pipe texture and i'm i'm gonna move it down just a little bit and this is gonna make it easier later on when we're doing some calculations to randomly generate these it's i guess it's gonna make it easier i just i just feel like it makes it easier for me so yeah and i'm gonna add a rectangle shape that covers about this much it's not going to be perfect and we're not trying to be perfect and like include this one pixel section as well you could by using a polygon instead of a collision shape 2d and you could use uh i think it's called the collision polygon 2d yeah or you could use two collision shapes but it's not that important it's not really going to make a difference okay that looks fine let's save this under environments and everything is looking good okay i told you that this was going to be a short one in the next one we'll start using this scene and generating some obstacles for our player to flap through i guess okay i'll see in the next one bye hello welcome back in this tutorial we'll create the pipe scene we're going to be calling this one obstacle instead of pipes because like i said we want to be more generic just in case you wanna decide to change some textures this scene is gonna be used by the spawner scene and in here we're gonna have two pipes and an area 2d in the middle that detects when the player passes through let's jump in and get started okay let's create a new scene this is going to be a note 2d and i'm gonna call this obstacle let's save this under environment and let's move this to the middle of the screen which in this case is 427 we need to add two pipes or walls to the scene i'm going to duplicate this one by hitting ctrl d it's command d i believe on a mac if you're using a mac and i'm gonna rotate the one that i duplicated by 180 degrees we need to separate these because we don't want these to be touching each other otherwise we're not going to be able to pass through so i'm gonna move the one in the bottom by 75 pixels down and the one on the top by negative 75 pixels and that's going to make it move up by 75 pixels this number that you use to separate these is gonna make the game easier or more difficult depending on how much you make them separated and how much you make them close so if it's too separated oops i pressed f5 by mistake so if you make it too close obviously it's going to be very difficult but if you make it too separated it's going to be very easy so i experimented a bit and i think 75 is a good value to use in this case but you're free to use whatever value you want to use okay we also need an area 2d that we'll call score area and this is gonna detect when the player passes through an obstacle so let's add a collision shape 2d this is going to be a rectangle shape and it's going to look something like this now we also need a script on this on the obstacle class because we want the obstacle to move towards the left and we also want to connect some signals from our walls and our score area and we also want to emit some signals when the player scores but before we write some code let's go back to the world scene and let's actually instance an obstacle scene just to see how it looks it's good practice to test and see how the scenes you're building looks like in the game okay so i'm gonna run the game and yeah i think this looks like a reasonable distance between the pipes and the pipes are also nuts ending before the screen so that's also good because if you move them to much here like this for example they're obviously gonna show up like this and we don't want that we want them we want them to have enough texture that they don't show up just like our ground texture okay this looks good i'm gonna delete this and let's actually keep it there for now i'm gonna move this behind the ground so that it looks better and let's go back inside here and take a look at our script let's start by making the obstacle move and we're gonna do that inside the physics process method let's define a speed constant and this speed is going to be very important because we want the pipes to move in harmony with the ground animation because if the animation is too fast it's gonna look like the pipes are sliding and vice versa if the pipes are moving too fast it's going to look like the ground is sliding so it's not going to look good so let's start by giving 200 for the speed and see how it looks like i'm just gonna get the position.x value add the speed and it's going to be negative speed because we want to move towards the left i'm going to multiply this by delta so that it remains the same speed even at different frame rates and let's say if our global position x is less than 200 which means that we've left this the scene so if we go back to world this y-axis is zero excuse me it's zero zero here x and y and if if we go past this that means we're going in the negatives and if our x value is negative 200 it means that we've exited the screen and we've actually made some covered some distance so if that's the case let's delete our pipe and let's also print a message and let's say bye this should make the obstacle move and this should also delete it once it exits the screen let's run this and see how it looks like and you can see that it's moved and left the screen and once it did that after a certain a small amount of time it it ran the q3 method ends printed by and you can test this by going inside remote here remote will show you what's inside your current build of the game locals show you what's in your scene remote will show you what's inside the game that's being played inside the window so here inside remote we don't have any obstacles seen because that scene got deleted but inside local we have it because this is what's inside here okay so let's actually not free the pipe but rather reposition it to uh 500 so that it keeps coming back and that way we can more easily test how it looks like compared to the ground so it looks good it doesn't look like it's sliding off the ground just to show you i'm going to set this to 100 set the speed to 100 and as you can see the pipes are too slow compared to what the ground seems like moving so it looks like the ground is sliding under the pipe the the obstacle so i'm gonna set this back to 200 and actually set this to 215 which i found to be like the sweet spot if you run this again you can see that it looks smooth and it looks like they're moving at the same speed awesome that's the movement part now we need to connect some signals from our walls if we go back to the player scene we can see that our player is a rigid body and our wall is an area 2d and area 2ds have signals that detect areas and bodies entering and exiting its the perimeters that we define for them because our player is a body we're gonna connect the body entered my signal of the walls and because both walls just kill the player we want to connect them to the same function there's no point creating different functions to do the same thing so i'm going to connect wall 2 to the same function as well change this to wall so that's the same and in here first we want to make sure that the body that entered this area is the player and to do that we can do something like if body is player but this isn't going to work yet because we need to go back to the player script and add this line under the first line last name player and that way this check works and inside here we want to check if the body has a method called die which they did we didn't define yet inside the player but but it's fine and if it has we want to call it so this will make sure when the player enters the wall the wall is going to check if the thing that entered is the player and if it has a die method and if it does it's going to call that method so let's actually print here to check that if we're successfully detecting the player i'm gonna play the wall is gonna move and we're detecting when the player enters the wall because we're printing the message inside our output okay nice that's it for the walls and finally let's also check when the player not enters but exits the score area let's actually make it a little bit bigger and four walls we want to detect when the player enters because because once it enters a wall we instantly want to kill it but for score area we don't want to check when it enters because that's going to be too instant like the player is going to just hit here this part and he's gonna score we don't want that we want the player to score when it exits here and that's why we're gonna connect the body exited signal and inside here again we want to check if the body is the player and if it is let's emit well first we need to define a signal up here called score and inside here we'll emit this signal okay great let's also print just to test whether it works or not let's say player score okay let's run this and yep if i go up if i don't go through it it's not gonna say players scored but if i go inside it's correctly checking the player great so let's go back we don't want this to set the obstacle back to 500 that was just for testing purposes so i'm just gonna set this back to q3 and let's take a final look at our class and everything looks good you can delete the obstacle from here if you want to because in the next lecture we'll actually create an obstacle spawner class that's gonna continually spawn these obstacles towards the player awesome so i hope this lecture was helpful to you we created our obstacle scene added our balls our pipes whatever added a score area and a script to make the obstacle move and detect the player thank you very much for watching and i will see you in the next one [Music] hey there in this tutorial we will create this spawner scene this scene will instance and randomly place obstacles so that the game looks different every time we spawn an obstacle let's jump in and get started okay we're here where we left off first of all i'm gonna get rid of this print statement we don't need it anymore and let's create a new scene this is gonna be a note 2d and we'll call this one obstacle spawner let's save it under environment this isn't gonna have too many nodes it's only gonna have a timer and we'll set this timer to a second and a half and this timer is gonna define how long is it gonna pass in between each obstacle so in this case a new obstacle will be instance every a second and a half and we'll set this to auto start for now it's not going to be like that in the actual game in our final product but right now it's easier for us to test things if it's if it starts automatically let's add a script this is going to be an empty string create let's get a reference to our timer so that it's easier to reference to it and let's also our obstacle scene that we made in the last lecture i'm gonna connect the timeout signal of the timer to this script and inside here let's first define a method called spawn obstacle and let's call this method from the timer's timeout signal inside this method we wanna instance a new obstacle instance and we want to add it as a child and we also want to randomize its position so that we don't get the same pipe location every time and to do this we want to change the y position of its position and we will use the random rand i method to get a random number we're gonna use the modular operator and say 400 and plus 150 i'm going to explain how this works and what it does in just a second i'm actually doing i'm actually going to do it now but first let's go to up here and create a ready method which we'll use to call the randomize method okay so the randomize method makes sure that we get different random numbers every time we run the game if you don't call this randomized method before you call random i you're always going to get the same random numbers every time you play the game so let me show you this by getting three random numbers before calling randomize and the way random eye works you can actually go inside the documentation by holding the control key and clicking on the method and it will take you to the definition and there's a handy little explanation here as you can see it says returns a random unsigned integer use remainder to obtain a random value in the interval so and here we have the an example so if you just say randomize and call the method it's going to return a crazy integer crazy large we don't want that we want to limit this and the way you do that is with the modulo or the remainder operator so if you say randy remainder 20 it's going to return a number between 0 and 19. so this number is not exclusive inclusive i don't know what's the word but yeah this is how you use it and in here we're gonna use it to get let's say for a number between zero and and let's copy and paste this three times if i run this by pressing f6 to run this scene not the main scene this scene i'm gonna get one two and three so if i run it again it's gonna be the same and if i run again it's gonna be the same if i copy and paste it again one more time it's gonna be one two three zero just and if i run runs again like i said it's gonna be the same because we're not randomizing so it's always giving us the same random numbers they're still random but they're always the same which makes sense but also doesn't make sense at the same time so let's see what happens if we call randomize before calling these randi method let's run it again and as you can see we get a different set of numbers every time we run which is what we want we don't want the game to look the same every time great now that we understand what randomize does let's come back to line 16 and try to understand what this statement is achieving so you're asking for a random number between 0 and 399 and we're adding 150 to that so we're basically getting a random number between 150 and 550 so let's we can add a little comment here that says get a random number between 150 and 550 and the reason we use 150 and 550 is this if i show you this inside the world scene you're gonna get it better instead of me just trying to explain it and do a poor job so let's go back to the world scene and in here let's instance an obstacle so by default it will be on 127 on the y so let's move this to the right a bit and let's start changing its y position so let's reset 150 and 550 right so first let's try 150 and as you can see this will be the maximum amount that our pipes can be can go up so if you go more first of all you start seeing the background here and that's not good and at the same time if you make this two if you move this two up it's gonna make the game that much more difficult and it's got not gonna look that good because the upper pipe is almost invisible so i experimented a bit and 150 seems to be a good value but this is going to be a decision that you need to take for your game and likewise for the bottom one 550 is going to be the maximum position maximum amount that we can move our obstacle downwards great so let's delete this obstacle and go back to our obstacle spawner scene this method is gonna spawn an obstacle and randomly place it on a location that we defined the limits of and the timer is gonna fire off every second and a half the timeout signal and this method will be called we are almost done so let's create a couple of utility functions that we're going to use to call the timer from outside the scene and these functions will start or stop the timer that's it okay everything is looking good so let's get back to our world scene and let's instance the obstacle spawner we want this to be if by default it's on zero zero but if it's here it's gonna start spawning the pipes here and you're never gonna see them so let's move this to the right and i'm just gonna say that it should be at 800. let's run the game and if we did everything right we should get pipe spawning at different locations every second and a half but as you can see we can see the pipes over the ground we don't want that so let's take the obstacle spawner and let's move it behind the ground let's also take the player and move it to the front in godot the things in the scene tree that are downwards like in the bottom will be displayed above other things so we'll display the pipes then the ground and the player great let's not run it and awesome you're getting randomly placed pipes every second and a half great you learned a lot in this tutorial and i hope it was useful thank you very much for watching and i will see you in the next one [Music] hi in this tutorial we will create the hud scene the hud scene will have a label that we will use to display the score and we will update this label every time the player scores let's get into it okay i'm gonna create a new scene and our hud is gonna be a canvas layer and under here well first let's rename it to hud here we need a label that we will rename to score this score label is gonna display what the current score is so for now let's say let's put zero as like a temporary score let's change the layout of this to top wide and let's pull it down just a little bit now we don't want the text to be on to be starting from the top left so let's change the vertical alignment to center and the excuse me alignment to center and the vertical alignment to sender as well so that it sits in the center peacefully okay the next thing we're gonna do is to change the font we don't want to use this ugly default font that godot has so let's create a custom font you can see that there's a custom font property under the control section here if you click that you'll see that we're not currently using a custom font i'm going to click on empty and create create a new dynamic font and i'm going to set the size to 48 and the font data to our fonts that we had inside our assets that looks better but let's add some outline to this so that it looks more like the original font that flappy bird uses to do that let's go to custom colors and check font color shadow and you can see that already we have some drop shadow going on but we want this to be an outline instead of a drop shadow so let's go to custom constants and set the shadow as outline to one and this is gonna turn the drop shadow in into an outline let's make this a bit thicker three on the horizontal entry on the vertical good okay looks better and now oops well let's save the hud might as well under a new folder that we we're going to create called ui and let's also save the font that we just made the font resource the dynamic font that we created into a new folder which i'm going to create now and that's going to be called fonts let's right click on the dynamic font resource and click on save and i'm gonna call this one flappy phone 48 great now let's add our script and inside here let's take a let's get a quick reference to our score label and let's define a method called update score that we will use to update the score label make sure that you transform the new score variable into a string because we're going to be passing an integer to this so we can't you wanna turn it to a string first before we assign it to the text property of the label because it's expecting a string great so we're done here so let's go back to world and instance our hud i'm gonna move it back to the bottom because it's in a canvas layer it doesn't really matter where it is inside the scene tree so that's why i'm going to move it back now we have our hud we have a way to update the hud's score variable score label excuse me and now we need to actually do it and that's why we need to add a script to the world scene and the world scene is gonna hold our game score we'll also add a set get method to this and you'll you'll see in a second why this is useful let's define it real quick okay let's also get a reference to our hud and our obstacle spawner now that we have our reference to our hud let's also update the hud after we update the score variable that we have here great so the useful thing here is the set get method which we called set score will be called every time we set score to a value so every time we set score the hud will also be updated so we don't need to call hot dot update score every time we change the score now let's create a method that we're going to use to update the score when the player actually passes through a pipe and we'll call this player score and we'll set this score we'll increase it by one make sure that you use self.score otherwise the setget method that we defined isn't gonna work this is only the case when you're calling when you're trying to set the score inside the same script if we were to use set the score variable outside the script the setget method would be called but inside you need to say self.score and now the problem is we need to remember the signal that we set inside the obstacle seen the score signal now we need a way to connect this to the player score method that we just created but this method is inside the world script but this signal is inside the obstacles script and we don't have access to the obstacles inside the world scene do you remember what has access to the obstacles yeah the obstacle spawner so we need a way to communicate to the world scene that we want to connect the score signal to a method inside world and that's why we're going to create another signal inside the obstacle spawner called obstacle created and will pass the obstacle to this signal this will be called after we spawn an obstacle and we set its position let's pass in the obstacle and back in world and inside the world as you know we have access to the obstacle spawner because it's inside the scene and now inside the inside the ready method when the game starts we can say that we want to connect this method this signal that's inside the obstacle spawner to a method that we're gonna define inside this script and let's call it on obstacle created and this has the obstacle inside and the only thing we want to do inside here is to connect the score signal of this obstacle to you guess that the player score method that we just defined let's run this real quick and see if it works and if we go through oops something went wrong it operands player score player score oh i think it's because we didn't set the score to anything so let's say that it starts off as zero and let's run it again now when we go through an obstacle you can see that our score is being updated and if you go if we miss it we don't get a score okay great so that works so let's do a small recap because that felt a bit confusing to me so inside the obstacle scene we have a signal called score and the score is being emitted each time the player exits the score area that's inside the obstacle this area right here every time the player exits this the score signal is being emitted and inside the obstacle spawner every time we spawn a new obstacle we have another signal called obstacle created we're emitting this signal and we're passing the obstacle so back in the world scene at the start of our game we're connecting the obstacle created signal to a method called on obstacle created and inside that method we're connecting the score signal of the obstacle to player score so this is all work that we did to basically connect the score their signal of the obstacle to this method right here if you didn't really understand this please don't hesitate to ask a question i'll be happy to help now the final thing i'm gonna do is to create a new game method that we're gonna use to start the game and inside here i will set the score to zero and i will call the start method of the obstacle spawner and we'll call this method after we connect the obstacle spawner signal if you remember inside the obstacle spawner we set the timer to autostart now we want to uncheck this because we're starting it inside the world's world script but this isn't gonna behave differently because we're starting it right away anyway but later on when we create our main menu system this is going to be useful so let's run the game and see if this whole thing works properly now i can go through obstacles and my score is being updated and if i miss well we don't have a game overstate yet and we don't have that die method that we defined that we said we will define inside the player so that's why we're not actually dying but as you can see the hud works and we can score okay great thank you very much for watching this lecture i hope you learned something useful and i will see you in the next one [Music] welcome in this tutorial we will implement the game over functionality we will define a die method inside the player script and we will stop the game once that method is called let's get started okay let's handle the player death functionality but first do you remember the method that we tried to call from the obstacle scene the dye method that we said we were gonna define it later let's take a quick look at that before we get into the player script and you might have noticed that i'm using this quick open scene window to navigate between scenes the way you get the way you open this is by holding down control and shift it's command on a mac and pressing o then you get this window and from here you can see all the scenes in your game and if you have a ton of scenes and you don't want to look through all of them you can just type it out here i'm just going to type obstacle and press enter and here i am okay cool so inside the script here when a body enters any of the two walls we're checking if the body is the player and if the body has a method called die and if it it does we call it so now we will define this method because up until now because we didn't have this method this condition the second one wasn't met the first one was because we are we were in fact colliding with the player but the player never had a die method so this was never true but now we will define the die methods so this condition will be called let's go to the player scene in here let's create a new method called die and in here we want to do a couple of things first let's create a signal that we will call died and let's emit this inside the die method okay the second thing we of course want to stop animating we don't want to keep flapping when we die so let's get the animator and call stop we also don't want the bird to be able to flap anymore so let's create a variable that we will call alive and let's set it to true by default and let's check once the player presses the flap action let's check if are we also alive and if we're not we're not gonna call flap and inside here we'll set alive to false and at the start of this method we'll check if if not alive let's return because there's no point calling a die method if we're not alive to begin with we can also add a little print statement here to test if our die method is working or not but before testing right now the only thing that's calling the players diameter is the walls the pipes as we call them but we also want the ground to call this method when the player collides with it so let's go to the ground scene and in here we want to be able to check if the player enters this body or not and to do that let's add an area 2d which we will call death zone this is going to have a collision shape 2d and for this collision shape i'm going to use the same shape the same shape resource from the collision shape of ground i'm going to right click copy get back to that zone shape collision shape and paste let's quickly position this okay but be careful because once you copy a resource that resource is being shared among the two collision shapes so if you resize one the other will also get affected if you don't want that you can right click and click on make unique on either of them to make them independent of each other i'm not going to do that because they're going to be the same size anyway so there's no point but just to demonstrate like you can see that once i start resizing one the other is also being resized okay great now we need to hook the body entered signal of the death zone to a script and inside there we will call the dye method of the player but the problem is we don't have a script on ground that we can use and we could add a script to ground or we could also add a script to the death zone which is also a good idea but i'm just gonna go back to the world scene and in here i'm gonna turn on editable children on the ground and i'm gonna hook the body enters signal to the world script great and in here we'll do the same checks that we did inside the obstacle if body is player and if body dot has method die we'll call body dot die great now we're correctly calling die both from the ground and the the obstacle let's run the game and if i just fall oops okay i made a small typo there you probably noticed it before me let's add a t there and let's run this again if i just fall i died i can't even if i click i can't flap anymore and our print statement also worked which is good so let's get back here let's delete let's also check one more time to see if the dye method is also working with the pipes yep works great so we set alive to false and that's why we couldn't flap anymore because we're doing a check before after we get input our animator also stopped and we emitted this signal here which we will use later on let's get rid of the print statement here and let's go back inside the world script here after the player dies we want the game to stop to do that let's connect the dyed signal that we're emitting from the player to the world script and in here we wanna well we wanna first we're gonna do a couple of things here but first let's actually create a method called game over just for simplicity's sake and just so that it's easier to read let's create a gameover method and in here we'll first stop the obstacle spawner then we need the ground to stop as well so we'll get the ground oh first let's get a reference to it we'll say ground get node we'll get its animation player this is a nice way you can get a note inside a scene if that scene doesn't have a script and you can't create a reference this is a way you can use and we'll say stop and finally we want the obstacles the obstacles that are currently on the screen to stop because by default as you remember our obstacles are moving towards left but once we die we don't want them to move anymore because we want to give the impression that the game stopped and to do that let's go inside the obstacle scene and let's add this scene to a group that we will call obstacles and inside the world scene we'll use the call group method of the scene tree to call a method on a group and in this case the group is obstacles and the method we want to call is set physics process and you want this to be false this method will deactivate the physics process method of every scene that's inside the obstacles group let's take a quick look at the obstacle script and here as you can see we're making it move inside the physics process so once this method gets deactivated the obstacle won't be moving anymore let's run the game and see if this is working so if i just jump on the ground everything should stop good that's working let's also try with the obstacle okay great this is it for this tutorial we implemented the game over functionality and in the next one we will create a menu system that we will use to display a game over menu and a simple menu before the game starts thank you very much for watching and i will see you in the next one [Music] hi there in this tutorial we will create the start and the game over menus without further ado let's get into it let's go to our world script and let's comment out the line where we call new game we don't want the game to instantly start anymore we want the player to tap once or click the mouse for the game to start i'm going to hit ctrl k and comment this line and now let's add a new canvas layer to the world this canvas layer is gonna hold our different menus and we're gonna call this one menu layer let's move this next to the hud layer and let's turn this into a scene we're gonna store it under the ui folder and let's go inside that scene now this is going to have two menus as i said and these menus are going to be control nodes the first one we'll call start menu and the next one will be game over menu these will be both laid out as full rects now let's start with the start menu this is going to be much more simpler than the game over menu it's only going to have a texture erect and we'll call this one start message let's go inside our assets folder and let's find the message.png file right here i'm gonna drag this over to the texture property of the texture rect cool and now let's align this to this center and let's move it up like that now to find the perfect position for this let's go back to the world scene and let's take a look at how it looks it actually looks fine uh that's lucky i'm gonna run the game now and take a look at how it looks it looks fine might be a good idea to move it down a bit but for now i'm okay with this i'm not gonna spend time tweaking it you can do it on your own if you really want to now let's add a script to the menu layer and in here we want to check when the player first taps the mouse clicks the left button and then you want to send a signal to the world scene for it to start the game i'm gonna define a signal called start game and inside the input method i'm gonna check for i'm gonna check if the event is the flappy action that we defined and if it is let's emit the start game signal but the problem with this is every time the player flaps this will be called we want this to be called only once and that's why i'm going to create a boolean up here called game started and this is going to be false at the start and if flap was pressed and the game isn't started yet let's emit this signal and after that we'll set game started to to true and we should also hide this message we don't want this this message image to be shown after the game starts and to hide this i'm not gonna delete it i'm just gonna turn down its alpha down so under visibility you have what's called the modulate property and if you click on this you get this color picker kind of thing and in here if you turn down the alpha all the way down you can see that the image disappears so this is what we're gonna do we could just turn off visible here like this but we don't want the disappearance to be that drastic we want it to slowly fade out and to do this we could use an animation player but i want to show how you can do it with a tween let's go back inside our script and let's get some references to our notes i'm gonna first get the message let's get between okay so after we emit our signal let's use the tween to turn down the alpha and to do that we need to use the interpolate property method of the tween this takes the objects that you want to interpolate the property of and that's going to be the start message now we need to specify which property we want to interpolate and that's going to be modulate and we specifically want the alpha of the modulate next the initial value it's gonna be one the maximum and the final value will be zero the minimum and we want this to take 0.5 seconds long great we also need to start between if you don't call this method nothing's gonna happen so make sure you call this and if you use the tween and nothing is happening you might have forgotten to call the start method great this will emit the start game signal once we flap and this isn't going to be called more than once because we have this boolean variable to keep that in check and we're gonna hide the start message image after we emit the signal let's go back into the world scene and let's hook this signal up let's go to the signal section of the menu layer and i'm going to hook this signal to the world script so when we when the start game signal is emitted from the menu layer let's call new game okay this should work so let's try it out before we click nothing is happening the the obstacle spawner isn't working and if i click once start message is gone and the obstacle spawner starts spawning obstacles great now let's take care of the game over menu game over menu is gonna be a bit more complicated but it's not gonna be anything too complicated so we should be fine i'm gonna hide the start menu for now so that it's easier to see what we're doing with the game over menu let's add two labels first one is going to be called the score label and the second one is gonna be the high score label let's also add a button that we'll call restart button i'm gonna hold shift and click on score label to select all three of these and i'm gonna go to the inspector and set the custom font property to the font resource we created where is it where did i save it oh i didn't save it oh i saved it here sorry yeah i meant to save this one the font resource in the fonts folder actually i don't know why it's here i might have to go back to that video and check but it's supposed to be inside here and i'm gonna drag this here and now all these nodes are using that phone resource great let's give these some text this is going to be called score and i'm just going to give it 0 for now just to see how it looks like it's gonna be let's call this best and this one will be restart and we obviously don't want them to be on top of each other like that so let's create a v-box container let's put all these inside there great i'm gonna get this bad boy and put him in the center first then i'm gonna position him up a little bit i'm also gonna hold down alt and i'm gonna make this box a little bit bigger and i'm gonna go inside the labels and set the alignment to center let's also go back to the v box and set the separation under custom constants to something like 20. that's maybe too much let's say 15. okay looking fine let's go back to the world scene to see what it looks like inside the game doesn't look too bad let's play it and see if we die this is what it looks like maybe we could position it a bit downwards and let's add some outlines to the text i'm gonna click on the score label hold down control or shift in this case it doesn't matter and click on high score label so that i have both selected and i'm going to go inside custom colors turn on the font color shadow and it's black by default that's what we want and let's go inside the custom constants set the shadow offsets to three and turn on outline okay and for our button let's set its minimum size to on the y let's set it to 75 so that it's a bit more taller for width i think what it has now is fine okay great i'm gonna connect the pressed signal of this button and in here we'll do something but first let's create another function which we'll call init gameover menu and this is going to take a score let's get a reference to our score label and our high score label which we're going to use in a later tutorial and let's also get a hold of the game over menu inside this method we want to call this method when the player dies and we want to show the game over menu that's why we have a score passed into this this will this score will be passed from the world scene and we're going to use it to set the text property of the score label let's turn it into a string and we also want to by default this game over menu is going to be invisible we're going to set its visibility to off and let's turn the start menu back on and let's in here let's say game over menu dot visible dot equals true great and when we press the restart button let's get the scene tree and let's call it reload current scene to restock the game this is all the functionality the menus are gonna have now the last thing we want to do is go back to the world scene and make sure that we're showing the game over menu so inside the game over method we have here let's well let's get a reference to our menu layer and let's call it init game over menu function and let's pass in our score okay let's see if this works i'm gonna die we see the menu that works fine and if i press restart the game is going to restart and let's try to get some points to see if the score is working properly and our score is three as you can see we're not going to do the high score in this tutorial that's going to be that's probably going to be the next one but this in this tutorial we just implemented the menus and they're they're working fine for now so i'm happy okay great thank you very much for watching this tutorial make sure to like comment and subscribe if you want to see more tutorials like this and make sure to take a look at my other videos like i said thank you and i will see you in the next one [Music] hi everyone in this tutorial we will implement high scores into our game we will learn how to save data and also how to load data from a file let's get started okay let's go inside the world script and let's create a high score variable this is going to be zero as default and let's create a constant to store the path that will use to store our save file we're going to call this one save file path it's going to be a string and just like we have a res folder to store our project files we have a user folder that godot defines for us that we can use to store anything that we want to save on the player system in this case we're going to create a save file i'm going to say user and the name of the file is going to be save data dot save this user folder the location of it is gonna depend on your operating system but i can show you where it is on windows just go to your file browser and in here you need to go to app data which you can go by typing percentage sign app data lowercase and percentage sign and this will take you to appdata roaming and in here you want to go to godot app user data and from here you need to find the prod the name of your project in this case it's flappy bird tutorial and anything that you save or create from godot and anything that you save into the user folder is gonna appear here okay this is going to be our high score and every time we die we want to check our score and if our score is greater than this high score we want that score to be the new high score so let's go inside our game over method and just before we call in its game over menu from the menu layer it's very important that you do this before you call this otherwise you're gonna get some weird results just before that let's say if our score is greater than the high score let's set the high score to the score okay now let's talk about saving and loading this into this high score variable we're going to need two different methods which i'm going to create at the bottom here the first one is going to be save high score and the next one is going to be load high score to save we're going to have to create a new file and we will use the path constant that we created to open our save file save data.open save file path and we want to write to this file the way this open method works is if the path you provided doesn't exist meaning there's no file named you save data.save inside the user folder this method is just going to create a new file for us so even though at the start of the game you're not going to have a save data file yet the first time we save this file this method is going to create one for us let's store our high score variable using the save data's store var method and this is it so let's close it up so that we're done with this file now let's take a look at the load method and this is going to be used for loading the high score at the start of the game just like saving let's create a new file but this time before we open the path we want to check if the file exists or not so i'll say if save data dot file exists save file path if it exists let's say save data dot open save file path and this time we're not gonna write but we're gonna read from this file the reason we have to check if the file exists in the load method is there's basically no point in trying to load data from a file that's empty so if you don't check if the file exists or not and if it doesn't this open is just going to create a new file and that's going to be empty so and we're going to get some weird results trying to read some variable from a file that's empty okay now let's set our high score to the variable that's inside this file that we just opened and this getvar method is going to read the first variable that we saved inside this file and in this case we only have one variable anyway that we stored here and finally let's close this file file and now we have to call these methods from the rights places so let's go back to the ready method and let's get rid of this comment here and after we connect the obstacle spawner let's say load high score because we want the high score to be set before we start playing our game and ready gets called at the very beginning of the game and let's go to game over and if we died and if we have a new high score let's also say save high score we don't want to call this if the high score didn't change because there's no point saving it if it's the same but if we have a new high score let's go ahead and call save high score this should work fine but we also want to see our high score on the game over menu but right now we're only passing a score variable to the menu layer let's also pass our high score and let's go to the menu script to add the high score to the list of parameters here and let's set the high score label to this variable that we just passed okay great let's run the game and see if it works at the start of the game i'm just gonna die and our high score is zero as we expect now let's try to get some points one two that's enough okay so score two best two let's restart and let's die and our best is 2. looks like it's working now let's try to beat our best to see if it's updating or not three yes so now the best is three and just for good measure i'm just gonna play one more time and i'm gonna get like oops i'm not gonna 10 points because i was too slow okay let's see if i can get to two and then die let's see okay my score was two the best is still three seems like it's working this is a really nice feature for our game and i hope that this was useful for you in the next tutorial we will take a look at sound effects which are really gonna bring our game to life if you liked this video make sure to comment subscribe and leave a like and thank you for watching i'll see you on the next one [Music] welcome in this tutorial we will add sound effects to our game this is gonna be a short one so let's do it okay first let's take care of the player sound effects i'm gonna open up player scene and here let's add two audio stream players the first one's gonna be hit the second one we're gonna call it wing now let's take a look at our assets folder audio and let's drag ring dot wave into the stream property of the audio stream player you can hit playing to hear what it sounds like or before you drag it you can double click on the wav file here and click this play icon on the bottom right cool now let's drag the hit audio into the hits stream property and let's go inside the script in here let's get reference to our hit and wing stream players and let's play the ring sound effect inside the flat method and let's play the hit sound effect inside the die method let's play the game and see what it sounds like okay let's die okay that's good now let's add the score sound effect that's gonna be inside the obstacle scene and in here we want to play the sound effect when the player exits the score area first let's add an audio stream player this is going to be scor score should be called score let's call it point because the name of the sound effect is point dot wave okay i'm gonna drag sound file just like we did before and inside here let's get a reference and when the player scores let's play this sound okay cool now we have sound effects i know i didn't use all of them but if you really want to you can use them too it's very easy to implement as you saw me do it so if you want to use all of these go ahead and create some new audio stream players and add these sound files into the stream and just call play okay cool this was a short tutorial this is probably the last tutorial where we add new stuff and our game is basically done in the next one we will get rid of some problems that we have with the game fix some bugs and talk about improving our game and i'm also gonna talk about what to do next after finishing this series but that might be a separate video called conclusion okay thank you very much for watching and i will see you on the next one hey guys in this tutorial we will do some bug fixing we will start by fixing the errors that we have here well they're not errors but they're warnings because they're yellow this first one the argument delta is never used in the function physics process this one is easy to fix we just need to add a prefix before delta and that one's gone the next one the function reload current scene returns a value well we're not going to use this return value so there's no point storing it in a variable so let's just ignore this one cool now if we run the game we're not going to get any more warnings the next thing i want to look at is i realized when we die and if we die on a pipe we still score but we don't want that let me just show you real quick see i died and my score should be one but a score signal was emitted when it shouldn't so let's go inside the obstacle scene and in here what happens is we score once the player exits the score area but if we die on top of it we can't exit from the right side but we still exit from the bottom because it's very short the fix is very easy you just need to select the collision shape 2d of the score area and make it taller and this much should be fine now if you play and we die on top of a pipe we didn't score so yeah that's the fix okay cool the next thing i want to look at is well there are some impossible situations in the game right now sometimes we'll get a pipe that's very low near the bottom and the next pipe is very high but our bird right now can't flap high enough in a single flap to reach that so we need to increase the flap force of the player and at the same time sometimes we get a pipe that's very high and the next pipe is very low and the player can't really fall fast enough because the gravity is isn't strong enough so let's first fix the gravity because the gravity is going to affect the flap force and we don't want to change flat force first because we're going to have to do some adjustments if we change it first let's look at the start method we're setting the gravity scale here and let's just set it to 10. now if you play the game you're gonna realize that you can't nearly flap us high enough and we fall much faster which is what we want let me just turn down the volume a bit okay now we want to set the flap force to something higher like 340. now if you play you can flap much higher in a single flap and let's see if we can get a scenario like this see it was very easy for me to reach that i like this one before we we couldn't have done the sequence that i just got okay cool we got that and the next thing i want to look at is the pipes the the walls their collision shape is too short because what will happen is if we start flapping and at the start and we flap enough times we can go over the obstacle and just keep going like that let me show you so i'm just gonna flap like crazy at the start and as you can see i'm over the game basically just scrolling through we don't want this either so this is also very easy to fix we just need to go inside the wall get the collision shape and make it much taller like this let's position it like it used to be okay this should fix it and inside the obstacle you can see that it's a much bigger obstacle to go over let's test this i'm gonna start flapping like crazy i still die nice the final thing i want to look at is isn't necessarily a problem but i just think that right now the player when it's falling down isn't rotating fast enough so i like the player to reach the maximum rotation faster and that's why i'm gonna set its angular velocity once it's start falling to five instead of three and this way it's gonna look much more like the original game awesome we did some bug fixing and some improvements to our game in this episode our game is basically done like i said we're not gonna add anything else and in the next episode i'm gonna talk about what you might wanna do next and my future plans thank you very much for watching and i will see you in the next one [Music] hey guys this is the end of the flappy bird tutorial series congratulations on finishing this series if you found it useful please subscribe like and leave a comment i'm trying to improve myself as a content creator so your feedback is very important for me stay tuned for any upcoming tutorials i'm thinking of starting a new series very soon thank you very much for watching and i will see you in the next one [Music] you
Info
Channel: Kaan Alpar
Views: 7,035
Rating: undefined out of 5
Keywords: godot, godot tutorial, kaan alpar, learn godot, godot 2d, indie game, indie game development, game development, game dev, gamedev, game developer, learn game development, learn gamedev, flappy bird, how to make flappy bird, flappy bird tutorial, flappy bird unity, godot game engine, godot engine, flappy bird godot, godot mobile game, godot 2d game, godot engine tutorial
Id: 8_ThGJG9Kqg
Channel Id: undefined
Length: 124min 40sec (7480 seconds)
Published: Fri Oct 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.