learn-to-code-how-to-use-practices

How to use practices

This page is a guide on working with this course’s practices in Godot. You will learn:

Note: We’ll tell you when to do each practice in the lessons. You don’t have to do any right now. This page only explains how to use the provided practice project in Godot.

If you haven’t already, you will need to download the project files. You can learn how on this page: How to download the course files.

How to import the project

You will first need to import the godot-practices project into Godot.

Double-click the Godot executable to open the project manager if you haven’t already.

On the right, you will see an Import button. Click it to open the project import pop-up.

You need to give it the path to the downloaded godot-practices.zip project file. You can click the Browse button to open a file explorer and find it.

Double-click the godot-practices-*.zip file to open it (The * stands for the version number, like 0.8.1).

Then, Godot will ask you for an empty folder to extract the ZIP archive’s files for you.

If you don’t have an empty folder ready, click the Browse button below Project Installation Path.

Use the Create Folder button in the top-right to create and enter a new folder.

You can then click the Select Current Folder button to confirm your choice.

Finally, click the Import & Edit button to import the project into Godot.

Godot will then take a few moments to import all the project files.

You can then close the Godot editor and follow the same steps to import the godot-complete-demos and godot-game-to-assemble projects into Godot.

How to open a practice

When you open the Godot project, a dock named Practices should appear on the right. It lists all the practices in the course.

To open a practice, click on the practice’s name. It opens the corresponding scene in Godot and expands the scene’s directory in the FileSystem dock in the bottom-left.

Press F5 to run the practice and test your code. The left panel lists the checks you need to pass to complete the practice.

Press F8 to close the running scene.

How to complete the practice

To complete a practice, you have to edit the scene and its scripts to pass all checks.

They also get gradually more challenging as you move through the course.

Simulated input actions

In some practices, we simulate inputs as if the player was pressing some keys or using a gamepad. This allows us to test how a character moves, for example.

In practices that test input actions, you will see a list of labels with checkboxes on the left.

As we simulate inputs, check marks will appear next to each label.

After that, the system will start running checks.

What happens after running checks

If your practice does not pass one or more checks, messages will appear on the right side, inside the output panel.

A pop-up tells you when you pass every check, and a checkmark appears in the editor.

Note that your progress is only tracked on your computer. We never send anything to an online server.

It also means that you will not see your progress if you change computer.

How to reset one practice’s files

Sometimes, you will make many changes to a practice’s code, and you may feel stuck or want to start over.

You can reset a practice’s files by clicking the button with the loop icon to the right of the practice name in the practices dock.

A pop-up will ask you to confirm as this cannot be undone.

Once you confirm, this will reset all the files.

Note that depending on your operating system, you may need to reload the practice scene for the change to take effect. To reload a scene, go to Scene -> Reload Saved Scene.

Resetting your progress

Our plug-in keeps track of how many practices you completed. Completed practices have a green checkmark next to them.

If you want to reset your progress entirely, you can click the Reset Progress button at the bottom of the Practices dock.

Please do this carefully as you cannot undo this change.

If you have any questions or suggestions, please leave them below.