From 56da77cd2dd6d8a4dc5206c9d3f872a165c5b32e Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 16 Sep 2024 21:06:36 -0400 Subject: [PATCH] bullets playeranimations issue 4 scenemanager issue3 tilemaplayer issue5 --- .../graphics/environment/Terrain (32x32).png | Bin 0 -> 11796 bytes .../environment/Terrain (32x32).png.import | 34 ++++ .../assets/graphics/objects/crate.png | Bin 0 -> 1761 bytes .../assets/graphics/objects/crate.png.import | 34 ++++ .../assets/graphics/pixel_bullet.png | Bin 0 -> 3870 bytes .../assets/graphics/pixel_bullet.png.import | 34 ++++ .../player/idle/Player Idle 48x48.png | Bin 0 -> 1853 bytes .../player/idle/Player Idle 48x48.png.import | 34 ++++ .../player/jump/player jump 48x48.png | Bin 0 -> 1021 bytes .../player/jump/player jump 48x48.png.import | 34 ++++ .../graphics/player/run/player run 48x48.png | Bin 0 -> 3199 bytes .../player/run/player run 48x48.png.import | 34 ++++ augustgamecourse/project.godot | 14 ++ augustgamecourse/scenes/bullet.tscn | 11 +- augustgamecourse/scenes/crate.tscn | 10 +- augustgamecourse/scenes/game.tscn | 90 ++++++++- augustgamecourse/scenes/player.tscn | 177 +++++++++++++++++- augustgamecourse/scripts/bullet.gd | 5 + augustgamecourse/scripts/player.gd | 26 ++- augustgamecourse/scripts/scene_manager.gd | 49 +++++ augustgamecourse/scripts/trigger.gd | 3 + 21 files changed, 570 insertions(+), 19 deletions(-) create mode 100644 augustgamecourse/assets/graphics/environment/Terrain (32x32).png create mode 100644 augustgamecourse/assets/graphics/environment/Terrain (32x32).png.import create mode 100644 augustgamecourse/assets/graphics/objects/crate.png create mode 100644 augustgamecourse/assets/graphics/objects/crate.png.import create mode 100644 augustgamecourse/assets/graphics/pixel_bullet.png create mode 100644 augustgamecourse/assets/graphics/pixel_bullet.png.import create mode 100644 augustgamecourse/assets/graphics/player/idle/Player Idle 48x48.png create mode 100644 augustgamecourse/assets/graphics/player/idle/Player Idle 48x48.png.import create mode 100644 augustgamecourse/assets/graphics/player/jump/player jump 48x48.png create mode 100644 augustgamecourse/assets/graphics/player/jump/player jump 48x48.png.import create mode 100644 augustgamecourse/assets/graphics/player/run/player run 48x48.png create mode 100644 augustgamecourse/assets/graphics/player/run/player run 48x48.png.import create mode 100644 augustgamecourse/scripts/scene_manager.gd diff --git a/augustgamecourse/assets/graphics/environment/Terrain (32x32).png b/augustgamecourse/assets/graphics/environment/Terrain (32x32).png new file mode 100644 index 0000000000000000000000000000000000000000..ddf1eaf58e63d04bfa806cd75eab977633dd771b GIT binary patch literal 11796 zcmY*{13c0;zz zU~GdKX72Cm{rThj`)AyTxpVI8p7VOW&hz;^&)3FA+KhCU=pYaXqpr?fQwW6o3V8jI zh6?<=RXn)`{vq=-)mDd8j__I>e@Ozi1 z{nx1}w{wN_!r%Vry?b>1*{Xb zr_ba4Mku;LC-0+0h?2$nNG|*ct9UemkEq7Ev@83K4CN}yf}c}G%qoUqelS$%m_4q=r@Q+P^x-- z*`6;el9l8E%wxTM(NVIzd;ZJNX8+2%no(X`QUGkIc%y|>)L*r;gI!N*|8YNE=9!_Qrs}_B2gLxrXN`Ls^R`4LAgJQtL|BMh(H6zxFgBMMqa$ z;dA)(2rFO?@0Xl(dXA#!f$`k6fMHid_YDshj}6lS*wxa(D*tGG^{wp{?#o8pT4iGA!P7hF|gLW9ubCfsN)RKBzy`gT1$qt;5WHc4WHeH`yN z*lAZboe9GC*XjMb+f+`)_@ zJK`Gey}ACD?u9R!auazHdN93zM*;sMBu(&IhCt|qpN9)|763kI@!RaR&2=g7Ur0f` z;{JM!6#ze3cZyv&s=86Vza zab@uvStAUZmwZVaBi4~WoluQwuahg$u(DG+=8>bS$PmS)5x)OoEEETh4@cIfdVdGW zU9nd1+j@Q_sNF(bux9L#Z>#I4*N4lJ8I-OOoO|UEUxeT?BcRhCr&X zxov>xui5L&h0}Nv{nkefU+yK6MWyHYG~e-arWJ>cui{@`h~J&>s*U{sjR?kbZ`6@! z&#z40;3VDPgcRh~{V?$j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xda96smSsQ!uwu;>SjohHS zSk+dMcXSm0xZ|%%LgUg&w#SpZytY=LyXN9Gq%PMrcZp50w@cVFf04B|e`dxJYV*Ju z_C$$3eJi|qf4x{AZ$shoknbZ42(S$R?qDjNU%QRy$*Q~bv7gk>xPAYeQGJU@c8OkN|>w>Ms&qdA6-p#IX;O1elalRI@4LjMat@M0?^Q@XJAzLngS{19 zZRqzBE7&^M3O{<=)X9;DgUTY;tf>zA?c>QoIKxbZ~(fuHgXr|DMD(;0^S<&Eta}<;o7mR7Y1wTd8a$gmW zAH3#mk&+5`dHQf}9Kl#i0zFv{D}7obKEN$GhWQ*J9R>FBx$S%hI!1C+0oj2lpDe1U zn=FJ#{)AHmZ;gXt=I>9yE}R*2BVxi9KU``a%?x+lR$E$U)_6QIXm7L)^{i`Zj~uB zyCM%bda~>CgcuGHO89$H^7{F*d~_@w;=T#RO)xc~Phe}jlCuc^OsM?$N@JUwL;TzJ zdN^I*@!%~I`vcW?XGG^zP5Z7zCkv|m(I(e!JC$v4FK9tHYER9OX&ygrcM}6`UM;ws z#50o8jnL-{p*heNZ6K7Syho^%*OP;WC2Hs+SiTAuPmNAI% zAA|b*2}wMr3@7>P??)ZQq-I@prU+1svPH+75J9&rH|?H0k?F9M*f+Lz>~>;hwhYth b1DNH#Dz|$Kzczt3Z-}m@(cMb*ColgW2-TUV literal 0 HcmV?d00001 diff --git a/augustgamecourse/assets/graphics/environment/Terrain (32x32).png.import b/augustgamecourse/assets/graphics/environment/Terrain (32x32).png.import new file mode 100644 index 0000000..6e5f156 --- /dev/null +++ b/augustgamecourse/assets/graphics/environment/Terrain (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dj70wmrhdo67v" +path="res://.godot/imported/Terrain (32x32).png-9865738cd415cdc1d530801f96959643.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/environment/Terrain (32x32).png" +dest_files=["res://.godot/imported/Terrain (32x32).png-9865738cd415cdc1d530801f96959643.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/augustgamecourse/assets/graphics/objects/crate.png b/augustgamecourse/assets/graphics/objects/crate.png new file mode 100644 index 0000000000000000000000000000000000000000..2b8bdcd0c0b752f7079f09620a2121e2f556f925 GIT binary patch literal 1761 zcmeAS@N?(olHy`uVBq!ia0y~yV66aQ7G|Kx3)K}YKuS8mC&ZPJk@4EviZj!bwidfg zOR#ARv&?lj3p3XP%3l(wOM?7@862M7NMm4NEAe!345_&F=3paGhM{4>-<9Gk znLx}@fG-5n-t%Qiw=HDgiN4G+!%1VxA&nj<%_&X>BHo%UP8u@~@xA||ayrX=Yw@c0 zyIl&!e2eOzewl*LKoaCON2))%{^Iur)(-I_+>c!MD8vcqcZh#%s&L!`7OCC(ZT*}5 z6@oy)Bi%qjko+T7n7sAUX?G5p-eFs}u-+`;_)!!EU@agc55!z6;G16XZ)x!P7yfz& z#SLsLu^Sin_Ocky)sk&TAFjUh_MP-Ji#s_xAvVKYhGg^pX?%B&O0};w*WR}LXz;H5 zjk~e9p7otM@`~+RfsV?wOo=^<5XlcM5Sp|AOUVUd#V+YLkwB-qK{vgR@Vg zdKT^%g?o!L7ia&RJ^f|C<*jFLpF~v#4KrXU-YXA!eBn|gXSHY5^;ZcRx!ZBO?oXCg zN&D$(C1Jn1E2VTlG8u#14099Il}(^vC@*{LxWP<9@Al=SF!t`VaoxB)!v5>o(;rup z>*WKZ-)zMdfYm#~r}Zv7{AuR`#AxyOjLF2a+COAqGwX zVAt99L|H|7etHtIYrUj`Fwo(!#DNIjk4*WAyweN#Ok?IfuzvD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-YvoiOs25vc+N8bXDU^evrEi$z zjSWmRH;962W!g_3Z(b`IDyC@CGc0CwR_45$7iKhQJ7O(5uq>(i!6j1>#r9a}O%{&F z8(QZpI9=pgG-Nb# zI^Kz!r2K`Lz2Kp?zmEQ7U} zLs5iSL^ysQndjn_Z_)cK!3y?8`13c+Y_To1lzKf`rD(zM^$i(L=C%6^9Hexzmp9TP7J z3x2D_5a!4t4@Lw;++IjPL?TE)*M!XouFOAKKtr?u-6Zv(YkUXdi)sf zak0Mh>nO11+UfNJza4o$n<0Rk1Z07%>MV|KH|Cnd*}PH={w!JoU_k}q;T@2{2S2OR zD+a#QyBe@rHR$i1USRL^qA`5(r#B^2wb1c{XQEaxHcV>?NY(}bx#42)8SNHPEAhx+ zwgbTUmm?2ozQJTIB3(a3CTazbJxT1)Zea|u@~8|2{NOX;WZ4432(zCtQ7d>^3MYza z`pO61;cUJh#UB&2?YppT6D78R|4^6h|6#?IDsW4&75XzcI( zI|u+6TJ`se!ZF#4lOpqh+0S5p*beUt&(-{yaUWs}2=GNDGqzgZXbL{yCx91`EdrAH za5aCX+;6jxRN?`E{`@|6r*cN^Po;%Do_#4@uM~^*CnFzWVt7lNu6Os9ze}qfq(y&z zAN~3LRNk#6AiixSnJ2yu4LOwnk>Ay7)+Q(!7+wzKMJ61R2SEE47DYJB3DHoS125zG z=NfjWa)C7$d|>gvJRb?fU-ZQUv9Iw_V7=DGio;H>%!gN%iq-8`MjGM)49-BT&x$2f zCLY@o5T)$9hFE?0!P#ULO;mw=BX5G;-Lu&+QdMkLz^zYNPI6;W(H&45@yQ*hzGvh%)2y re59^(3$vL{@`WG>f*=TjXb=AZ>!Ac3Jx|zZ00000NkvXXu0mjfKxWs7 literal 0 HcmV?d00001 diff --git a/augustgamecourse/assets/graphics/player/jump/player jump 48x48.png.import b/augustgamecourse/assets/graphics/player/jump/player jump 48x48.png.import new file mode 100644 index 0000000..4aafeff --- /dev/null +++ b/augustgamecourse/assets/graphics/player/jump/player jump 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d0kfe5ms2vjbr" +path="res://.godot/imported/player jump 48x48.png-1ccba0c36041038682bf917e1f6cf991.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/player/jump/player jump 48x48.png" +dest_files=["res://.godot/imported/player jump 48x48.png-1ccba0c36041038682bf917e1f6cf991.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/augustgamecourse/assets/graphics/player/run/player run 48x48.png b/augustgamecourse/assets/graphics/player/run/player run 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..aca5b5560dba7381b8b06e68e76b1cadf80992cb GIT binary patch literal 3199 zcma)9^;^@A6Mt`Xi~$1$1SS$rKnI9~AWT9A7By5FhZ0gs*VyPV2z5#h>5vvhLVEb2 z6#|ptye9JS+HM=N^|Z-|@euWVtE3n8^*?bSqWe%{ z{V-W{aT4hZ2<_8CQ3D)(XS!5(_Hx+b5)1WD<~>ZdI)J-m~pd!=O9z#Dri_@&m0->;X0VOz8_M}@&=jH)9< zAoz>Fo1E=(9R&E|=bX@VK^*3Pxe2L*kRzQlt^{A9zE3xzP=68{-nyZ;y|ZUO%pUMO zUq#k?8kDW@PAtJg-zJIO*oU&sZh1Oea3ACC|9#T60)Xq}{$wfq_?%Q&k=+tgP#R%4 z^xF+PCsE+659=(^cAeReHaZ-FJ#>KrlmD{pD&fV?;h8Pu3b-o^yz+8YREOxKm~&76 zw#s?o#PUS*W*n7E^v*t#=@k6!RzF80d~Fh{i@aF*f;So1@yqN)i#$GL?h&$lc2uec zvUaYEC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SB%Kn^*OE3k&fXn!6bYx=$O!|Bp+2x^9*+7ox)Z{G!>$$wvVg>fg~T I)3Fc#A5dKsJ^%m! literal 0 HcmV?d00001 diff --git a/augustgamecourse/assets/graphics/player/run/player run 48x48.png.import b/augustgamecourse/assets/graphics/player/run/player run 48x48.png.import new file mode 100644 index 0000000..4d85f24 --- /dev/null +++ b/augustgamecourse/assets/graphics/player/run/player run 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvh48exhs1ir1" +path="res://.godot/imported/player run 48x48.png-6d66612d48bfa4c8721495ba557ab7c6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/player/run/player run 48x48.png" +dest_files=["res://.godot/imported/player run 48x48.png-6d66612d48bfa4c8721495ba557ab7c6.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/augustgamecourse/project.godot b/augustgamecourse/project.godot index 84fba20..3e3e644 100644 --- a/augustgamecourse/project.godot +++ b/augustgamecourse/project.godot @@ -15,6 +15,20 @@ run/main_scene="res://scenes/game.tscn" config/features=PackedStringArray("4.3", "Forward Plus") config/icon="res://icon.svg" +[display] + +window/size/viewport_width=320 +window/size/viewport_height=180 +window/size/window_width_override=960 +window/size/window_height_override=540 +window/stretch/mode="viewport" + +[file_customization] + +folder_colors={ +"res://assets/graphics/": "red" +} + [input] Shove={ diff --git a/augustgamecourse/scenes/bullet.tscn b/augustgamecourse/scenes/bullet.tscn index e149942..a3ed458 100644 --- a/augustgamecourse/scenes/bullet.tscn +++ b/augustgamecourse/scenes/bullet.tscn @@ -1,16 +1,23 @@ -[gd_scene load_steps=3 format=3 uid="uid://dkf3cij6wexnr"] +[gd_scene load_steps=4 format=3 uid="uid://dkf3cij6wexnr"] [ext_resource type="Script" path="res://scripts/bullet.gd" id="1_u02r5"] +[ext_resource type="Texture2D" uid="uid://bh5r6fry672a4" path="res://assets/graphics/pixel_bullet.png" id="2_veygi"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_5agw0"] size = Vector2(12, 4) [node name="Area2D" type="Area2D"] script = ExtResource("1_u02r5") -metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_5agw0") debug_color = Color(0.209612, 0.626644, 0.380971, 0.42) +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(-3, -2) +rotation = 3.14794 +scale = Vector2(0.09375, 0.09375) +texture = ExtResource("2_veygi") + [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/augustgamecourse/scenes/crate.tscn b/augustgamecourse/scenes/crate.tscn index 4f9140d..9f58dbd 100644 --- a/augustgamecourse/scenes/crate.tscn +++ b/augustgamecourse/scenes/crate.tscn @@ -1,10 +1,18 @@ -[gd_scene load_steps=2 format=3 uid="uid://0j0320rcnxo7"] +[gd_scene load_steps=3 format=3 uid="uid://0j0320rcnxo7"] + +[ext_resource type="Texture2D" uid="uid://i5fka3gxosi" path="res://assets/graphics/objects/crate.png" id="1_7fkgs"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_3vc5e"] [node name="RigidBody2D" type="RigidBody2D"] metadata/_edit_group_ = true +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, 1.5) +scale = Vector2(0.0757143, 0.0735714) +texture = ExtResource("1_7fkgs") + [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_3vc5e") debug_color = Color(0.838874, 0.379869, 0.162504, 0.42) diff --git a/augustgamecourse/scenes/game.tscn b/augustgamecourse/scenes/game.tscn index 53bd3b9..20060c6 100644 --- a/augustgamecourse/scenes/game.tscn +++ b/augustgamecourse/scenes/game.tscn @@ -1,39 +1,107 @@ -[gd_scene load_steps=6 format=3 uid="uid://diss5ty7548p3"] +[gd_scene load_steps=10 format=4 uid="uid://diss5ty7548p3"] [ext_resource type="PackedScene" uid="uid://0j0320rcnxo7" path="res://scenes/crate.tscn" id="1_8ekmb"] +[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_mpwqj"] [ext_resource type="PackedScene" uid="uid://dbgc24hrbtvxm" path="res://scenes/player.tscn" id="2_dlxtb"] +[ext_resource type="Texture2D" uid="uid://dj70wmrhdo67v" path="res://assets/graphics/environment/Terrain (32x32).png" id="2_o4xfa"] [ext_resource type="PackedScene" uid="uid://csewven6s5npw" path="res://scenes/trigger.tscn" id="3_t3xge"] +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8ejyg"] +texture = ExtResource("2_o4xfa") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +1:0/0 = 0 +2:0/0 = 0 +4:0/0 = 0 +6:0/0 = 0 +7:0/0 = 0 +9:0/0 = 0 +10:0/0 = 0 +12:0/0 = 0 +13:0/0 = 0 +15:0/0 = 0 +0:1/0 = 0 +1:1/0 = 0 +2:1/0 = 0 +4:1/0 = 0 +6:1/0 = 0 +7:1/0 = 0 +9:1/0 = 0 +10:1/0 = 0 +12:1/0 = 0 +13:1/0 = 0 +15:1/0 = 0 +16:1/0 = 0 +0:2/0 = 0 +1:2/0 = 0 +2:2/0 = 0 +4:2/0 = 0 +6:3/0 = 0 +7:3/0 = 0 +9:3/0 = 0 +10:3/0 = 0 +12:3/0 = 0 +13:3/0 = 0 +15:3/0 = 0 +16:3/0 = 0 +0:4/0 = 0 +1:4/0 = 0 +2:4/0 = 0 +4:4/0 = 0 +6:4/0 = 0 +7:4/0 = 0 +9:4/0 = 0 +10:4/0 = 0 +12:4/0 = 0 +13:4/0 = 0 +15:4/0 = 0 +16:4/0 = 0 + +[sub_resource type="TileSet" id="TileSet_cs2mx"] +tile_size = Vector2i(32, 32) +sources/0 = SubResource("TileSetAtlasSource_8ejyg") + [sub_resource type="RectangleShape2D" id="RectangleShape2D_byea1"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_nl2iw"] [node name="World" type="Node2D"] +[node name="SceneManager" type="Node" parent="."] +unique_name_in_owner = true +script = ExtResource("1_mpwqj") + +[node name="TileMapLayer" type="TileMapLayer" parent="."] +tile_map_data = PackedByteArray("AAASAAwAAAAAAAAAAAATAAwAAAABAAAAAAAUAAwAAAACAAAAAAAQAAwAAAAEAAQAAAAPAA4AAAAEAAQAAAANAA8AAAAEAAQAAAA=") +tile_set = SubResource("TileSet_cs2mx") + [node name="Platform" type="StaticBody2D" parent="."] -position = Vector2(537, 386) +position = Vector2(528, 395) +scale = Vector2(1.48, 1) metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"] shape = SubResource("RectangleShape2D_byea1") [node name="Platform4" type="StaticBody2D" parent="."] -position = Vector2(494, 449) +position = Vector2(496, 459) +scale = Vector2(1.4, 1) metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform4"] shape = SubResource("RectangleShape2D_byea1") [node name="Platform5" type="StaticBody2D" parent="."] -position = Vector2(452, 489) +position = Vector2(432, 491) +scale = Vector2(1.44, 1) metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform5"] shape = SubResource("RectangleShape2D_byea1") [node name="Platform2" type="StaticBody2D" parent="."] -position = Vector2(623, 386) -scale = Vector2(3.16, 1) +position = Vector2(624, 395) +scale = Vector2(4.68, 1) metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform2"] @@ -55,14 +123,22 @@ metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"] shape = SubResource("WorldBoundaryShape2D_nl2iw") -[node name="CharacterBody2D" parent="." instance=ExtResource("2_dlxtb")] +[node name="CharacterBody2D" parent="." groups=["player"] instance=ExtResource("2_dlxtb")] position = Vector2(650, 362) +[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"] + [node name="Area2D" parent="." instance=ExtResource("3_t3xge")] position = Vector2(739, 500) [node name="RigidBody2D" parent="." groups=["pushables"] instance=ExtResource("1_8ekmb")] position = Vector2(605, 327) +[node name="RigidBody2D3" parent="." groups=["pushables"] instance=ExtResource("1_8ekmb")] +position = Vector2(648, 268) + [node name="RigidBody2D2" parent="." groups=["pushables"] instance=ExtResource("1_8ekmb")] position = Vector2(718, 331) + +[node name="BoxTrapTarget" type="Node2D" parent="."] +position = Vector2(693, 306) diff --git a/augustgamecourse/scenes/player.tscn b/augustgamecourse/scenes/player.tscn index 079a61c..f2b10bb 100644 --- a/augustgamecourse/scenes/player.tscn +++ b/augustgamecourse/scenes/player.tscn @@ -1,6 +1,174 @@ -[gd_scene load_steps=3 format=3 uid="uid://dbgc24hrbtvxm"] +[gd_scene load_steps=28 format=3 uid="uid://dbgc24hrbtvxm"] [ext_resource type="Script" path="res://scripts/player.gd" id="1_5qpif"] +[ext_resource type="Texture2D" uid="uid://pdvgf3y1lquv" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_vcmr0"] +[ext_resource type="Texture2D" uid="uid://cvh48exhs1ir1" path="res://assets/graphics/player/run/player run 48x48.png" id="3_a03rx"] +[ext_resource type="Texture2D" uid="uid://d0kfe5ms2vjbr" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_mvdmt"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_etdvv"] +atlas = ExtResource("2_vcmr0") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aj5ep"] +atlas = ExtResource("2_vcmr0") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qxp7n"] +atlas = ExtResource("2_vcmr0") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8ypci"] +atlas = ExtResource("2_vcmr0") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_r8hvl"] +atlas = ExtResource("2_vcmr0") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_esrko"] +atlas = ExtResource("2_vcmr0") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y2vr2"] +atlas = ExtResource("2_vcmr0") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yd3xy"] +atlas = ExtResource("2_vcmr0") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_essvh"] +atlas = ExtResource("2_vcmr0") +region = Rect2(384, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4c8ee"] +atlas = ExtResource("2_vcmr0") +region = Rect2(432, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5ryb4"] +atlas = ExtResource("3_mvdmt") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ie0y6"] +atlas = ExtResource("3_mvdmt") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vdfmb"] +atlas = ExtResource("3_mvdmt") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qxesk"] +atlas = ExtResource("3_a03rx") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ardbr"] +atlas = ExtResource("3_a03rx") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yhaaq"] +atlas = ExtResource("3_a03rx") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jjfaw"] +atlas = ExtResource("3_a03rx") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_snon0"] +atlas = ExtResource("3_a03rx") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_14kp5"] +atlas = ExtResource("3_a03rx") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_76poi"] +atlas = ExtResource("3_a03rx") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rnnye"] +atlas = ExtResource("3_a03rx") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="SpriteFrames" id="SpriteFrames_wlxdo"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_etdvv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aj5ep") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qxp7n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8ypci") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_r8hvl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_esrko") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y2vr2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yd3xy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_essvh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4c8ee") +}], +"loop": true, +"name": &"idle", +"speed": 15.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_5ryb4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ie0y6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vdfmb") +}], +"loop": false, +"name": &"jump", +"speed": 9.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_qxesk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ardbr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yhaaq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jjfaw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_snon0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_14kp5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_76poi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rnnye") +}], +"loop": true, +"name": &"run", +"speed": 15.0 +}] [sub_resource type="CircleShape2D" id="CircleShape2D_mcosy"] @@ -8,6 +176,13 @@ script = ExtResource("1_5qpif") metadata/_edit_group_ = true +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, -7) +sprite_frames = SubResource("SpriteFrames_wlxdo") +animation = &"jump" +autoplay = "idle" + [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_mcosy") debug_color = Color(0.826895, 0.282133, 0.703752, 0.42) diff --git a/augustgamecourse/scripts/bullet.gd b/augustgamecourse/scripts/bullet.gd index c66f0fa..6c7b3ce 100644 --- a/augustgamecourse/scripts/bullet.gd +++ b/augustgamecourse/scripts/bullet.gd @@ -1,10 +1,15 @@ extends Area2D +@onready var bulletsprite: Sprite2D = $Sprite2D var speed := 700 signal hit(bullet, body) func setSpeed(speedVal): speed = speedVal + if speedVal < 0: + bulletsprite.flip_h = true + else: + bulletsprite.flip_h = false func _physics_process(delta: float) -> void: position += transform.x * speed * delta diff --git a/augustgamecourse/scripts/player.gd b/augustgamecourse/scripts/player.gd index cfea604..0fb7453 100644 --- a/augustgamecourse/scripts/player.gd +++ b/augustgamecourse/scripts/player.gd @@ -13,6 +13,7 @@ var pushRightEnabled = false @onready var left_ray: RayCast2D = $LeftRay @onready var marker_right: Node2D = $MarkerRight @onready var marker_left: Node2D = $MarkerLeft +@onready var playerSprite: AnimatedSprite2D = $AnimatedSprite2D var pushTarget @@ -39,32 +40,41 @@ func _physics_process(delta: float) -> void: pushRightEnabled=false if Input.is_action_just_pressed("shoot"): - print("I will shoot") - var mybullet = bullet.instantiate() + + if faceLeft: print("shoot left") - mybullet.setSpeed(-700) - mybullet.transform = marker_left.global_transform + # mybullet.setSpeed(-700) + #mybullet.transform = marker_left.global_transform + %SceneManager.placeBullet(-700, marker_left.global_transform) else: print("shoot right") - mybullet.transform = marker_right.global_transform - - owner.add_child(mybullet) + #mybullet.transform = marker_right.global_transform + %SceneManager.placeBullet(700, marker_right.global_transform) # Get the input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. var direction := Input.get_axis("ui_left", "ui_right") if direction <0: faceLeft = true + playerSprite.flip_h = true if direction >0: faceLeft = false + playerSprite.flip_h = false if direction: velocity.x = direction * SPEED else: velocity.x = move_toward(velocity.x, 0, SPEED) - + if is_on_floor(): + if direction == 0: + playerSprite.play("idle") + else: + playerSprite.play("run") + else: + playerSprite.play("jump") + move_and_slide() for i in get_slide_collision_count(): var c = get_slide_collision(i) diff --git a/augustgamecourse/scripts/scene_manager.gd b/augustgamecourse/scripts/scene_manager.gd new file mode 100644 index 0000000..92812c8 --- /dev/null +++ b/augustgamecourse/scripts/scene_manager.gd @@ -0,0 +1,49 @@ +extends Node +var crate = preload("res://scenes/crate.tscn") +var bullet = preload("res://scenes/bullet.tscn") +var bulletPool:Array = [] +# crate stuff +var cratePool:Array = [] +@onready var box_trap_target: Node2D = $"../BoxTrapTarget" + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + #pool all the crates + for obj in owner.get_children(): + if obj.is_in_group("pushables"): + cratePool.push_back(obj) + print("Total crates on screen : "+str(cratePool.size() ) ) + +func boxTrap(): + print("Trigger a box trap!") + var myCrate = crateFactory() + myCrate.transform = box_trap_target.transform + owner.add_child(myCrate) + +func bulletFactory(): + # makes bullets!! + var myBullet + print("total bullets in play : "+str(bulletPool.size() )) + if bulletPool.size() > 3: + myBullet = bulletPool.pop_front() + else: + myBullet = bullet.instantiate() + owner.add_child(myBullet) + #or....recycles bullets + return myBullet + +func placeBullet(speed, markerpos): + print("SceneManager: make a bullet") + var myBullet = bulletFactory() + bulletPool.push_back(myBullet) + print("Total bullets in play: "+str(bulletPool.size() ) ) + # set the speed of bullet + myBullet.setSpeed(speed) + # set the position of the bullet + myBullet.transform = markerpos + # make the bullet visible by adding it + +func crateFactory(): + var myCrate = crate.instantiate() + myCrate.add_to_group("pushables") + return myCrate diff --git a/augustgamecourse/scripts/trigger.gd b/augustgamecourse/scripts/trigger.gd index 8db2bfb..aaa2f99 100644 --- a/augustgamecourse/scripts/trigger.gd +++ b/augustgamecourse/scripts/trigger.gd @@ -13,6 +13,9 @@ func _process(delta: float) -> void: func _on_body_entered(body: Node2D) -> void: print("Trigger is fired") + if body.is_in_group("player"): + print("player entered the trap") + %SceneManager.boxTrap() func _on_body_exited(body: Node2D) -> void: