chore: typos

This commit is contained in:
Topvennie 2024-04-18 16:08:36 +02:00
parent 8c7f4e3b3d
commit d86038b9c1

View file

@ -2,17 +2,14 @@
## Introduction
This tutorial will guide you in making a basic Flappy Bird game.
We'll guide you thorugh the entire process using the provided template.
The focus will be on learning and implementing new concepts.
That's why we'll leave the parts that require writing some logic code up to you.
This tutorial will guide you in creating a basic Flappy Bird game. We'll walk you through the entire process using the provided template. The focus will be on learning and implementing new concepts. Therefore, we'll leave the parts that require writing some logic code up to you.
A example solution will be released so that you can compare it to yours and / or use it to enchance the g ame. Remember that you can press F1 to open the help menu or you can right click a symbol and press lookup signal if you don't know what it does.
An example solution will be released so that you can compare it to yours. We've also included a file with some potential features that you can add. Remember that you can press F1 to open the help menu, or you can right-click a symbol and press "lookup signal" if you don't know what something does.
## Overview
Let's have a look at the files.
We started with
We start with
- `Main.tscn` -> Main scene
- `Main.gd` -> Script accompanying the main scene
@ -28,7 +25,7 @@ We'll split the main goal of making Flappy Bird into a few smaller goals, the fi
#### Player
Open up the player scene and it's accompanying script (`player.tscn` and `player.gd`).
If you look at the left side of the screen you'll notice we only have a `Area2D`, a `Sprite2D` and an `AnimationPlayer` node. As you can guess the latter will provide us with an animation. The player still misses a hitbox, let's add it by adding a `CollisionShape2D` node. Right click `Area2D` -> Add Child Node -> Select `CollisionShape2D`. The next step is making sure the hitbox resembels the bird. We can specify the hitbox by clicking on `CollisionShape2D` and opening the `Inspector` tab on the right hand side. There we can select the shape and specify the dimensions. At the top of your screen,press on `2D` so that we can see the hixbox. Now select a `CapsuleShape` as shape and change the `Radius` and `height` accordinaly. If you can't see the `Radius` and `Height` options press on the little circle next to `CapsuleShape`.
If you look at the left side of the screen you'll notice we only have an `Area2D`, a `Sprite2D` and an `AnimationPlayer` node. As you can guess the latter will provide us with an animation. The player still misses a hitbox, let's add it by adding a `CollisionShape2D` node. Right click `Area2D` -> Add Child Node -> Select `CollisionShape2D`. The next step is making sure the hitbox resembles the bird. We can specify the hitbox by clicking on `CollisionShape2D` and opening the `Inspector` tab on the right hand side. There we can select the shape and specify the dimensions. At the top of your screen,press on `2D` so that we can see the hixbox. Now select a `CapsuleShape` as shape and change the `Radius` and `height` accordingly. If you can't see the `Radius` and `Height` options press on the little circle next to `CapsuleShape`.
Now that the player has a sprite and hitbox let's implement the required logic.
@ -85,11 +82,11 @@ You should now be able to fly between pipes and get reset when you hit a pipe.
#### UI
The only thing left to implement is a score system.
Let's create another scene, Select 2D name it UI. We need to change the standard `Node2d` to `CanvasLayer` by right clicking the node -> change type -> select `CanvasLayer`.
Let's create another scene, Select 2D and name it UI. We need to change the standard `Node2d` to `CanvasLayer` by right clicking the node -> change type -> select `CanvasLayer`.
Give it a `MarginContainer`, inside a `HBoxContainer` and in there 2 labels. `BestScore` and `CurrentScore`.
We'll leave it to you to implement the required functions and variables to keep track the score. We're going to use a signal in the next part to connect you function with the right event.
We'll leave it to you to implement the required functions and variables to keep track of the score. We're going to use a signal in the next part to connect you function with the right event.
#### Main & Player