Godot Tutorial for Unity Developers (and other beginners)

**Mastering Good D: A Beginner's Guide to Game Development**

We'll make this lower case as well we'll say if the wall is in the body then we can Q free now now we can delete this first of all but this is basically checking to see if the property is in that wall that we or the body that we just collided with so let's play and now it should work relatively fine let's test this one more time by going to the second pipe and there we go all right we are almost done we just have a little bit more.

**Testing and Refining**

We'll create something called a global script. How do we do this well first of all let's create a new script we can either go here right click oh I guess they removed that I think we can go to file and say new script or contrl n or we can go to the res file on the bottom left create new and create new script we're going to create something called game or Global and in this Global we're going to remove all this and say variable point we're going to set it to zero this is the points that our player is going to collect now in our pipes we're going to create an area 2D that is going to ding or give our player a point every time we hit it so let's create this and add a collision shape. Now how are we going to make this work well it's actually pretty simple we just have to create a long rectangle we're going to move this all the way to the right where the pipe should be and we're going to make it relatively skinny.

**Adding Collision Detection**

We'll go to the area 2D and say if body entered connect this and we'll say if bird inbody body. name because the bird is not a variable but it's the name of our Bird right so now let's go back to our pipe and we're going to say Global do points plus equals 1 however this should error there we go not declared in current scope. Now how do I make this Global how do I access the script from this script well on the top left we go to our project settings this should open up autoload we go to autoload right here this is where we can autoload or globalize scripts or even scenes so if I click the folder button this guy will pop up and you can see I can actually select the scene too however we're just going to select the global script and open this now it says the path we're going to add it this is the name of the script to access it we're going to close it and this should work. Should unair sometimes if it doesn't work what we can do is close this and play it again or open it and there we go.

**Displaying Game Points**

In my world we have no way of keeping track of the game points so let's add something let's go to our world and add a label this label is just a label it's basically text so if I go to the inspector and add text I can write a bunch of gibberish but that's not what I want I want to create a script onto this and we're going to say self. text is equal to string because I'll explain it in second global. points because we have to convert this points into a string because this is actually an integer and text is a string we cannot set a string with a integer it has to be a string okay so this should allow us to show how many points we have.

**Conclusion**

Let's play and we see on the top left we have the points and every time it pass to the pipe increases the point and if I die it should not increase the point. That's it all right that is pretty much the end of this season series I hope you enjoyed it and I'll see you guys congratulations you have finished this video the mini course if you guys enjoyed this course or little video I made um please subscribe uh share the video with your friends or other Unity developers that have not transitioned yet um what else if you guys liked my content um I'm going to be working on a course coming up soon is going to be a really really big course consisting of not only how to master good D but also game development and getting started in game development um it is not out yet most likely it's going to take me a while to get it out however if you would like to support me on that and my development of that course um I would appreciate it to either support me on patreon or I will have a Kickstarter soon so please subscribe to stay updated on that um also join my Discord which will also be in the link down below again congratulations for finishing this video it was pretty long um hopefully you can continue on with this project and build on it and who knows maybe you can release it probably not because the assets are you know flppy bird but that's okay I hope you enjoyed making your first game in good D