I have created a simple project that can be used to learn the basics of programming.
It is quite important to learn how to code if you wish to make games. Don't let me scare you away thought, it really isn't that hard.
First download the project by clicking here. Once you have it downloaded you can unzip it and find a nice place to keep it.
At the top left you will find an import button. Simply click that and find your projects .godot file.
Upon opening the project you will find a few diffrent things. In the bottom left you will see a file explorer.
Simply double click on `console.gd` to open it. Inside you will find the following code.
func _ready():
while true:
var user_input = await input()
print_text(user_input + "\n")
There are a few things happening here. This is the code that defines game logic.
At the top we are defining a function called `_ready`. Whatever is in here will be run when the game starts.
Notice the use of `:` twice. If we have a `:` then it means that we are selecting an area of our code. This highlighted area is denoted by indentation.
The `while true` part simply means that once the following code block finishes, it will be repeated.
Next we create a varible, which is simply something that takes a value that we can call upon later, and give it user input.
Note the use of await. This simply means that we will wait for the input function to finish before we continue. This tends to be bad practice in Godot but works fine for it's simplicity here.
Finally we run the `print_text` command to, well, print to the games console.
Make sure to use the `print_text` function and not Godots default `print` function as that will print to Godot's console, not the new one that I have defined.
Now if you press the play button at the top right of you screen you will see the game window pop up. Simply type whatever you want, press enter, and it will get mirrored unto the console.