Hello and welcome to another episode in the Godot basics tutorial series. This episode is acting as a series intermission.
Now we have gone over 20 plus episodes and a detour. And I do have more episodes on the way.
However since I want you to learn efficiently let's go over some ways to do that.
So let's go over what we have learned so far.
Now if you were with me through the G.D. script fundamental tutorial series you've learned the basic concepts of G.D. script as a programming language. Now the second thing we are currently learning is basically the basics of Godot and we have now finished the script Life Cycles portion of this series. Now there are two reasons why I wanted to go over the Godot script Life cycles.
The first reason is that I believe by knowing the script life cycles with Godot along with how they interact and behave,
You will have an easier chance of understanding what's going on when watching other YouTube videos. The second reason is because script life cycles is an important part of game programming no matter the game engine or game framework You choose, There will be some type of way of handling that game loop and that's really all I had in mind with these two series.
One was to introduce you to a programming language in that case
G.D. Script for this series or the last series and then after introducing you to a game engine in this case Godot. However you can take this knowledge and apply it to any other game engine. For example if you choose unity as your game engine you will need to learn C# if you choose. Unreal engine as your game engine you will need to understand c++. If you choose to go with phaser.io as a game framework. You want to work with, but you will need to learn JavaScript and that's basically the process of the series was 1. Introduce you to a programming language and then 2. Introduce you to the game engine.
Now the rest of this episode we'll be talking about how we can use the API documentation to aid us in learning more about making games and that's really all this episode is about one with a basic understanding of our game loop. We can watch other YouTube channels learn what they're doing and then when we're confused or we need to fill in an information gap we go to the API documentation to fill in those gaps.
And this is a process you do whether you're a beginner or seasoned professional. Now let's go ahead and look at that now in this series I want you to learn effectively and the reason for that is because 1 they go over the channel is to help you elevate yourself from a beginner who knew nothing.
Started learning G.D. Script and basically rise above to basically make your own game. And so in this episode I want to 1. Teach you how to learn efficiently and 2. If you learn how to improve yourself efficiently your progress will speed up and that is basically my goal. I want you to learn at a faster rate and especially if you're a beginner. You probably don't know how to do that and so that's basically what this episode is. So let's start on that. Now, To learn efficiently in G.D. scripting and Godot, you will first have to learn how to read and find information on the Godot API documentation Web site and the reason you want to learn how to read and find information is because it will help you when you watch other GD script tutorial videos.
That's right.
I want to help you learn how to read and find information so you can follow other YouTube channels,
And then from watching them program and copying their code you can fill in the gaps with what you know and what you don't know by reading the good doe API documentation and to do that. First you find a good though Judy script programming video or it can be an article.
Then you follow their code analyze their code what you don't know. You look at the API documentation on parts that confuse you and then what. Now you understand what's going on. Now you may be thinking to yourself wow I'm not really ready to start this. And if you are following videos you may be thinking I don't understand what is going on. I'm copying code. It works like the video shows me but I have zero clue about what I'm watching.
And you know what I'm here to tell you. That's OK. Basically you want to build confidence so go out there start watching videos start copying the code and as a matter of fact if you are a beginner basically you have to start from somewhere. And so in a sense yes you are copying their code but just no that's okay.
We've all started there. So again I want to reiterate copying code is OK but only in the context of learning. And basically in a form that allows it.
For example a YouTube video teaching you how to make a health bar.
Obviously they're making a video because they want to show you how to do it. They're expecting you to follow them on screen and copy their code. Sometimes they may or may not go over in detail every code line by line and that's OK because in this video I'm gonna show you how to supplement your learning. Now if you do find a video that goes over health bar I'm not pointing out any particular video but most likely the video's going to introduce a concept called tweening which can also be referred to as in-bewtweening or in-between frames however I'm gonna make an episode on that.
However let's pretend we are a beginner we just started Godot. We followed the series right. You followed the series and learned everything. Script from the Jedi script fundamental tutorial series and you started the Godot basics tutorial series and so far you've only learned about script life cycles so let's go ahead and look at an example code for tweening. So let's go ahead and start from a mindset. If you follow the series you don't know what a tween is. And maybe you're copying the code from that health bar video and you probably have code that looks like this.
Well
Well let's go ahead and learn how to basically teach our selves Godot effectively. So you take your code that you don't know, just a small portion. In this case we have four lines. Now look through it on a piece of paper write the code you see on the screen and then go ahead and find out what you know and then scratch that from the paper.
So in this case we have a variable tween.
We know what a variable is and we know that the variable is named tween.
We know what the new method is from the G.D. Script fundamental tutorial series. We learned that we are instantiating the new object the new class instance. Then on top of that we recently just learned about ADD child. So you may say to yourself OK I know what a variable is. I know what the new method is and I know that at child means we're adding something to the scene tree.
However I don't know what the variable holds because I don't know what tween is.
Then on top of that I don't know what interpolate property is and I don't know what the start is. However I do know that these two are methods. Now after you've scratched out what you know you will be left with what you need to learn. And so as you can see here we have something called Tween because we're using the new method.
We can come to a hypothesis that tween must be a class perhaps it's something Godot provides.
At this point we don't know yet because we're still analyzing the code right now. We have a method called interpolate property and we have a start method and as a beginner who doesn't know what tween is, we're gonna go ahead and look at the Godot API docs or rather documentation to see what exactly this tween is and what exactly these methods do. So let's do that.
So I went ahead and grabbed the API docs from Godot and basically you want to go ahead and come to the search bar here.
Gonna go ahead and click that. Gonna be shown a search bar you just go ahead and type. What we need to find for example in this case we don't know what tween is. So let's see if we type tween does Godot give us anything back. And yes it does give us something back. So let's go ahead and click on that. However I want to show you that we can also put down methods and let's go ahead and see what Godot returns and if we look we see OK we've got a page interpolate but hey look at this we have something called Tween. That's what I saw in my program that I copied from a YouTube video.
So you go ahead and you click that and when you click that you're gonna be taken to the page of a tween class. And as you can see here inherits from node an object and hey we know what that is.
We know that node as a script lifecycle that we can use basically entry and exit tree.
And we have a small description: smoothly animates a nodes properties over time and so from that we can make our own hypothesis like oh okay, since, and so oh okay can the context of a health bar This makes sense and you just go ahead and you read it even shows us code and look at that interpolate property however you want to go down to the method section you actually want to find the two methods that we saw in our code that we copied from the video in this case it was interpolate method or excuse me interpolate property and the start method.
So you go ahead and you find the property and we have that here interpolate property just go ahead.
You click that and you read and you see what you can get from the API documentation and after that just go down and find the start method and see what it does.
And you go Oh it starts the tween. And now let's go back to our code. So now we know that the start method starts our tween and we know that we're adding a tween class onto the scene tree.
We know we're setting interpolation properties. And so from this hypothesis we can say OK well we're creating this class that allows us to basically smooth something over time.
We're gonna add property values onto it we're going to add that to the scene tree and then we're gonna start it. And then everything starts to become a little clearer. And then you can even go deeper than that. You can ask yourself some questions to help improve your understanding and that would be why exactly are we adding the child before we're calling the start method now since you've copied the code from a YouTube video teaching you health bar and everything works exactly as it's supposed to be. You can go ahead and play around with your code and this will help you improve your understanding of not only the script language but how Godot the application works in general and so you can move the child beneath the tween that start to see what happens on the screen and that's basically how we learn how we improve ourselves.
It's basically an iteration process and everyone goes through that. So keep that in mind no matter if you're a beginner or you're a professional, Everyone goes through the process of learning because programming is such a big field, such a big industry. We cannot know everything. Learning and understanding, mastering Godot is not the same as learning ,understanding, and mastering unity. However they do interlap in a lot of areas. Now why am I exactly teaching you how to read and apply this knowledge to the API docs and well that's because I want you to go out there and start learning.
And that's because I believe that if you understand the programming language and you understand the basics of script life cycles you can basically tackle any game engine or game framework because that's all you really need to learn. So in this case learning programming language and then go ahead and learn the script life cycles. All game engines/game frameworks should have some sort of game lifecycle that they provide. And from there I believe you're capable of learning and understanding any YouTube video series as long as you use the API documentations to supplement your gaps and your confusion.
Now the secret to programming is understanding to read and find information in the API documentation. This is basically the secret sauce.
Why, Because the API documentation is our gateway into understanding the complexities of a programming language, a framework ,an engine and much much more. As a matter of fact I'm gonna show you.
So now you know the secret.
So how do we apply it to ourselves. Well first you ask yourself what do you want to learn. And then the second question is, do they have an API documentation page.
And then the third thing to do is if the answer is yes go ahead and read it.
Then after reading it follow videos or rather find videos whether free or paid in order to fill in gaps of confusion and or even misunderstandings. And then lastly start practicing. And that's basically it. That's basically the process of effective learning. Now let's go ahead and apply that to something else. Let's say after you've learned a Godot for a year. Maybe you want to try unity so you ask yourself OK what do you want to learn.
Unity.
C# maybe C++ maybe you want to have a little fun go on the wild side. Well now you ask yourself the second question. Do these things have an API documentation as a matter of fact. Many many tools and programming languages will have an API documentation as a matter of fact all three of these have an API documentation. So let's go ahead and look at that. So as you can see here we have our C++ language documentation and from here to our left you can see we have quite a lot. Basically this documentation page is not only teaching you everything about the C++ language but it's teaching you basics for example statements to go ahead and click that you're gonna be taken to a page.
Excuse me while I zoom in.
As you can see here we have well quite a lot.
We have null statement, selection statements. Look at that iteration statements. Go ahead and click on that and you'll be taken to a page that basically shows you what we did in the GD script fundamental tutorial series which was letting you know that here C++ has a while loop and a for loop and as you can see here that's how we can use documentations to help us learn new things. And I personally like articles over videos only because you can control the speed at which you learn. Now if we move on to the next language We'll seen that C# also has a documentation page and to the left we can see hey look at that we got tutorials because the documentation page wants us to learn.
As a matter of fact Godot has a similar thing for G.D. script. Now lastly let's pretend okay we've learned the basics of C# how do we apply C to unity and what do you know unity also has an API documentation page. But where do we start. Well we can do brute force which is learn everything one by one or we can click here for the unity tutorials to see if they give us a way of learning step by step. However you'll notice that unity is almost similar to G.D. script or rather Godot because in this case check this out we have an input.
What do you know an input manager.
And if you click that we see that this input manager lets us refer to physical keyboards and as a matter of fact you may find that it's a little similar to Godot.
So even though Godot and unity are two separate game engines and they do things differently they still have ways of handling things that we as game programmers care about and in this case it would be handling player input.
Okay let's move back to the slide show.
So we're back in the slide show.
And that's basically it. It's basically how we can use API documentations to aid us in effectively learning not only a programming language but in this case a programming game engine in this series. Now that we have finished the script lifecycle portion from here on out we will be looking at specific APIs and basic gaming concepts to see how the API can help us with our game programming. Don't forget that at this point in time you should go out and program by following youtube videos from other channels.
That's all I have for you in this episode. Thank you so much for joining me. If you have any questions or comments please feel free to leave them in the comments section down below. I look forward to seeing you in the next episode. Have an amazing day