From 0d6ffa22df869e9455b8832b03ee1d8cc0a73eb1 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Oct 2025 21:02:15 -0400 Subject: [PATCH] Added vegetation, small crates, coins, enemies --- .../player_idle/Player Idle 48x48.png.import | 6 - .../player_jump/player jump 48x48.png.import | 6 - .../player new jump 48x48.png.import | 6 - .../player_land/player land 48x48.png.import | 6 - .../player_punch/Player Punch 64x64(1).png | Bin 0 -> 3228 bytes .../Player Punch 64x64(1).png.import | 34 ++++ .../player_run/player run 48x48.png.import | 6 - .../Player Running Shooting 48x48.png.import | 6 - .../player shoot 2H 48x48.png.import | 6 - ...17-sky-background-godot-course-.png.import | 6 - ...rees-background-godot-course-v1.png.import | 6 - .../backgrounds/forestbackground.png.import | 6 - graphics/effects/14.png.import | 6 - graphics/effects/explosion.png.import | 6 - graphics/effects/orb_red.png.import | 6 - graphics/enemies/slime_green(1).png | Bin 0 -> 908 bytes graphics/enemies/slime_green(1).png.import | 34 ++++ graphics/objects/25-10-27-small-crate.png | Bin 0 -> 686 bytes .../objects/25-10-27-small-crate.png.import | 34 ++++ graphics/objects/mushroom_32x64.png | Bin 0 -> 1203 bytes graphics/objects/mushroom_32x64.png.import | 34 ++++ graphics/objects/veg_32x32.png | Bin 0 -> 675 bytes graphics/objects/veg_32x32.png.import | 34 ++++ graphics/pickups/coin(1).png | Bin 0 -> 500 bytes graphics/pickups/coin(1).png.import | 34 ++++ ...18-godot-course-Terrain (32x32).png.import | 6 - ...errain (32x32)-color-exchange-1.png.import | 6 - graphics/tiles/crate-100-custom.png.import | 6 - icon.svg.import | 6 - project.godot | 25 ++- scenes/coin.tscn | 114 ++++++++++++++ scenes/crate.tscn | 4 +- scenes/game.tscn | 145 +++++++++++++----- scenes/player.tscn | 78 +++++++++- scenes/slimer.tscn | 58 +++++++ scenes/small_crate.tscn | 17 ++ scripts/coin.gd | 9 ++ scripts/coin.gd.uid | 1 + scripts/game_controller.gd | 20 +++ scripts/player.gd | 36 +++-- scripts/scene_manager.gd | 21 ++- scripts/slimer.gd | 9 ++ scripts/slimer.gd.uid | 1 + 43 files changed, 672 insertions(+), 172 deletions(-) create mode 100644 graphics/animations/player_punch/Player Punch 64x64(1).png create mode 100644 graphics/animations/player_punch/Player Punch 64x64(1).png.import create mode 100644 graphics/enemies/slime_green(1).png create mode 100644 graphics/enemies/slime_green(1).png.import create mode 100644 graphics/objects/25-10-27-small-crate.png create mode 100644 graphics/objects/25-10-27-small-crate.png.import create mode 100644 graphics/objects/mushroom_32x64.png create mode 100644 graphics/objects/mushroom_32x64.png.import create mode 100644 graphics/objects/veg_32x32.png create mode 100644 graphics/objects/veg_32x32.png.import create mode 100644 graphics/pickups/coin(1).png create mode 100644 graphics/pickups/coin(1).png.import create mode 100644 scenes/coin.tscn create mode 100644 scenes/slimer.tscn create mode 100644 scenes/small_crate.tscn create mode 100644 scripts/coin.gd create mode 100644 scripts/coin.gd.uid create mode 100644 scripts/slimer.gd create mode 100644 scripts/slimer.gd.uid diff --git a/graphics/animations/player_idle/Player Idle 48x48.png.import b/graphics/animations/player_idle/Player Idle 48x48.png.import index 89be3df..67546c9 100644 --- a/graphics/animations/player_idle/Player Idle 48x48.png.import +++ b/graphics/animations/player_idle/Player Idle 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Idle 48x48.png-febc6ee73b16c6ae56feb25 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_jump/player jump 48x48.png.import b/graphics/animations/player_jump/player jump 48x48.png.import index 0065ff7..914725d 100644 --- a/graphics/animations/player_jump/player jump 48x48.png.import +++ b/graphics/animations/player_jump/player jump 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player jump 48x48.png-53153cc022c0f5f1a72bef8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_jump/player new jump 48x48.png.import b/graphics/animations/player_jump/player new jump 48x48.png.import index de9be7b..7d06955 100644 --- a/graphics/animations/player_jump/player new jump 48x48.png.import +++ b/graphics/animations/player_jump/player new jump 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player new jump 48x48.png-085528a4cee6917e773 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_land/player land 48x48.png.import b/graphics/animations/player_land/player land 48x48.png.import index ecc6680..4f3fcf0 100644 --- a/graphics/animations/player_land/player land 48x48.png.import +++ b/graphics/animations/player_land/player land 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player land 48x48.png-73bf83889efcd0c346ed730 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_punch/Player Punch 64x64(1).png b/graphics/animations/player_punch/Player Punch 64x64(1).png new file mode 100644 index 0000000000000000000000000000000000000000..c9a466098265a13f5f26383823f223194031eb4e GIT binary patch literal 3228 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 NQ$s6*D!rTc{{!G)IeY*B literal 0 HcmV?d00001 diff --git a/graphics/animations/player_punch/Player Punch 64x64(1).png.import b/graphics/animations/player_punch/Player Punch 64x64(1).png.import new file mode 100644 index 0000000..54e35f4 --- /dev/null +++ b/graphics/animations/player_punch/Player Punch 64x64(1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnnj3lw3souky" +path="res://.godot/imported/Player Punch 64x64(1).png-30d66d61ef3a1f371d6375dad7a62029.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/animations/player_punch/Player Punch 64x64(1).png" +dest_files=["res://.godot/imported/Player Punch 64x64(1).png-30d66d61ef3a1f371d6375dad7a62029.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/animations/player_run/player run 48x48.png.import b/graphics/animations/player_run/player run 48x48.png.import index 83fd611..dd2077d 100644 --- a/graphics/animations/player_run/player run 48x48.png.import +++ b/graphics/animations/player_run/player run 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player run 48x48.png-e4bb17293a9ce0c0c03376a7 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import b/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import index e8f6962..5334a01 100644 --- a/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import +++ b/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-3d2df69d2a4 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_shoot/player shoot 2H 48x48.png.import b/graphics/animations/player_shoot/player shoot 2H 48x48.png.import index acc152d..f0a4deb 100644 --- a/graphics/animations/player_shoot/player shoot 2H 48x48.png.import +++ b/graphics/animations/player_shoot/player shoot 2H 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player shoot 2H 48x48.png-6d3782d73196ec488a7 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import b/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import index 4678567..60668ce 100644 --- a/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import +++ b/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-sky-background-godot-course-.png-685 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import b/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import index 3d02293..9999ab1 100644 --- a/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import +++ b/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-trees-background-godot-course-v1.png compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/forestbackground.png.import b/graphics/backgrounds/forestbackground.png.import index 88ff60c..3a99dc8 100644 --- a/graphics/backgrounds/forestbackground.png.import +++ b/graphics/backgrounds/forestbackground.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/forestbackground.png-c62d472b3b61aefff531c569 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/14.png.import b/graphics/effects/14.png.import index 38017d9..26f4d98 100644 --- a/graphics/effects/14.png.import +++ b/graphics/effects/14.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/14.png-b80bda9481eb03b9296615b658f23b86.ctex" compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/explosion.png.import b/graphics/effects/explosion.png.import index 6fc2947..8cd9613 100644 --- a/graphics/effects/explosion.png.import +++ b/graphics/effects/explosion.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/explosion.png-67838f4909472368e8b1165eafa79d8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/orb_red.png.import b/graphics/effects/orb_red.png.import index 7d5eabe..680c1f0 100644 --- a/graphics/effects/orb_red.png.import +++ b/graphics/effects/orb_red.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/orb_red.png-96d2144e68a7a46da9f571d0443165d8. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/enemies/slime_green(1).png b/graphics/enemies/slime_green(1).png new file mode 100644 index 0000000000000000000000000000000000000000..a21cb6fa253a2142be9bdad248238299dce6e695 GIT binary patch literal 908 zcmeAS@N?(olHy`uVBq!ia0vp^2|(<@!3HEb(?2AGr~;43Vg?3oVGw3ym^DX&fq~i1 z)5S5QV$Rz+)_J!b1lrmiqe6M+oJ(NX&NN4Phv|b`z4{NYP5+>JWrs--17qeTsRD5g z!(g=zZP^CRNrf+-+NH@KR$Td0s&mngVw3+xu0?EXcCBM}?K8i`C}Wk?V1NhZ=gNnL znwH6IezGFZ!~9a6?RHUyhPV4>Uu{?_FnfW>zS{qPKK*<4uVTZ$ce_63>1Q2~5psEW zx_|#J@#X97|9=sRdr@7gG^K>%S{q!=tk;zc{umA757CW^gF~?Y* zzL@Q4_FeSScBuyG05^_0b=8H-_E|RV`0{(oCG+JLF?=tr`x)+BFt>laYl`#E_4#US z^)8yV;ydQc)Lt=IzWv`O|NWa{=kBflzObA3)w^Aa^ZVqko^^cn|Ic5O3*}M*OaJxH zkT2-?mBRcbPJn+~%B^6jY(87p9(Mo#>Q7(h~rm&XFcnS2%Pu(#j4I<=R1EbeZ((y;O5o?wIy5Q|G$2J-k$H; z`tsE}e}z7FZ&xe&&T>;Ie$t&EuHB#RoL~6BudegQ(e6(xj^8Zaa&Il$W#4ySE~~5m zTfmt7%O>)U?6I5hEH)mc^Zy7i2AYE5_cS8+Pd zEL*XBwVBru|99M6hFkZ|y>aAN9DmO}@fM%8>yNRi-8VbG`yY1_&*gmzOfw=rUyaF+ zc6a>UWOJqT@=>+Yz0nhwE57CCn(*tmRI)?YzOxPXujg|0Ui|Qj8JN8oJYD@<);T3K F0RY5^vzq__ literal 0 HcmV?d00001 diff --git a/graphics/enemies/slime_green(1).png.import b/graphics/enemies/slime_green(1).png.import new file mode 100644 index 0000000..da659be --- /dev/null +++ b/graphics/enemies/slime_green(1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wgf50h6hbeib" +path="res://.godot/imported/slime_green(1).png-681a56605c941b0b260c890dc1e66a86.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/enemies/slime_green(1).png" +dest_files=["res://.godot/imported/slime_green(1).png-681a56605c941b0b260c890dc1e66a86.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/objects/25-10-27-small-crate.png b/graphics/objects/25-10-27-small-crate.png new file mode 100644 index 0000000000000000000000000000000000000000..b9040a879bd1fd316f823cd87fa1242156ad5ae4 GIT binary patch literal 686 zcmV;f0#W^mP)bYBE&u=k(ib@D00001 zVoOIv0Eh)0NB{r;32;bRa{vGf6951U69E94oEQKA00(qQO+^Rk3L6#~7cfuT$N&HV z&`Cr=R7l5_mI-phAPhwlwAlAQakT*whD@!QCOAA}>GLi6xj!%B{@mA#C^$2xA^SD= zs5mnrBE=l)SpMus4<5JzgaEBU%s~T?A3#SQpnSrW7RaN0TU@uVM+17S4kPT&_=x2z zz6APhQi7y!L!PC|JTF0xQ#={w>X!=e}=IWFa;8iwRG7 z-KLH|O7*wSsw%q6BA2~@E4{-xa9noikh|bWe8$zWOEOe+Pp|kUcfH!-J@>5%9`0&C z@tk`b@}KZt>S#+RoV^lC)-8B(q%{%~vN#<_?yKJgeBj~Z1Fk|6_zMc9Vp{#)x2d-n z?Wjn(*A%~-GSs^;&yUe97ZZf;!H@pk2TMyeT#~iKJs0qi^&2mOi-G$=vA$1zkd=w^ zt7WL-+RVo35ltT;9er(@&E(k}!$XUqXX@K&b)(ar-g<{X^^o@?{pJ4z|H5CzA2Q!4 U?mZ444FCWD07*qoM6N<$f_O3^G5`Po literal 0 HcmV?d00001 diff --git a/graphics/objects/25-10-27-small-crate.png.import b/graphics/objects/25-10-27-small-crate.png.import new file mode 100644 index 0000000..34440bc --- /dev/null +++ b/graphics/objects/25-10-27-small-crate.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1tnil82cldxk" +path="res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fcf96245f3d88c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/25-10-27-small-crate.png" +dest_files=["res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fcf96245f3d88c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/objects/mushroom_32x64.png b/graphics/objects/mushroom_32x64.png new file mode 100644 index 0000000000000000000000000000000000000000..957e81672bbf46a1814ab97e870aef8bec5d53b1 GIT binary patch literal 1203 zcmV;k1WfyhP)y{D4^000SaNLh0L04^f{04^f|c%?sf00007 zbV*G`2k8nM7Xmd++dF{(00Z|)L_t(&-tCx6ZyQw@hM#j8+jEJX#3RRU(mE*@H=-a_ zMJlLb#fGvg{{SIawQ7a<4XoJF9e)9V5JE*_4FaStC{-(3P;hCJkhpeIUo*GEA|+5- z>^QB6iso6)%=x}|-t(Pr&KXEaNl8gbNl8ihzwy?=l6$UN7W*pV{e@YXPDM&eN=nL; z!>LL!w;y@^s%=%Ojw20B?1z9xy&nQv0-61CUqDCiW#C6AXH6j^C{Jz=U)zjmc9V^F zzFVFeC(d%cmy9jo?9q91;((y&z@%e9Xf`J`&2Bt-!BjTSe7{l{C!QQP`RkQ9_C1B; zdW6;tk#KObf}*E*dQ!V*kItKu{A&2uCTPwDl0zu9J zAjrAI+6EJm(}FjTz+$lvKm z6(en=5ENWVKDS+3Inc9J=U+vv)_Z2;0pfgZ&XiQd%L`d*GZtP}0*1tzBFavqx0*Db zdX*?+Q~cp$ZY*zdwGr~!t!)=Rzu6KadcpAI2UHZ5J*5x(8Ye3`c92SosGZB2!TM57-$CxOM`?BD}$9$_(?(|2_8*A zt80*sz->2>QHb1XW6XmS86}2h*N`LzD~QlQV$5#72cwIyVnsY(RJd7#Rtkh7C>*3; zoWs6zo9?ZjX$}Nen-Q(hV1O181I(k>06?6;THi1wB$hHD5(bH;BQv;0(dvb)_a(na z2@wVXyGlONfm4;DxOlHmoUhI8_*rpdE_E%8>o71Ojm{?7jJw@0+IM%xUlD;0Fv+lX zJk)`UD|gIGrD^r;S~LFp^_8w7@mzd=ibx8A6~R^*-uK4SRom$RLA`GtsRka#8!s%H zg70zYKp6on{c@9bH{g@Y*T#;w=RX-a$Hgy|@n_076Zt*wipJiMoIYN&2qBZrk}nhx zLXfrXJqy^g15!woQYfVmQvO-A_J1beaghpm@&tT(>8Eg~iHLtJ`v)#OW&x*<*W|mW zUo!xn=VH4aj^{Cv-#*AA% literal 0 HcmV?d00001 diff --git a/graphics/objects/mushroom_32x64.png.import b/graphics/objects/mushroom_32x64.png.import new file mode 100644 index 0000000..082e10d --- /dev/null +++ b/graphics/objects/mushroom_32x64.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctrmx80fc52bt" +path="res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/mushroom_32x64.png" +dest_files=["res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/objects/veg_32x32.png b/graphics/objects/veg_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..4e09fa94c72733804bbf24e8b93c93c7daf096c0 GIT binary patch literal 675 zcmV;U0$lxxP)EX>4Tx04R}tkv&MmKpe$iTcsiu5i5!~WT;Lph>AFB6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jf7n~Gbq{ROvg%&X$9QWhhy~o`#<}3IpJ#@RbZVYBOe_@ISZ-rhG*sd#;)tSZl<&{D ztZ?4qtd^^+c~AbrP)=J}<~q$0B(R7jh!7y7iW17O5TjKi#YBqs;~xHD$1jpgCRYiJ z91EyGh2;3b|KNAGW`1(QO$x<<&KKMM7zKj6K%-{c-^aGyH~|9Bz?IhWSL(pbC+W48 z7C8cXw}Ff6mL~53mpj1FlP(#OBL!&s^LgO?jJ_!g^xp#AYi@7NeVjf3Y3eF@0~{Oz zV+G1y_jq?#dvE`qY4-O6go1LeRQ&;x00006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=>riLDmieSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{004VQL_t(o!|ju?4Zt7_1PueQT$ad4EWvVFfK*5>Yzf;q zY5pn-!u{hw1ONa4006+xlv4-w(dJs;*Hb5K$3aK5xV}Y5s6Pw5~a#BWiLE#M?t^`K{fyY002ov JPDHLkV1hjJ7cT$+ literal 0 HcmV?d00001 diff --git a/graphics/objects/veg_32x32.png.import b/graphics/objects/veg_32x32.png.import new file mode 100644 index 0000000..9a7b2a7 --- /dev/null +++ b/graphics/objects/veg_32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpf0sbb3o6rch" +path="res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/veg_32x32.png" +dest_files=["res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/graphics/pickups/coin(1).png b/graphics/pickups/coin(1).png new file mode 100644 index 0000000000000000000000000000000000000000..01ae33d70b398db7f1f7bcafe883a0a469805201 GIT binary patch literal 500 zcmV^r!6hi!Wct>kSmw76A*+mkqIDVjdDL!Rb}5E?Td;C@2y9S zHih2xK(yTWh+gXdrTqK8Uwx^_$MoI4V|67Hn26^Qp-rJ*c_3P5d_*tx|6%^yEznE& zeE6^KHvJ|vI7934d=L#ytZIR)9hxaN1Jm8sZ6_j{Yx1#nTWt!D2<;1?{VNX?M*l~R zzukKP+i+D+FAlB;7qkOXfaGA?&h>EX&+$Oxqgs>{d4C#zhd05hUS`kO@{&+Bb`?-H zKXwYn7Ms9B!`F}PQh%-o65r;4=uy!A4;g>*6iCRL!wF!o{9{X0YM%Mf@U=DvM2}Kx zY#A;!e+4Y{Qh#m^NPMe5dkcj0f5`ZIy8@JYG2kpkh}LrU76{dHI?&Z}2LKX(>v1MX z4k6>OaQ_N1p97frj@jdSpELonJ&y=&3jN9h(K6#Bda3^x^WUBW>`ee7IfzLSUk<|l qVg27u071wNc?u+CjZ6R`YyJS*Ofbr5QwY-l0000 void: + print_debug("body connected with coin") + if body is Player: + coin_collected.emit(body, self) diff --git a/scripts/coin.gd.uid b/scripts/coin.gd.uid new file mode 100644 index 0000000..7a1a480 --- /dev/null +++ b/scripts/coin.gd.uid @@ -0,0 +1 @@ +uid://dpcuif8u6kqj5 diff --git a/scripts/game_controller.gd b/scripts/game_controller.gd index 71a2c34..9588de8 100644 --- a/scripts/game_controller.gd +++ b/scripts/game_controller.gd @@ -1,5 +1,7 @@ extends Node2D +var coins_collected : int = 0 +var total_coins : int = 0 func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void: print("Game controller knows %s trigger fired " % intent) @@ -10,3 +12,21 @@ func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void: body.queue_free() "powerup": print("Power this thing up!") + +func on_coin_collected(_body, coin) -> void: + print_debug("GC knows coin collected") + coins_collected += 1 + print_debug("Coins collected: %s" % str(coins_collected)) + print_debug("There are %s coins remaining" % str(total_coins - coins_collected)) + coin.queue_free() + if coins_collected >= total_coins: + print_debug("You win!") + await get_tree().create_timer(1.0).timeout + get_tree().call_deferred("reload_current_scene") + +func on_player_slimed(body, slime) -> void: + print_debug("GC knows player slimed") + +func set_total_coins(value) -> void: + total_coins = value + print_debug("There are %s coins in the level" % str(total_coins)) diff --git a/scripts/player.gd b/scripts/player.gd index 42bf3aa..572bc16 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -1,4 +1,5 @@ -class_name Player extends CharacterBody2D +class_name Player +extends CharacterBody2D ## Character controller. ## TODO: fix bullet cooldown timer @@ -6,7 +7,7 @@ const SPEED = 200.0 const JUMP_VELOCITY = -500.0 enum FaceDirection{LEFT, RIGHT} -enum State{IDLE, WALK, JUMP, FALLING, SHOOT_STILL, SHOOT_RUN} +enum State{IDLE, WALK, JUMP, FALLING, SHOOT_STILL, SHOOT_RUN, SHOVE} @export var BUMP_POWER := 50 @export var SHOVE_POWER := 300 @@ -41,6 +42,7 @@ func _physics_process(delta: float) -> void: handle_collisions() update_state() update_animation() + update_debug() func handle_input() -> void: @@ -60,14 +62,18 @@ func handle_input() -> void: facing = FaceDirection.RIGHT # Handle shoving. - if Input.is_action_just_pressed("shove") and push_enabled == true: - var shove_direction : int - match facing: - FaceDirection.RIGHT: - shove_direction = 1 - FaceDirection.LEFT: - shove_direction = -1 - push_target.apply_central_impulse(Vector2(shove_direction, 0) * SHOVE_POWER) + if Input.is_action_just_pressed("shove"): + print_debug("Shoving!") + if push_enabled == true: + var shove_direction : int + match facing: + FaceDirection.RIGHT: + shove_direction = 1 + FaceDirection.LEFT: + shove_direction = -1 + print_debug("Shoving %s" % push_target.name) + current_state = State.SHOVE + push_target.apply_central_impulse(Vector2(shove_direction, 0) * SHOVE_POWER) # Handle shooting if Input.is_action_just_pressed("shoot"): @@ -177,6 +183,11 @@ func update_state() -> void: await player_sprite.animation_finished current_state = State.WALK + # Player shoving + State.SHOVE: + await player_sprite.animation_finished + current_state = State.IDLE + func update_animation() -> void: match facing: FaceDirection.LEFT: @@ -196,3 +207,8 @@ func update_animation() -> void: player_sprite.play("shoot_still") State.SHOOT_RUN: player_sprite.play("shoot_run") + State.SHOVE: + player_sprite.play("punch") + +func update_debug(): + %StateLabel.text = "Current state: %s" % current_state diff --git a/scripts/scene_manager.gd b/scripts/scene_manager.gd index ae645d1..2244a83 100644 --- a/scripts/scene_manager.gd +++ b/scripts/scene_manager.gd @@ -7,6 +7,26 @@ var bullet_array = [] var total_allowed_bullets : int = 7 @onready var game: Node2D = $".." +@onready var coins: Node = $"../Coins" +@onready var enemies: Node = $"../Enemies" + +func _ready() -> void: + build_level() + +func build_level() -> void: + var total_coins : int = 0 + if coins: + for coin in coins.get_children(): + if coin is Coin: + total_coins += 1 + coin.coin_collected.connect(game.on_coin_collected) + game.set_total_coins(total_coins) + var total_enemies : int = 0 + if enemies: + for enemy in enemies.get_children(): + if enemy is Slimer: + total_enemies += 1 + enemy.player_slimed.connect(game.on_player_slimed) func make_bullet(_bullet_position, _bullet_speed) -> void: print("make a bullet; put it in the world") @@ -32,7 +52,6 @@ func bullet_factory() -> Bullet: bullet_array.push_front(my_bullet) return my_bullet - func _on_world_boundary_body_entered(body: Node2D) -> void: if body is Player: var current_scene = get_tree() diff --git a/scripts/slimer.gd b/scripts/slimer.gd new file mode 100644 index 0000000..6ff0887 --- /dev/null +++ b/scripts/slimer.gd @@ -0,0 +1,9 @@ +class_name Slimer +extends Area2D + +signal player_slimed(body, slime) + +func _on_body_entered(body: Node2D) -> void: + if body is Player: + print_debug("Player hit Slimer") + player_slimed.emit(body, self) diff --git a/scripts/slimer.gd.uid b/scripts/slimer.gd.uid new file mode 100644 index 0000000..c56e618 --- /dev/null +++ b/scripts/slimer.gd.uid @@ -0,0 +1 @@ +uid://bcxorf6dwnwbv