In this video, I'm going to complete the first practice before you,
just so you see how the practice system works in the course.
First, we want to open Learn to Code with Godot Practices,
the one with the purple icon.
So I'll double double click it.
When you first open it, you're going to land on the 3D viewport.
This will change afterwards once you do the first practice.
But this is how it goes by default.
Unlike a normal Godot project, on the right, you have a new doc,
GDQuest Practices.
This one is where you'll open and manage the practices.
The first one is in the first chapter: To Space and Beyond.
So you can click that to unfold it and see the corresponding practices.
In the lesson, it tells us to do making the ship move,
so I'm going to click it.
Instantly it opens a scene in Godot.
It expands the corresponding directory
in the bottom left
and it gives us some information about the practice, the description,
the techniques you'll practice,
a list of tasks that we have to complete,
and optional hints.
Now, typically to complete a practice,
you need to change the scene or the scripts in there.
And then you run the scene by pressing F6
and the practice system will check your code,
just like the Learn GDScript app you did before.
For any check that you don't pass,
you're going to get a message on the right,
an error message, that will give you some hints
or information that may help you complete the practice,
at least that's the goal.
Once you're done testing like that,
you can press F8 to close the running scene.
We have the description on the right
using a fixed velocity, we need to make the ship move by itself.
It's the same we did in the lesson.
The idea is that you reproduce it in this very first practice,
just as some kind of muscle memory training,
if you want.
It's taking some small steps.
As you move forward through the course,
the practices will become more and more unique
and different from the lessons.
But for the first ones, we keep it very simple.
We have the tasks,
we need to make sure the ship moves every frame
at a fixed speed.
We have to take the Delta parameter into account
and use the variable name velocity,
which we defined for you.
I'm going to click the script icon next to the sprite
to open the script and there I have a bit of code.
I have a velocity variable that's been predefined.
And you can see we've defined the process function for you
and we have the position.
Now, two things.
The velocity is set to Vector2.ZERO, this is equivalent to Vector2(0,0).
So the ship will not move even if we use that value.
So we need to change it.
Then we need to change the ship's position.
First things first,
I'm going to change the Vector2 value for my velocity
and make the ship move.
Any value that's non-zero should work.
Then every frame in the process function,
I'm going to add to my position.
I'm going to add velocity.
I can run the scene with F6 to see that,
well, the first check is not passing
or I'm not taking Delta into account, but the other two are.
And so we get a message that tells us that
we're not multiplying the velocity by Delta
and that's what we need to do to make the movement time dependent.
We're going to multiply the velocity by Delta,
run again,
and now we pass the three checks.
This completes the practice.
And so we can choose to stay and play the scene
or we can quit and go back to the editor.
There, you'll see the progress bar increased
and we see a green check mark next to the practice.
This gets saved.
So even if you update to a newer version of the course, this will be kept.
Because in the future, we want to maybe add a couple more practices.
We might be changing some existing practices,
but your progress will not be lost.
Just one note about that,
this progress is stored on your computer.
So if you format your computer,
you clear the hard drive or you work from another computer,
it will not carry on.
You can find your saved file by going to Project,
Open Project Data Folder.
This is a folder Godot creates for you.
This is where you put the user saves, those kinds of things.
And this is this file progress.tres, text resource,
that is used to track your progress.
So if you want to go on a laptop
or to continue on another computer,
you'll want to copy this file over.
With that, I'll let you do the first practice yourself.
Again, it shouldn't be too hard,
but then you'll be moving on to the other practices that you'll tackle on your own.
Best of luck with that.