commit b7928a2af3112ac19a192c933c02793e97eb7dd9 Author: Christine Dodrill Date: Sat Jul 16 13:18:26 2022 -0400 initial commit Signed-off-by: Christine Dodrill diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a7f81d1 --- /dev/null +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/assets/._README.md b/assets/._README.md new file mode 100644 index 0000000..64f66ca Binary files /dev/null and b/assets/._README.md differ diff --git a/assets/._audio b/assets/._audio new file mode 100644 index 0000000..4901696 Binary files /dev/null and b/assets/._audio differ diff --git a/assets/._fonts b/assets/._fonts new file mode 100644 index 0000000..4414335 Binary files /dev/null and b/assets/._fonts differ diff --git a/assets/._images b/assets/._images new file mode 100644 index 0000000..dfe7e03 Binary files /dev/null and b/assets/._images differ diff --git a/assets/README.md b/assets/README.md new file mode 100644 index 0000000..3ffb92a --- /dev/null +++ b/assets/README.md @@ -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) \ No newline at end of file diff --git a/assets/audio/._sfx b/assets/audio/._sfx new file mode 100644 index 0000000..cb15f42 Binary files /dev/null and b/assets/audio/._sfx differ diff --git a/assets/audio/sfx/._CoinPickup.wav b/assets/audio/sfx/._CoinPickup.wav new file mode 100644 index 0000000..60dc052 Binary files /dev/null and b/assets/audio/sfx/._CoinPickup.wav differ diff --git a/assets/audio/sfx/CoinPickup.wav b/assets/audio/sfx/CoinPickup.wav new file mode 100644 index 0000000..b227c7a Binary files /dev/null and b/assets/audio/sfx/CoinPickup.wav differ diff --git a/assets/audio/sfx/CoinPickup.wav.import b/assets/audio/sfx/CoinPickup.wav.import new file mode 100644 index 0000000..515dfc0 --- /dev/null +++ b/assets/audio/sfx/CoinPickup.wav.import @@ -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 diff --git a/assets/audio/sfx/fall.wav b/assets/audio/sfx/fall.wav new file mode 100644 index 0000000..a830226 Binary files /dev/null and b/assets/audio/sfx/fall.wav differ diff --git a/assets/audio/sfx/fall.wav.import b/assets/audio/sfx/fall.wav.import new file mode 100644 index 0000000..76278a3 --- /dev/null +++ b/assets/audio/sfx/fall.wav.import @@ -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 diff --git a/assets/fonts/._minecraft.fnt b/assets/fonts/._minecraft.fnt new file mode 100644 index 0000000..52502e0 Binary files /dev/null and b/assets/fonts/._minecraft.fnt differ diff --git a/assets/fonts/._minecraft_0.png b/assets/fonts/._minecraft_0.png new file mode 100644 index 0000000..8f3d076 Binary files /dev/null and b/assets/fonts/._minecraft_0.png differ diff --git a/assets/fonts/._minecraft_0.tga b/assets/fonts/._minecraft_0.tga new file mode 100644 index 0000000..b26939d Binary files /dev/null and b/assets/fonts/._minecraft_0.tga differ diff --git a/assets/fonts/minecraft.fnt b/assets/fonts/minecraft.fnt new file mode 100644 index 0000000..2f6a598 --- /dev/null +++ b/assets/fonts/minecraft.fnt @@ -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 diff --git a/assets/fonts/minecraft_0.png b/assets/fonts/minecraft_0.png new file mode 100644 index 0000000..727bcd5 Binary files /dev/null and b/assets/fonts/minecraft_0.png differ diff --git a/assets/fonts/minecraft_0.png.import b/assets/fonts/minecraft_0.png.import new file mode 100644 index 0000000..c2c401f --- /dev/null +++ b/assets/fonts/minecraft_0.png.import @@ -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 diff --git a/assets/fonts/minecraft_0.tga b/assets/fonts/minecraft_0.tga new file mode 100644 index 0000000..364fa6e Binary files /dev/null and b/assets/fonts/minecraft_0.tga differ diff --git a/assets/fonts/minecraft_0.tga.import b/assets/fonts/minecraft_0.tga.import new file mode 100644 index 0000000..a6f14ed --- /dev/null +++ b/assets/fonts/minecraft_0.tga.import @@ -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 diff --git a/assets/images/._Clean-Forest-Retro-Lines.png b/assets/images/._Clean-Forest-Retro-Lines.png new file mode 100644 index 0000000..10026f6 Binary files /dev/null and b/assets/images/._Clean-Forest-Retro-Lines.png differ diff --git a/assets/images/._Clean-Retro-Lines-Player-Plain.png b/assets/images/._Clean-Retro-Lines-Player-Plain.png new file mode 100644 index 0000000..b4f78bc Binary files /dev/null and b/assets/images/._Clean-Retro-Lines-Player-Plain.png differ diff --git a/assets/images/._Coin.png b/assets/images/._Coin.png new file mode 100644 index 0000000..f71147e Binary files /dev/null and b/assets/images/._Coin.png differ diff --git a/assets/images/._CoinPickup.png b/assets/images/._CoinPickup.png new file mode 100644 index 0000000..bae53d8 Binary files /dev/null and b/assets/images/._CoinPickup.png differ diff --git a/assets/images/Clean-Forest-Retro-Lines.png b/assets/images/Clean-Forest-Retro-Lines.png new file mode 100644 index 0000000..909af93 Binary files /dev/null and b/assets/images/Clean-Forest-Retro-Lines.png differ diff --git a/assets/images/Clean-Forest-Retro-Lines.png.import b/assets/images/Clean-Forest-Retro-Lines.png.import new file mode 100644 index 0000000..11e453a --- /dev/null +++ b/assets/images/Clean-Forest-Retro-Lines.png.import @@ -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 diff --git a/assets/images/Clean-Retro-Lines-Player-Plain.png b/assets/images/Clean-Retro-Lines-Player-Plain.png new file mode 100644 index 0000000..477c1ea Binary files /dev/null and b/assets/images/Clean-Retro-Lines-Player-Plain.png differ diff --git a/assets/images/Clean-Retro-Lines-Player-Plain.png.import b/assets/images/Clean-Retro-Lines-Player-Plain.png.import new file mode 100644 index 0000000..6e1e305 --- /dev/null +++ b/assets/images/Clean-Retro-Lines-Player-Plain.png.import @@ -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 diff --git a/assets/images/Coin.png b/assets/images/Coin.png new file mode 100644 index 0000000..013e2c8 Binary files /dev/null and b/assets/images/Coin.png differ diff --git a/assets/images/Coin.png.import b/assets/images/Coin.png.import new file mode 100644 index 0000000..228405b --- /dev/null +++ b/assets/images/Coin.png.import @@ -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 diff --git a/assets/images/CoinPickup.png b/assets/images/CoinPickup.png new file mode 100644 index 0000000..b1b47ba Binary files /dev/null and b/assets/images/CoinPickup.png differ diff --git a/assets/images/CoinPickup.png.import b/assets/images/CoinPickup.png.import new file mode 100644 index 0000000..d42ab6c --- /dev/null +++ b/assets/images/CoinPickup.png.import @@ -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 diff --git a/assets/images/WithinLogo.png b/assets/images/WithinLogo.png new file mode 100644 index 0000000..803b5bf Binary files /dev/null and b/assets/images/WithinLogo.png differ diff --git a/assets/images/WithinLogo.png.import b/assets/images/WithinLogo.png.import new file mode 100644 index 0000000..48053f8 --- /dev/null +++ b/assets/images/WithinLogo.png.import @@ -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 diff --git a/autoloads/Events.gd b/autoloads/Events.gd new file mode 100644 index 0000000..31a923f --- /dev/null +++ b/autoloads/Events.gd @@ -0,0 +1,3 @@ +extends Node + +signal score_changed(value) diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -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 ) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..a4c02e6 --- /dev/null +++ b/icon.png.import @@ -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 diff --git a/levels/Level01.tscn b/levels/Level01.tscn new file mode 100644 index 0000000..1395427 --- /dev/null +++ b/levels/Level01.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://tilesets/Green.tres" type="TileSet" id=1] +[ext_resource path="res://player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://pickups/Coin.tscn" type="PackedScene" id=3] +[ext_resource path="res://ui/HUD.tscn" type="PackedScene" id=4] +[ext_resource path="res://player/Pit.tscn" type="PackedScene" id=5] + +[node name="Level01" type="Node2D"] + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="HUD" parent="CanvasLayer" instance=ExtResource( 4 )] + +[node name="DetailTileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 16, 16 ) +format = 1 +tile_data = PoolIntArray( 131078, 7, 0, 262164, 10, 0, 262178, 11, 0, 393218, 8, 0, 458763, 12, 0, 458787, 5, 131072, 524288, 2, 6, 524290, 1, 1, 524321, 1, 65540, 524323, 6, 3, 524324, 1, 65540, 655359, 3, 0, 589840, 9, 0, 589843, 13, 0, 655372, 5, 65536, 720908, 5, 196611, 720918, 11, 0, 786443, 1, 65539, 786444, 6, 0, 786445, 1, 65541, 786451, 5, 131073, 851974, 1, 4, 851976, 2, 5, 851977, 1, 0, 851987, 5, 196609, 851994, 1, 65537, 851996, 2, 4, 851997, 4, 196609, 917523, 5, 131072, 917527, 5, 196611, 983043, 4, 196609, 983044, 4, 1, 983045, 4, 0, 983056, 1, 65539, 983057, 1, 65538, 983058, 1, 65537, 983059, 6, 1, 983060, 1, 65540, 983061, 2, 2, 983062, 1, 1, 983063, 6, 2, 983064, 1, 3, 983065, 1, 2, 1310743, 7, 0, 1376261, 8, 0, 1507334, 1, 5, 1507336, 4, 65536, 1507338, 1, 65540, 1507342, 1, 3, 1507345, 1, 65540, 1507349, 4, 196609, 1507352, 1, 65538, 1507354, 2, 4, 1507358, 1, 65541, 1835017, 10, 0, 1835041, 8, 0, 2031617, 2, 1, 2031621, 1, 65540, 2031622, 4, 65536, 2031625, 4, 65536, 2031628, 1, 65538, 2031640, 4, 65536, 2031642, 1, 65536, 2031645, 2, 1, 2031651, 4, 65536, 2031653, 1, 65538, 2097170, 3, 131072, 2097171, 3, 131072 ) + +[node name="MainTileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 16, 16 ) +format = 1 +tile_data = PoolIntArray( 131068, 0, 0, 131069, 0, 1, 131070, 0, 4, 196604, 0, 131072, 196605, 0, 65539, 196606, 0, 196612, 262140, 0, 131072, 262141, 0, 65539, 262142, 0, 196612, 327676, 0, 65536, 327677, 0, 65539, 327678, 0, 196612, 393212, 0, 65536, 393213, 0, 65539, 393214, 0, 65540, 458748, 0, 196608, 458749, 0, 65539, 458750, 0, 131076, 524284, 0, 131072, 524285, 0, 65539, 524286, 0, 196612, 589820, 0, 196608, 589821, 0, 65539, 589822, 0, 65540, 655356, 0, 131072, 655357, 0, 65539, 655358, 0, 65540, 589824, 0, 0, 589825, 0, 2, 589826, 0, 4, 589857, 0, 0, 589858, 0, 3, 589859, 0, 3, 589860, 0, 2, 589861, 0, 4, 720892, 0, 131072, 720893, 0, 65539, 720894, 0, 393216, 720895, 0, 2, 655360, 0, 393217, 655361, 0, 65539, 655362, 0, 65540, 655393, 0, 196608, 655394, 0, 65539, 655395, 0, 65539, 655396, 0, 65539, 655397, 0, 131076, 786428, 0, 65536, 786429, 0, 65539, 786430, 0, 65539, 786431, 0, 65539, 720896, 0, 65539, 720897, 0, 65539, 720898, 0, 65540, 720929, 0, 196608, 720930, 0, 65539, 720931, 0, 65539, 720932, 0, 65539, 720933, 0, 196612, 851964, 0, 65536, 851965, 0, 65539, 851966, 0, 65539, 851967, 0, 65539, 786432, 0, 65539, 786433, 0, 65539, 786434, 0, 65540, 786465, 0, 196608, 786466, 0, 65539, 786467, 0, 65539, 786468, 0, 65539, 786469, 0, 196612, 917500, 0, 131072, 917501, 0, 65539, 917502, 0, 65539, 917503, 0, 65539, 851968, 0, 65539, 851969, 0, 65539, 851970, 0, 65540, 851978, 0, 0, 851979, 0, 2, 851980, 0, 3, 851981, 0, 1, 851982, 0, 4, 852001, 0, 131072, 852002, 0, 65539, 852003, 0, 65539, 852004, 0, 65539, 852005, 0, 196612, 983036, 0, 196608, 983037, 0, 65539, 983038, 0, 65539, 983039, 0, 65539, 917504, 0, 65539, 917505, 0, 65539, 917506, 0, 131076, 917510, 0, 0, 917511, 0, 2, 917512, 0, 1, 917513, 0, 3, 917514, 0, 393217, 917515, 0, 65539, 917516, 0, 65539, 917517, 0, 65539, 917518, 0, 65540, 917530, 0, 0, 917531, 0, 2, 917532, 0, 1, 917533, 0, 4, 917537, 0, 131072, 917538, 0, 65539, 917539, 0, 65539, 917540, 0, 65539, 917541, 0, 131076, 1048572, 0, 196608, 1048573, 0, 65539, 1048574, 0, 65539, 1048575, 0, 65539, 983040, 0, 65539, 983041, 0, 65539, 983042, 0, 196612, 983046, 0, 65536, 983047, 0, 65539, 983048, 0, 65539, 983049, 0, 65539, 983050, 0, 65539, 983051, 0, 65539, 983052, 0, 65539, 983053, 0, 65539, 983054, 0, 131076, 983066, 0, 196608, 983067, 0, 65539, 983068, 0, 65539, 983069, 0, 65540, 983073, 0, 196608, 983074, 0, 65539, 983075, 0, 65539, 983076, 0, 65539, 983077, 0, 196612, 1114108, 0, 131072, 1114109, 0, 65539, 1114110, 0, 65539, 1114111, 0, 65539, 1048576, 0, 65539, 1048577, 0, 65539, 1048578, 0, 393216, 1048579, 0, 3, 1048580, 0, 2, 1048581, 0, 2, 1048582, 0, 393217, 1048583, 0, 65539, 1048584, 0, 65539, 1048585, 0, 65539, 1048586, 0, 65539, 1048587, 0, 65539, 1048588, 0, 65539, 1048589, 0, 65539, 1048590, 0, 393216, 1048591, 0, 3, 1048592, 0, 3, 1048593, 0, 1, 1048594, 0, 2, 1048595, 0, 2, 1048596, 0, 2, 1048597, 0, 3, 1048598, 0, 3, 1048599, 0, 1, 1048600, 0, 2, 1048601, 0, 1, 1048602, 0, 393217, 1048603, 0, 65539, 1048604, 0, 65539, 1048605, 0, 65540, 1048609, 0, 65536, 1048610, 0, 65539, 1048611, 0, 65539, 1048612, 0, 65539, 1048613, 0, 196612, 1179644, 0, 262144, 1179645, 0, 327681, 1179646, 0, 65539, 1179647, 0, 65539, 1114112, 0, 65539, 1114113, 0, 65539, 1114114, 0, 65539, 1114115, 0, 65539, 1114116, 0, 65539, 1114117, 0, 65539, 1114118, 0, 65539, 1114119, 0, 65539, 1114120, 0, 65539, 1114121, 0, 65539, 1114122, 0, 65539, 1114123, 0, 65539, 1114124, 0, 65539, 1114125, 0, 65539, 1114126, 0, 65539, 1114127, 0, 65539, 1114128, 0, 65539, 1114129, 0, 65539, 1114130, 0, 65539, 1114131, 0, 65539, 1114132, 0, 65539, 1114133, 0, 65539, 1114134, 0, 65539, 1114135, 0, 65539, 1114136, 0, 65539, 1114137, 0, 65539, 1114138, 0, 65539, 1114139, 0, 65539, 1114140, 0, 65539, 1114141, 0, 131076, 1114145, 0, 131072, 1114146, 0, 65539, 1114147, 0, 65539, 1114148, 0, 65539, 1114149, 0, 131076, 1245181, 0, 196608, 1245182, 0, 65539, 1245183, 0, 65539, 1179648, 0, 65539, 1179649, 0, 327680, 1179650, 0, 262147, 1179651, 0, 262146, 1179652, 0, 262146, 1179653, 0, 262147, 1179654, 0, 262147, 1179655, 0, 262147, 1179656, 0, 262145, 1179657, 0, 262146, 1179658, 0, 262147, 1179659, 0, 262147, 1179660, 0, 262146, 1179661, 0, 262146, 1179662, 0, 262146, 1179663, 0, 262145, 1179664, 0, 262147, 1179665, 0, 262147, 1179666, 0, 262145, 1179667, 0, 262146, 1179668, 0, 262145, 1179669, 0, 262146, 1179670, 0, 262146, 1179671, 0, 262146, 1179672, 0, 262145, 1179673, 0, 262145, 1179674, 0, 262146, 1179675, 0, 262146, 1179676, 0, 262145, 1179677, 0, 262148, 1179681, 0, 196608, 1179682, 0, 65539, 1179683, 0, 65539, 1179684, 0, 65539, 1179685, 0, 196612, 1310717, 0, 65536, 1310718, 0, 65539, 1310719, 0, 65539, 1245184, 0, 327680, 1245185, 0, 262148, 1245217, 0, 65536, 1245218, 0, 65539, 1245219, 0, 65539, 1245220, 0, 65539, 1245221, 0, 65540, 1376253, 0, 131072, 1376254, 0, 65539, 1376255, 0, 65539, 1310720, 0, 131076, 1310753, 0, 65536, 1310754, 0, 65539, 1310755, 0, 65539, 1310756, 0, 65539, 1310757, 0, 65540, 1441789, 0, 65536, 1441790, 0, 65539, 1441791, 0, 65539, 1376256, 0, 196612, 1376289, 0, 131072, 1376290, 0, 65539, 1376291, 0, 65539, 1376292, 0, 65539, 1376293, 0, 196612, 1507325, 0, 196608, 1507326, 0, 65539, 1507327, 0, 65539, 1441792, 0, 131076, 1441810, 0, 65539, 1441825, 0, 65536, 1441826, 0, 65539, 1441827, 0, 65539, 1441828, 0, 65539, 1441829, 0, 65540, 1572861, 0, 65536, 1572862, 0, 65539, 1572863, 0, 65539, 1507328, 0, 196612, 1507361, 0, 131072, 1507362, 0, 65539, 1507363, 0, 65539, 1507364, 0, 65539, 1507365, 0, 65540, 1638397, 0, 131072, 1638398, 0, 65539, 1638399, 0, 65539, 1572864, 0, 196612, 1572868, 0, 0, 1572869, 0, 1, 1572870, 0, 2, 1572871, 0, 1, 1572872, 0, 2, 1572873, 0, 1, 1572874, 0, 3, 1572875, 0, 3, 1572876, 0, 3, 1572877, 0, 1, 1572878, 0, 3, 1572879, 0, 1, 1572880, 0, 1, 1572881, 0, 4, 1572884, 0, 0, 1572885, 0, 1, 1572886, 0, 3, 1572887, 0, 1, 1572888, 0, 2, 1572889, 0, 2, 1572890, 0, 1, 1572891, 0, 2, 1572892, 0, 3, 1572893, 0, 1, 1572894, 0, 1, 1572895, 0, 3, 1572896, 0, 3, 1572897, 0, 393217, 1572898, 0, 65539, 1572899, 0, 65539, 1572900, 0, 65539, 1572901, 0, 65540, 1703933, 0, 131072, 1703934, 0, 65539, 1703935, 0, 65539, 1638400, 0, 131076, 1638404, 0, 65536, 1638405, 0, 65539, 1638406, 0, 65539, 1638407, 0, 65539, 1638408, 0, 65539, 1638409, 0, 65539, 1638410, 0, 65539, 1638411, 0, 65539, 1638412, 0, 65539, 1638413, 0, 65539, 1638414, 0, 65539, 1638415, 0, 65539, 1638416, 0, 65539, 1638417, 0, 196612, 1638420, 0, 131072, 1638421, 0, 65539, 1638422, 0, 65539, 1638423, 0, 65539, 1638424, 0, 65539, 1638425, 0, 65539, 1638426, 0, 65539, 1638427, 0, 65539, 1638428, 0, 65539, 1638429, 0, 65539, 1638430, 0, 65539, 1638431, 0, 65539, 1638432, 0, 65539, 1638433, 0, 65539, 1638434, 0, 65539, 1638435, 0, 65539, 1638436, 0, 65539, 1638437, 0, 65540, 1769469, 0, 65536, 1769470, 0, 65539, 1769471, 0, 65539, 1703936, 0, 131076, 1703940, 0, 262144, 1703941, 0, 262146, 1703942, 0, 262145, 1703943, 0, 262147, 1703944, 0, 262146, 1703945, 0, 262145, 1703946, 0, 262145, 1703947, 0, 262145, 1703948, 0, 262146, 1703949, 0, 262145, 1703950, 0, 262147, 1703951, 0, 262146, 1703952, 0, 262147, 1703953, 0, 262148, 1703956, 0, 262144, 1703957, 0, 262146, 1703958, 0, 262147, 1703959, 0, 262145, 1703960, 0, 262145, 1703961, 0, 262146, 1703962, 0, 262146, 1703963, 0, 262145, 1703964, 0, 262146, 1703965, 0, 262147, 1703966, 0, 262145, 1703967, 0, 262147, 1703968, 0, 262146, 1703969, 0, 262146, 1703970, 0, 262147, 1703971, 0, 262145, 1703972, 0, 262147, 1703973, 0, 262148, 1835005, 0, 131072, 1835006, 0, 65539, 1835007, 0, 65539, 1769472, 0, 65540, 1900541, 0, 131072, 1900542, 0, 65539, 1900543, 0, 65539, 1835008, 0, 131076, 1966077, 0, 65536, 1966078, 0, 65539, 1966079, 0, 65539, 1900544, 0, 65540, 2031613, 0, 131072, 2031614, 0, 65539, 2031615, 0, 65539, 1966080, 0, 196612, 2097149, 0, 131072, 2097150, 0, 65539, 2097151, 0, 65539, 2031616, 0, 65540, 2162685, 0, 65536, 2162686, 0, 65539, 2162687, 0, 65539, 2097152, 0, 393216, 2097153, 0, 1, 2097154, 0, 3, 2097155, 0, 1, 2097156, 0, 1, 2097157, 0, 1, 2097158, 0, 1, 2097159, 0, 3, 2097160, 0, 2, 2097161, 0, 3, 2097162, 0, 1, 2097163, 0, 1, 2097164, 0, 1, 2097165, 0, 2, 2097166, 0, 2, 2097167, 0, 2, 2097168, 0, 3, 2097169, 0, 4, 2097172, 0, 0, 2097173, 0, 3, 2097174, 0, 2, 2097175, 0, 2, 2097176, 0, 3, 2097177, 0, 1, 2097178, 0, 1, 2097179, 0, 1, 2097180, 0, 1, 2097181, 0, 2, 2097182, 0, 1, 2097183, 0, 3, 2097184, 0, 1, 2097185, 0, 3, 2097186, 0, 3, 2097187, 0, 2, 2097188, 0, 3, 2097189, 0, 3, 2097190, 0, 4, 2228221, 0, 131072, 2228222, 0, 65539, 2228223, 0, 65539, 2162688, 0, 65539, 2162689, 0, 65539, 2162690, 0, 65539, 2162691, 0, 65539, 2162692, 0, 65539, 2162693, 0, 65539, 2162694, 0, 65539, 2162695, 0, 65539, 2162696, 0, 65539, 2162697, 0, 65539, 2162698, 0, 65539, 2162699, 0, 65539, 2162700, 0, 65539, 2162701, 0, 65539, 2162702, 0, 65539, 2162703, 0, 65539, 2162704, 0, 65539, 2162705, 0, 65540, 2162708, 0, 65536, 2162709, 0, 65539, 2162710, 0, 65539, 2162711, 0, 65539, 2162712, 0, 65539, 2162713, 0, 65539, 2162714, 0, 65539, 2162715, 0, 65539, 2162716, 0, 65539, 2162717, 0, 65539, 2162718, 0, 65539, 2162719, 0, 65539, 2162720, 0, 65539, 2162721, 0, 65539, 2162722, 0, 65539, 2162723, 0, 65539, 2162724, 0, 65539, 2162725, 0, 65539, 2162726, 0, 131076, 2293757, 0, 262144, 2293758, 0, 262147, 2293759, 0, 262146, 2228224, 0, 262147, 2228225, 0, 262145, 2228226, 0, 262146, 2228227, 0, 262146, 2228228, 0, 262147, 2228229, 0, 262147, 2228230, 0, 262146, 2228231, 0, 262147, 2228232, 0, 262147, 2228233, 0, 262146, 2228234, 0, 262145, 2228235, 0, 262146, 2228236, 0, 262145, 2228237, 0, 262147, 2228238, 0, 262145, 2228239, 0, 262147, 2228240, 0, 262147, 2228241, 0, 262148, 2228244, 0, 262144, 2228245, 0, 262145, 2228246, 0, 262147, 2228247, 0, 262147, 2228248, 0, 262145, 2228249, 0, 262146, 2228250, 0, 262145, 2228251, 0, 262147, 2228252, 0, 262145, 2228253, 0, 262146, 2228254, 0, 262147, 2228255, 0, 262147, 2228256, 0, 262146, 2228257, 0, 262145, 2228258, 0, 262147, 2228259, 0, 262146, 2228260, 0, 262147, 2228261, 0, 262145, 2228262, 0, 262148 ) + +[node name="Player" parent="." instance=ExtResource( 2 )] +position = Vector2( 24, 128 ) + +[node name="Coin2" parent="." instance=ExtResource( 3 )] +position = Vector2( 499, 354 ) + +[node name="Coin3" parent="." instance=ExtResource( 3 )] +position = Vector2( 339, 234 ) + +[node name="Coin4" parent="." instance=ExtResource( 3 )] +position = Vector2( 67, 242 ) + +[node name="Coin5" parent="." instance=ExtResource( 3 )] +position = Vector2( 447, 204 ) + +[node name="Coin6" parent="." instance=ExtResource( 3 )] +position = Vector2( 292, 353 ) + +[node name="Coin7" parent="." instance=ExtResource( 3 )] +position = Vector2( 92, 357 ) + +[node name="Coin8" parent="." instance=ExtResource( 3 )] +position = Vector2( 77, 477 ) + +[node name="Coin9" parent="." instance=ExtResource( 3 )] +position = Vector2( 568, 475 ) + +[node name="Coin10" parent="." instance=ExtResource( 3 )] +position = Vector2( 333, 478 ) + +[node name="Coin" parent="." instance=ExtResource( 3 )] +position = Vector2( 161, 176 ) + +[node name="Pit" parent="." instance=ExtResource( 5 )] +position = Vector2( 295, 572 ) + +[node name="Pit2" parent="." instance=ExtResource( 5 )] +position = Vector2( 650, 573 ) + +[node name="Pit3" parent="." instance=ExtResource( 5 )] +position = Vector2( 713, 573 ) diff --git a/pickups/Coin.gd b/pickups/Coin.gd new file mode 100644 index 0000000..42939a2 --- /dev/null +++ b/pickups/Coin.gd @@ -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() diff --git a/pickups/Coin.tscn b/pickups/Coin.tscn new file mode 100644 index 0000000..d3b7134 --- /dev/null +++ b/pickups/Coin.tscn @@ -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"] diff --git a/player/Pit.gd b/player/Pit.gd new file mode 100644 index 0000000..f6878b7 --- /dev/null +++ b/player/Pit.gd @@ -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") + diff --git a/player/Pit.tscn b/player/Pit.tscn new file mode 100644 index 0000000..e262b98 --- /dev/null +++ b/player/Pit.tscn @@ -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"] diff --git a/player/Player.gd b/player/Player.gd new file mode 100644 index 0000000..56806df --- /dev/null +++ b/player/Player.gd @@ -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) diff --git a/player/Player.tscn b/player/Player.tscn new file mode 100644 index 0000000..aa38e00 --- /dev/null +++ b/player/Player.tscn @@ -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 diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..b198fd0 --- /dev/null +++ b/project.godot @@ -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" diff --git a/tilesets/Green.tres b/tilesets/Green.tres new file mode 100644 index 0000000..ef3a0f5 --- /dev/null +++ b/tilesets/Green.tres @@ -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 diff --git a/ui/GameOverScreen.gd b/ui/GameOverScreen.gd new file mode 100644 index 0000000..12dac38 --- /dev/null +++ b/ui/GameOverScreen.gd @@ -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() diff --git a/ui/GameOverScreen.tscn b/ui/GameOverScreen.tscn new file mode 100644 index 0000000..6cc7d71 --- /dev/null +++ b/ui/GameOverScreen.tscn @@ -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"] diff --git a/ui/HUD.gd b/ui/HUD.gd new file mode 100644 index 0000000..a88665e --- /dev/null +++ b/ui/HUD.gd @@ -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) diff --git a/ui/HUD.tscn b/ui/HUD.tscn new file mode 100644 index 0000000..4f93885 --- /dev/null +++ b/ui/HUD.tscn @@ -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"