initial commit

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-07-16 13:18:26 -04:00
commit b7928a2af3
51 changed files with 1416 additions and 0 deletions

18
.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
export/*
!export/.gitkeep
# Godot-specific ignores
.import/
export.cfg
export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/
.DS_Store
._.DS_Store
._assets

BIN
assets/._README.md Normal file

Binary file not shown.

BIN
assets/._audio Normal file

Binary file not shown.

BIN
assets/._fonts Normal file

Binary file not shown.

BIN
assets/._images Normal file

Binary file not shown.

10
assets/README.md Normal file
View File

@ -0,0 +1,10 @@
I will be making sequels to this tutorial that build upon what we've made. If you want to be notified when they come out, there will be a form to enter your email at the bottom of the webpage.
The tile set is from the Retro Lines platformer asset pack.
https://v3x3d.itch.io/retro-lines
The font is from fontmeme.com. The font did not come with a license file, but the download page said it was free for personal use.
Thanks for reading!
-Diego (CodingKaiju.com)

BIN
assets/audio/._sfx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/CoinPickup.wav-3f2e95a873f4256ec259307763e96cf4.sample"
[deps]
source_file="res://assets/audio/sfx/CoinPickup.wav"
dest_files=[ "res://.import/CoinPickup.wav-3f2e95a873f4256ec259307763e96cf4.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
assets/audio/sfx/fall.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/fall.wav-979ecacd41ceb47d3795ab2fa8394dfe.sample"
[deps]
source_file="res://assets/audio/sfx/fall.wav"
dest_files=[ "res://.import/fall.wav-979ecacd41ceb47d3795ab2fa8394dfe.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,99 @@
info face="Minecraft" size=16 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=0 aa=1 padding=0,0,0,0 spacing=1,1 outline=0
common lineHeight=16 base=12 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4
page id=0 file="minecraft_0.png"
chars count=95
char id=32 x=71 y=39 width=3 height=1 xoffset=-1 yoffset=15 xadvance=5 page=0 chnl=15
char id=33 x=69 y=26 width=2 height=12 xoffset=0 yoffset=0 xadvance=3 page=0 chnl=15
char id=34 x=0 y=43 width=8 height=6 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=35 x=145 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=36 x=40 y=0 width=8 height=14 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=37 x=71 y=0 width=12 height=12 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15
char id=38 x=156 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=39 x=34 y=42 width=2 height=4 xoffset=0 yoffset=0 xadvance=3 page=0 chnl=15
char id=40 x=50 y=28 width=6 height=12 xoffset=0 yoffset=0 xadvance=7 page=0 chnl=15
char id=41 x=57 y=27 width=6 height=12 xoffset=0 yoffset=0 xadvance=7 page=0 chnl=15
char id=42 x=27 y=42 width=6 height=6 xoffset=0 yoffset=0 xadvance=7 page=0 chnl=15
char id=43 x=219 y=26 width=8 height=8 xoffset=1 yoffset=2 xadvance=10 page=0 chnl=15
char id=44 x=253 y=26 width=2 height=4 xoffset=0 yoffset=10 xadvance=3 page=0 chnl=15
char id=45 x=52 y=41 width=5 height=2 xoffset=0 yoffset=7 xadvance=6 page=0 chnl=15
char id=46 x=58 y=40 width=2 height=2 xoffset=0 yoffset=10 xadvance=3 page=0 chnl=15
char id=47 x=201 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=48 x=237 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=49 x=43 y=29 width=6 height=12 xoffset=0 yoffset=0 xadvance=7 page=0 chnl=15
char id=50 x=183 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=51 x=174 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=52 x=76 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=53 x=11 y=17 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=54 x=136 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=55 x=156 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=56 x=9 y=30 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=57 x=165 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=58 x=204 y=26 width=2 height=9 xoffset=1 yoffset=3 xadvance=4 page=0 chnl=15
char id=59 x=93 y=26 width=2 height=11 xoffset=1 yoffset=3 xadvance=4 page=0 chnl=15
char id=60 x=235 y=26 width=6 height=8 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15
char id=61 x=9 y=43 width=8 height=6 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=62 x=228 y=26 width=6 height=8 xoffset=0 yoffset=2 xadvance=7 page=0 chnl=15
char id=63 x=0 y=30 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=64 x=15 y=0 width=14 height=15 xoffset=0 yoffset=0 xadvance=15 page=0 chnl=15
char id=65 x=86 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=66 x=55 y=14 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=67 x=110 y=0 width=11 height=12 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
char id=68 x=200 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=69 x=44 y=15 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=70 x=106 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=71 x=122 y=0 width=11 height=12 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
char id=72 x=33 y=16 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=73 x=64 y=27 width=4 height=12 xoffset=1 yoffset=0 xadvance=6 page=0 chnl=15
char id=74 x=27 y=29 width=7 height=12 xoffset=0 yoffset=0 xadvance=8 page=0 chnl=15
char id=75 x=116 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=76 x=126 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=77 x=0 y=17 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=78 x=244 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=79 x=84 y=0 width=12 height=12 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15
char id=80 x=178 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=81 x=58 y=0 width=12 height=12 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15
char id=82 x=97 y=0 width=12 height=12 xoffset=0 yoffset=0 xadvance=13 page=0 chnl=15
char id=83 x=146 y=13 width=9 height=12 xoffset=0 yoffset=0 xadvance=10 page=0 chnl=15
char id=84 x=22 y=16 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=85 x=66 y=13 width=9 height=12 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
char id=86 x=222 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=87 x=211 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=88 x=189 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=89 x=167 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=90 x=134 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=91 x=35 y=0 width=4 height=15 xoffset=0 yoffset=0 xadvance=5 page=0 chnl=15
char id=92 x=192 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=93 x=30 y=0 width=4 height=15 xoffset=0 yoffset=0 xadvance=5 page=0 chnl=15
char id=94 x=18 y=43 width=8 height=6 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=95 x=61 y=40 width=9 height=1 xoffset=0 yoffset=11 xadvance=10 page=0 chnl=15
char id=96 x=37 y=42 width=3 height=3 xoffset=1 yoffset=0 xadvance=5 page=0 chnl=15
char id=97 x=149 y=26 width=9 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15
char id=98 x=233 y=0 width=10 height=12 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
char id=99 x=159 y=26 width=9 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15
char id=100 x=18 y=30 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=101 x=169 y=26 width=8 height=9 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=102 x=210 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=103 x=49 y=0 width=8 height=13 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=104 x=219 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=105 x=72 y=26 width=2 height=12 xoffset=0 yoffset=0 xadvance=3 page=0 chnl=15
char id=106 x=35 y=29 width=7 height=12 xoffset=0 yoffset=2 xadvance=8 page=0 chnl=15
char id=107 x=228 y=13 width=8 height=12 xoffset=0 yoffset=0 xadvance=9 page=0 chnl=15
char id=108 x=75 y=26 width=2 height=12 xoffset=0 yoffset=0 xadvance=3 page=0 chnl=15
char id=109 x=124 y=26 width=14 height=9 xoffset=0 yoffset=3 xadvance=15 page=0 chnl=15
char id=110 x=139 y=26 width=9 height=9 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15
char id=111 x=178 y=26 width=8 height=9 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=112 x=96 y=13 width=9 height=12 xoffset=0 yoffset=3 xadvance=10 page=0 chnl=15
char id=113 x=246 y=13 width=8 height=12 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=114 x=196 y=26 width=7 height=9 xoffset=0 yoffset=3 xadvance=8 page=0 chnl=15
char id=115 x=116 y=26 width=7 height=10 xoffset=0 yoffset=2 xadvance=8 page=0 chnl=15
char id=116 x=87 y=26 width=5 height=11 xoffset=0 yoffset=1 xadvance=6 page=0 chnl=15
char id=117 x=187 y=26 width=8 height=9 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=118 x=242 y=26 width=10 height=7 xoffset=0 yoffset=5 xadvance=11 page=0 chnl=15
char id=119 x=207 y=26 width=11 height=8 xoffset=0 yoffset=4 xadvance=12 page=0 chnl=15
char id=120 x=96 y=26 width=10 height=10 xoffset=0 yoffset=2 xadvance=11 page=0 chnl=15
char id=121 x=78 y=26 width=8 height=11 xoffset=0 yoffset=3 xadvance=9 page=0 chnl=15
char id=122 x=107 y=26 width=8 height=10 xoffset=0 yoffset=2 xadvance=9 page=0 chnl=15
char id=123 x=6 y=0 width=5 height=16 xoffset=0 yoffset=0 xadvance=6 page=0 chnl=15
char id=124 x=12 y=0 width=2 height=16 xoffset=0 yoffset=0 xadvance=3 page=0 chnl=15
char id=125 x=0 y=0 width=5 height=16 xoffset=0 yoffset=0 xadvance=6 page=0 chnl=15
char id=126 x=41 y=42 width=10 height=2 xoffset=0 yoffset=5 xadvance=11 page=0 chnl=15

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/minecraft_0.png-3b533350ed5b2ceb97b88df039a9f025.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/fonts/minecraft_0.png"
dest_files=[ "res://.import/minecraft_0.png-3b533350ed5b2ceb97b88df039a9f025.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/minecraft_0.tga-570618e7d56a00e64b943e77a0bcc20a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/fonts/minecraft_0.tga"
dest_files=[ "res://.import/minecraft_0.tga-570618e7d56a00e64b943e77a0bcc20a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

Binary file not shown.

BIN
assets/images/._Coin.png Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Clean-Forest-Retro-Lines.png-5e8556b4f8cb77b929863900264d3a18.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/Clean-Forest-Retro-Lines.png"
dest_files=[ "res://.import/Clean-Forest-Retro-Lines.png-5e8556b4f8cb77b929863900264d3a18.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Clean-Retro-Lines-Player-Plain.png-7c82fc17d88d79db21546081fc832ea6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/Clean-Retro-Lines-Player-Plain.png"
dest_files=[ "res://.import/Clean-Retro-Lines-Player-Plain.png-7c82fc17d88d79db21546081fc832ea6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
assets/images/Coin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Coin.png-5ede123e9ee8fc64881af82535a2342d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/Coin.png"
dest_files=[ "res://.import/Coin.png-5ede123e9ee8fc64881af82535a2342d.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/CoinPickup.png-beeeb38ba1a0b68db26707d1d4005253.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/CoinPickup.png"
dest_files=[ "res://.import/CoinPickup.png-beeeb38ba1a0b68db26707d1d4005253.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/WithinLogo.png-53a09d2da8acbf72fa55a2259c06c7c4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/images/WithinLogo.png"
dest_files=[ "res://.import/WithinLogo.png-53a09d2da8acbf72fa55a2259c06c7c4.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

3
autoloads/Events.gd Normal file
View File

@ -0,0 +1,3 @@
extends Node
signal score_changed(value)

7
default_env.tres Normal file
View File

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

35
icon.png.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

67
levels/Level01.tscn Normal file

File diff suppressed because one or more lines are too long

18
pickups/Coin.gd Normal file
View File

@ -0,0 +1,18 @@
extends Area2D
const score_value = 1
var collected = false
func _on_Coin_body_entered(body):
if collected:
return
$AnimatedSprite.play("pickup")
$AudioStreamPlayer2D.play()
Events.emit_signal("score_changed", score_value)
collected = true
func _on_AudioStreamPlayer2D_finished():
queue_free()

88
pickups/Coin.tscn Normal file
View File

@ -0,0 +1,88 @@
[gd_scene load_steps=19 format=2]
[ext_resource path="res://assets/images/Coin.png" type="Texture" id=1]
[ext_resource path="res://pickups/Coin.gd" type="Script" id=2]
[ext_resource path="res://assets/images/CoinPickup.png" type="Texture" id=3]
[ext_resource path="res://assets/audio/sfx/CoinPickup.wav" type="AudioStream" id=4]
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 3 )
region = Rect2( 8, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 3 )
region = Rect2( 16, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=12]
atlas = ExtResource( 3 )
region = Rect2( 24, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 3 )
region = Rect2( 32, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 3 )
region = Rect2( 40, 0, 8, 24 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 8, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 16, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 24, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 32, 0, 8, 8 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 40, 0, 8, 8 )
[sub_resource type="SpriteFrames" id=7]
animations = [ {
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ) ],
"loop": false,
"name": "pickup",
"speed": 12.0
}, {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "spin",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 4, 4 )
[node name="Coin" type="Area2D"]
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 7 )
animation = "spin"
frame = 1
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 8 )
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 4 )
[connection signal="body_entered" from="." to="." method="_on_Coin_body_entered"]
[connection signal="finished" from="AudioStreamPlayer2D" to="." method="_on_AudioStreamPlayer2D_finished"]

11
player/Pit.gd Normal file
View File

@ -0,0 +1,11 @@
extends Area2D
func _on_Pit_body_entered(body):
print("player fell down pit")
$AudioStreamPlayer2D.play()
func _on_AudioStreamPlayer2D_finished():
get_tree().change_scene("res://ui/GameOverScreen.tscn")

20
player/Pit.tscn Normal file
View File

@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://player/Pit.gd" type="Script" id=1]
[ext_resource path="res://assets/audio/sfx/fall.wav" type="AudioStream" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 30, 10 )
[node name="Pit" type="Area2D"]
position = Vector2( 293, 580 )
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 2 )
[connection signal="body_entered" from="." to="." method="_on_Pit_body_entered"]
[connection signal="finished" from="AudioStreamPlayer2D" to="." method="_on_AudioStreamPlayer2D_finished"]

49
player/Player.gd Normal file
View File

@ -0,0 +1,49 @@
extends KinematicBody2D
export var move_speed := 100
export var gravity := 2000
export var jump_speed := 550
var velocity := Vector2.ZERO
func change_animation():
if velocity.x > 0:
# right
$AnimatedSprite.flip_h = false
elif velocity.x < 0:
# left
$AnimatedSprite.flip_h = true
# jumping
if velocity.y < 0:
$AnimatedSprite.play("jump")
else:
if velocity.x != 0:
$AnimatedSprite.play("walk")
else:
$AnimatedSprite.play("idle")
func _process(delta: float) -> void:
change_animation()
func _physics_process(delta: float) -> void:
# reset motion
velocity.x = 0
# movement
if Input.is_action_pressed("move_right"):
velocity.x += move_speed
if Input.is_action_pressed("move_left"):
velocity.x -= move_speed
# gravity
velocity.y += gravity * delta
# Apply jump to next frame
if Input.is_action_just_pressed("jump"):
if is_on_floor():
# negative y is up
velocity.y -= jump_speed
# move the heccin boi
velocity = move_and_slide(velocity, Vector2.UP)

76
player/Player.tscn Normal file
View File

@ -0,0 +1,76 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://assets/images/Clean-Retro-Lines-Player-Plain.png" type="Texture" id=1]
[ext_resource path="res://player/Player.gd" type="Script" id=2]
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 0, 16, 16, 16 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 16, 16, 16, 16 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 16, 32, 16, 16 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 16, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 32, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 48, 0, 16, 16 )
[sub_resource type="SpriteFrames" id=8]
animations = [ {
"frames": [ SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "idle",
"speed": 2.0
}, {
"frames": [ SubResource( 7 ) ],
"loop": true,
"name": "jump",
"speed": 5.0
}, {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "walk",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 4, 7 )
[node name="Player" type="KinematicBody2D"]
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 8 )
animation = "idle"
frame = 1
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -1, 1 )
shape = SubResource( 9 )
[node name="Camera2D" type="Camera2D" parent="."]
current = true
drag_margin_h_enabled = true
drag_margin_v_enabled = true
drag_margin_left = 0.15
drag_margin_top = 0.5
drag_margin_right = 0.15
drag_margin_bottom = 0.5
editor_draw_drag_margin = true

90
project.godot Normal file
View File

@ -0,0 +1,90 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
[application]
config/name="Retro Platformer"
run/main_scene="res://levels/Level01.tscn"
boot_splash/image="res://assets/images/WithinLogo.png"
boot_splash/fullsize=false
boot_splash/use_filter=false
config/icon="res://icon.png"
[autoload]
Events="*res://autoloads/Events.gd"
[display]
window/size/width=480
window/size/height=270
window/size/test_width=960
window/size/test_height=540
window/stretch/mode="viewport"
window/stretch/aspect="keep"
[importer_defaults]
texture={
"compress/bptc_ldr": 0,
"compress/hdr_mode": 0,
"compress/lossy_quality": 0.7,
"compress/mode": 0,
"compress/normal_map": 0,
"detect_3d": false,
"flags/anisotropic": false,
"flags/filter": false,
"flags/mipmaps": false,
"flags/repeat": 0,
"flags/srgb": 2,
"process/HDR_as_SRGB": false,
"process/fix_alpha_border": true,
"process/invert_color": false,
"process/normal_map_invert_y": false,
"process/premult_alpha": false,
"size_limit": 0,
"stream": false,
"svg/scale": 1.0
}
[input]
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
}
jump={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}
[physics]
common/enable_pause_aware_picking=true
[rendering]
quality/driver/driver_name="GLES2"
2d/snapping/use_gpu_pixel_snap=true
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_clear_color=Color( 0.164706, 0.164706, 0.164706, 1 )
environment/default_environment="res://default_env.tres"

406
tilesets/Green.tres Normal file
View File

@ -0,0 +1,406 @@
[gd_resource type="TileSet" load_steps=19 format=2]
[ext_resource path="res://assets/images/Clean-Forest-Retro-Lines.png" type="Texture" id=1]
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=2]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=5]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=8]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=9]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=11]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=12]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=13]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=14]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=15]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=16]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=17]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[resource]
0/name = "Ground"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 80, 112 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 256, Vector2( 0, 1 ), 260, Vector2( 0, 2 ), 260, Vector2( 0, 3 ), 260, Vector2( 0, 4 ), 4, Vector2( 0, 5 ), 69, Vector2( 0, 6 ), 321, Vector2( 1, 0 ), 320, Vector2( 1, 4 ), 5, Vector2( 1, 5 ), 261, Vector2( 1, 6 ), 324, Vector2( 2, 0 ), 320, Vector2( 2, 4 ), 5, Vector2( 3, 0 ), 320, Vector2( 3, 1 ), 325, Vector2( 3, 4 ), 5, Vector2( 4, 0 ), 64, Vector2( 4, 1 ), 65, Vector2( 4, 2 ), 65, Vector2( 4, 3 ), 65, Vector2( 4, 4 ), 1 ]
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 16, 16 )
0/autotile/spacing = 0
0/autotile/occluder_map = [ ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ ]
0/autotile/z_index_map = [ ]
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = SubResource( 1 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 1 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 2 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 6 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 3 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 8 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 4 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 9 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 4 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 10 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 4 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 11 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 4 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 12 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 4 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 13 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 3 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 14 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 15 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 16 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 5 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 17 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
0/z_index = 0
1/name = "grass"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 32, 80, 96, 32 )
1/tile_mode = 2
1/autotile/icon_coordinate = Vector2( 0, 0 )
1/autotile/tile_size = Vector2( 16, 16 )
1/autotile/spacing = 0
1/autotile/occluder_map = [ ]
1/autotile/navpoly_map = [ ]
1/autotile/priority_map = [ ]
1/autotile/z_index_map = [ ]
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape_one_way = false
1/shape_one_way_margin = 0.0
1/shapes = [ ]
1/z_index = 0
2/name = "plants"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 128, 96, 112, 16 )
2/tile_mode = 2
2/autotile/icon_coordinate = Vector2( 0, 0 )
2/autotile/tile_size = Vector2( 16, 16 )
2/autotile/spacing = 0
2/autotile/occluder_map = [ ]
2/autotile/navpoly_map = [ ]
2/autotile/priority_map = [ ]
2/autotile/z_index_map = [ ]
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape_one_way = false
2/shape_one_way_margin = 0.0
2/shapes = [ ]
2/z_index = 0
3/name = "water"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 80, 16, 16, 64 )
3/tile_mode = 2
3/autotile/icon_coordinate = Vector2( 0, 0 )
3/autotile/tile_size = Vector2( 16, 16 )
3/autotile/spacing = 0
3/autotile/occluder_map = [ ]
3/autotile/navpoly_map = [ ]
3/autotile/priority_map = [ ]
3/autotile/z_index_map = [ ]
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape_one_way = false
3/shape_one_way_margin = 0.0
3/shapes = [ ]
3/z_index = 0
4/name = "stones"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 96, 16, 32, 64 )
4/tile_mode = 2
4/autotile/icon_coordinate = Vector2( 0, 0 )
4/autotile/tile_size = Vector2( 16, 16 )
4/autotile/spacing = 0
4/autotile/occluder_map = [ ]
4/autotile/navpoly_map = [ ]
4/autotile/priority_map = [ ]
4/autotile/z_index_map = [ ]
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shape_offset = Vector2( 0, 0 )
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
4/shape_one_way = false
4/shape_one_way_margin = 0.0
4/shapes = [ ]
4/z_index = 0
5/name = "tree trunks"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 128, 16, 64, 64 )
5/tile_mode = 2
5/autotile/icon_coordinate = Vector2( 0, 0 )
5/autotile/tile_size = Vector2( 16, 16 )
5/autotile/spacing = 0
5/autotile/occluder_map = [ ]
5/autotile/navpoly_map = [ ]
5/autotile/priority_map = [ ]
5/autotile/z_index_map = [ ]
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape_one_way = false
5/shape_one_way_margin = 0.0
5/shapes = [ ]
5/z_index = 0
6/name = "tree base"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 128, 80, 64, 16 )
6/tile_mode = 2
6/autotile/icon_coordinate = Vector2( 0, 0 )
6/autotile/tile_size = Vector2( 16, 16 )
6/autotile/spacing = 0
6/autotile/occluder_map = [ ]
6/autotile/navpoly_map = [ ]
6/autotile/priority_map = [ ]
6/autotile/z_index_map = [ ]
6/occluder_offset = Vector2( 0, 0 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape_one_way = false
6/shape_one_way_margin = 0.0
6/shapes = [ ]
6/z_index = 0
7/name = "cloud1"
7/texture = ExtResource( 1 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 80, 0, 16, 16 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape_one_way = false
7/shape_one_way_margin = 0.0
7/shapes = [ ]
7/z_index = 0
8/name = "cloud2"
8/texture = ExtResource( 1 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 96, 0, 32, 16 )
8/tile_mode = 0
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape_one_way = false
8/shape_one_way_margin = 0.0
8/shapes = [ ]
8/z_index = 0
9/name = "cloud3"
9/texture = ExtResource( 1 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 128, 0, 32, 16 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape_one_way = false
9/shape_one_way_margin = 0.0
9/shapes = [ ]
9/z_index = 0
10/name = "cloud4"
10/texture = ExtResource( 1 )
10/tex_offset = Vector2( 0, 0 )
10/modulate = Color( 1, 1, 1, 1 )
10/region = Rect2( 160, 0, 32, 16 )
10/tile_mode = 0
10/occluder_offset = Vector2( 0, 0 )
10/navigation_offset = Vector2( 0, 0 )
10/shape_offset = Vector2( 0, 0 )
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
10/shape_one_way = false
10/shape_one_way_margin = 0.0
10/shapes = [ ]
10/z_index = 0
11/name = "tree1"
11/texture = ExtResource( 1 )
11/tex_offset = Vector2( 0, 0 )
11/modulate = Color( 1, 1, 1, 1 )
11/region = Rect2( 192, 0, 48, 48 )
11/tile_mode = 0
11/occluder_offset = Vector2( 0, 0 )
11/navigation_offset = Vector2( 0, 0 )
11/shape_offset = Vector2( 0, 0 )
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
11/shape_one_way = false
11/shape_one_way_margin = 0.0
11/shapes = [ ]
11/z_index = 0
12/name = "tree2"
12/texture = ExtResource( 1 )
12/tex_offset = Vector2( 0, 0 )
12/modulate = Color( 1, 1, 1, 1 )
12/region = Rect2( 192, 48, 48, 48 )
12/tile_mode = 0
12/occluder_offset = Vector2( 0, 0 )
12/navigation_offset = Vector2( 0, 0 )
12/shape_offset = Vector2( 0, 0 )
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
12/shape_one_way = false
12/shape_one_way_margin = 0.0
12/shapes = [ ]
12/z_index = 0
13/name = "moon"
13/texture = ExtResource( 1 )
13/tex_offset = Vector2( 0, 0 )
13/modulate = Color( 1, 1, 1, 1 )
13/region = Rect2( 16, 16, 32, 48 )
13/tile_mode = 0
13/occluder_offset = Vector2( 0, 0 )
13/navigation_offset = Vector2( 0, 0 )
13/shape_offset = Vector2( 0, 0 )
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
13/shape_one_way = false
13/shape_one_way_margin = 0.0
13/shapes = [ ]
13/z_index = 0

9
ui/GameOverScreen.gd Normal file
View File

@ -0,0 +1,9 @@
extends CanvasLayer
func _on_Restart_pressed():
get_tree().change_scene("res://levels/Level01.tscn")
func _on_Quit_pressed():
get_tree().quit()

68
ui/GameOverScreen.tscn Normal file
View File

@ -0,0 +1,68 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://assets/fonts/minecraft.fnt" type="BitmapFont" id=1]
[ext_resource path="res://ui/GameOverScreen.gd" type="Script" id=2]
[ext_resource path="res://ui/HUD.tscn" type="PackedScene" id=3]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.113725, 0.0901961, 0.0901961, 1 )
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color( 0.247059, 0.247059, 0.247059, 1 )
shadow_color = Color( 1, 1, 1, 0.6 )
shadow_size = 5
[node name="GameOverScreen" type="CanvasLayer"]
script = ExtResource( 2 )
[node name="HUD" parent="." instance=ExtResource( 3 )]
[node name="Panel" type="Panel" parent="."]
margin_left = 140.0
margin_top = 87.5
margin_right = 140.0
margin_bottom = 87.5
custom_styles/panel = SubResource( 1 )
[node name="MarginContainer" type="MarginContainer" parent="Panel"]
anchor_left = 0.25
anchor_top = 0.25
anchor_right = 0.25
anchor_bottom = 0.25
[node name="Rows" type="VBoxContainer" parent="Panel/MarginContainer"]
margin_right = 72.0
margin_bottom = 68.0
[node name="Title" type="Label" parent="Panel/MarginContainer/Rows"]
margin_right = 72.0
margin_bottom = 16.0
custom_fonts/font = ExtResource( 1 )
text = "Ded"
[node name="CenterContainer" type="CenterContainer" parent="Panel/MarginContainer/Rows"]
margin_top = 20.0
margin_right = 72.0
margin_bottom = 68.0
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer/Rows/CenterContainer"]
margin_right = 72.0
margin_bottom = 48.0
[node name="Restart" type="Button" parent="Panel/MarginContainer/Rows/CenterContainer/VBoxContainer"]
margin_right = 72.0
margin_bottom = 22.0
custom_fonts/font = ExtResource( 1 )
text = "Restart"
[node name="Quit" type="Button" parent="Panel/MarginContainer/Rows/CenterContainer/VBoxContainer"]
margin_top = 26.0
margin_right = 72.0
margin_bottom = 48.0
custom_fonts/font = ExtResource( 1 )
text = "Quit"
[connection signal="pressed" from="Panel/MarginContainer/Rows/CenterContainer/VBoxContainer/Restart" to="." method="_on_Restart_pressed"]
[connection signal="pressed" from="Panel/MarginContainer/Rows/CenterContainer/VBoxContainer/Quit" to="." method="_on_Quit_pressed"]

24
ui/HUD.gd Normal file
View File

@ -0,0 +1,24 @@
extends Control
onready var label = $MarginContainer/VBoxContainer/HBoxContainer/ScoreLabel
var score = 0
func _ready() -> void:
label.text = str(score)
func _enter_tree() -> void:
Events.connect("score_changed", self, "_on_score_changed")
func _exit_tree() -> void:
Events.disconnect("score_changed", self, "_on_score_changed")
func _on_score_changed(value):
score += value
label.text = str(score)

31
ui/HUD.tscn Normal file
View File

@ -0,0 +1,31 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://assets/fonts/minecraft.fnt" type="BitmapFont" id=1]
[ext_resource path="res://ui/HUD.gd" type="Script" id=2]
[node name="HUD" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
[node name="MarginContainer" type="MarginContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 10.0
margin_top = 10.0
margin_right = -10.0
margin_bottom = -10.0
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
margin_right = 460.0
margin_bottom = 250.0
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
margin_right = 460.0
margin_bottom = 16.0
[node name="ScoreLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
margin_right = 9.0
margin_bottom = 16.0
custom_fonts/font = ExtResource( 1 )
text = "0"