flappy_bird #1
20 changed files with 39 additions and 163 deletions
|
@ -172,4 +172,4 @@ Anim={
|
|||
"zfar": 4000.01,
|
||||
"znear": 0.05
|
||||
}
|
||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Area2D")])
|
||||
selected_nodes=Array[NodePath]([])
|
||||
|
|
|
@ -32,12 +32,12 @@ current_scene="res://Player.tscn"
|
|||
center_split_offset=0
|
||||
selected_default_debugger_tab_idx=0
|
||||
selected_main_editor_idx=2
|
||||
selected_bottom_panel_item=1
|
||||
selected_bottom_panel_item=0
|
||||
|
||||
[ScriptEditor]
|
||||
|
||||
open_scripts=["res://Main.gd", "res://Player.gd"]
|
||||
selected_script="res://Main.gd"
|
||||
selected_script="res://Player.gd"
|
||||
open_help=[]
|
||||
script_split_offset=70
|
||||
list_split_offset=0
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
ea4bc82a6ad023ab7ee23ee620429895
|
||||
::res://::1713446102
|
||||
default_env.tres::Environment::2706437284641004306::1713446092::0::1::::<><>::
|
||||
::res://::1713448239
|
||||
default_env.tres::Environment::2706437284641004306::1713448239::0::1::::<><>::
|
||||
icon.png::CompressedTexture2D::224231617940432086::1713446092::1713446092::1::::<><>::
|
||||
Main.gd::GDScript::-1::1713446092::0::1::::<>Node<>::
|
||||
Main.tscn::PackedScene::798496173305188108::1713446092::0::1::::<><>::res://Main.gd<>uid://bkppr8vsso41l::::res://Player.tscn<>uid://1wdcw8ne7j5w::::res://res/sprites.png<>res://UI.tscn
|
||||
Player.gd::GDScript::-1::1713446092::0::1::::<>Area2D<>::
|
||||
Player.tscn::PackedScene::3120217666326125571::1713446092::0::1::::<><>::res://Player.gd<>uid://1wdcw8ne7j5w::::res://res/sprites.png
|
||||
Main.gd::GDScript::-1::1713448237::0::1::::<>Node<>::
|
||||
Main.tscn::PackedScene::798496173305188108::1713448239::0::1::::<><>::res://Main.gd<>uid://1wdcw8ne7j5w::::res://res/sprites.png
|
||||
Player.gd::GDScript::-1::1713448050::0::1::::<>Area2D<>::
|
||||
Player.tscn::PackedScene::3120217666326125571::1713448239::0::1::::<><>::res://Player.gd<>uid://1wdcw8ne7j5w::::res://res/sprites.png
|
||||
README.md::TextFile::-1::1713446079::0::1::::<><>::
|
||||
Tower.gd::GDScript::-1::1713446092::0::1::::<>Node2D<>::
|
||||
Tower.tscn::PackedScene::-1::1713446092::0::1::::<><>::res://Tower.gd<>res://res/sprites.png
|
||||
UI.gd::GDScript::-1::1713446092::0::1::::<>CanvasLayer<>::
|
||||
UI.tscn::PackedScene::-1::1713446092::0::1::::<><>::res://UI.gd
|
||||
::res://readme-assets/::1713437513
|
||||
background-1.png::CompressedTexture2D::6423453728833630028::1713264428::1713437513::1::::<><>::
|
||||
player-1.png::CompressedTexture2D::9154974397462656794::1713264428::1713437513::1::::<><>::
|
||||
sprite-1.png::CompressedTexture2D::8910269976707733444::1713264428::1713437513::1::::<><>::
|
||||
sprite-2.png::CompressedTexture2D::3062909655675356404::1713264428::1713437513::1::::<><>::
|
||||
tower-1.png::CompressedTexture2D::9080617724887454245::1713264428::1713437513::1::::<><>::
|
||||
::res://readme-assets/::1713448657
|
||||
tower-1.png::CompressedTexture2D::3709987194904669892::1713448627::1713448693::1::::<><>::
|
||||
::res://res/::1713437513
|
||||
sprites.png::CompressedTexture2D::1870513174833790166::1713437395::1713437513::1::::<><>::
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 17,
|
||||
"column": 18,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 20,
|
||||
"row": 27,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
|
@ -17,10 +17,10 @@ state={
|
|||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 28,
|
||||
"column": 9,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 37,
|
||||
"row": 52,
|
||||
"scroll_position": 20.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
|
|
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
source_md5="54441de19c1738fa5a755576be9fa57e"
|
||||
dest_md5="64a73d16d979fe187f185da69a187e88"
|
||||
source_md5="15262f7586b21d8ade94936a9eaaabc6"
|
||||
dest_md5="87e4ef4193b1b88aa971812e76502d38"
|
||||
|
||||
|
|
Binary file not shown.
|
@ -31,6 +31,9 @@ func _ready():
|
|||
# Afterwards head over to Player.gd to add the start signal
|
||||
# TODO 2
|
||||
|
||||
# Connect all signals send by the Player scene to the UI scene
|
||||
# TODO 3
|
||||
|
||||
randomize() # Randomize the state of the random generator
|
||||
|
||||
func _on_Tower_exit():
|
||||
|
|
|
@ -49,6 +49,9 @@ func _process(_delta):
|
|||
# Decrease the y speed
|
||||
# TODO 1
|
||||
|
||||
# Emit signal when a pipe is passed
|
||||
# TODO 3
|
||||
|
||||
# Update the position with the new x and y speed
|
||||
position += Vector2(speed, speed_y * speed)
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ When you run the game you should now be able to move the bird.
|
|||
However there's still one issue, the bird goes off screen. We want the camera to follow the bird.
|
||||
We can fix it by adding a `Camera2D` node to the player.
|
||||
|
||||
---
|
||||
|
||||
You should now able to fly!
|
||||
|
||||
### Level generation
|
||||
|
@ -74,6 +76,8 @@ The last step is moving the pipes so a gap is created between them. You should e
|
|||
It's time to add the towers to the game.
|
||||
We want to dynamically load in towers so unfortunately we can't use the same method we used for the player. Head over to the code and follow the instructions, look for TODO 2 comments.
|
||||
|
||||
---
|
||||
|
||||
You should now be able to fly between pipes and get reset when you hit a pipe.
|
||||
|
||||
### Score System
|
||||
|
@ -87,6 +91,16 @@ Give it a `MarginContainer`, inside a `HBoxContainer` and in there 2 labels. `Be
|
|||
|
||||
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.
|
||||
|
||||
#### Main
|
||||
#### Main & Player
|
||||
|
||||
It's time to connect some signals and implement some logic inside `Player.gd` that sends those signals. Head over to the code and look for TODO 3.
|
||||
|
||||
---
|
||||
|
||||
You should now have a fully functioning game.
|
||||
|
||||
### Final cleanups
|
||||
|
||||
Although the game works there are some minor issues.
|
||||
we keep building towers but we never remove them!
|
||||
Remove any tower that is no longer on the screen, this time without Todo's :)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxrtlyfxvqpt1"
|
||||
path="res://.godot/imported/background-1.png-f176f56df8b2d70b3d8f1ba881da37f5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://readme-assets/background-1.png"
|
||||
dest_files=["res://.godot/imported/background-1.png-f176f56df8b2d70b3d8f1ba881da37f5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d3o0dc6sfoxli"
|
||||
path="res://.godot/imported/player-1.png-57c6d98a8919f3bcc9b3f2b22e2ac6a2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://readme-assets/player-1.png"
|
||||
dest_files=["res://.godot/imported/player-1.png-57c6d98a8919f3bcc9b3f2b22e2ac6a2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dy7g3yqp5xefs"
|
||||
path="res://.godot/imported/sprite-1.png-463456e3cff16e9323ba92618d55313c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://readme-assets/sprite-1.png"
|
||||
dest_files=["res://.godot/imported/sprite-1.png-463456e3cff16e9323ba92618d55313c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bjvxw60201r21"
|
||||
path="res://.godot/imported/sprite-2.png-0e8ccef59be13052fd86f78f2194f029.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://readme-assets/sprite-2.png"
|
||||
dest_files=["res://.godot/imported/sprite-2.png-0e8ccef59be13052fd86f78f2194f029.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 20 KiB |
|
@ -2,7 +2,7 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d2myphac7m45v"
|
||||
uid="uid://bs4e7g2n68wl5"
|
||||
path="res://.godot/imported/tower-1.png-e385710469cb7ecf904b7d396c6b7bf7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
|
Loading…
Reference in a new issue