From 968af25bcae6334c8868c5af5c6731526d4e2fa5 Mon Sep 17 00:00:00 2001 From: zvoverman Date: Sat, 31 Aug 2024 11:20:51 -0600 Subject: [PATCH] final touches --- assets/bg_layer_1.png | Bin 0 -> 7812 bytes assets/bg_layer_1.png.import | 34 ++++++++ assets/bg_layer_2.png | Bin 0 -> 7284 bytes assets/bg_layer_2.png.import | 34 ++++++++ assets/dumpster.png | Bin 222 -> 360 bytes assets/fallen_trash_bin.png | Bin 0 -> 309 bytes assets/fallen_trash_bin.png.import | 34 ++++++++ assets/floor.png | Bin 8463 -> 8463 bytes assets/kickflip.png | Bin 0 -> 390 bytes assets/kickflip.png.import | 34 ++++++++ assets/kickflip_anim.png.png | Bin 0 -> 705 bytes assets/kickflip_anim.png.png.import | 34 ++++++++ assets/skate_dude_gray.png | Bin 651 -> 582 bytes assets/traffic_cone.png | Bin 0 -> 195 bytes assets/traffic_cone.png.import | 34 ++++++++ assets/traffic_cone_placeholder.png | Bin 180 -> 243 bytes assets/trash_bin.png | Bin 162 -> 288 bytes project.godot | 2 +- scenes/chunk.tscn | 98 +-------------------- scenes/dumpster.tscn | 5 +- scenes/fallen_trash_bin.tscn | 23 +++++ scenes/player.tscn | 129 +++++++++++++++++++--------- scenes/traffic_cone.tscn | 9 +- scenes/trash_bin.tscn | 7 +- scenes/world.tscn | 26 +++++- scripts/chunk.gd | 7 +- scripts/player.gd | 21 +++-- scripts/world.gd | 5 ++ 28 files changed, 379 insertions(+), 157 deletions(-) create mode 100644 assets/bg_layer_1.png create mode 100644 assets/bg_layer_1.png.import create mode 100644 assets/bg_layer_2.png create mode 100644 assets/bg_layer_2.png.import create mode 100644 assets/fallen_trash_bin.png create mode 100644 assets/fallen_trash_bin.png.import create mode 100644 assets/kickflip.png create mode 100644 assets/kickflip.png.import create mode 100644 assets/kickflip_anim.png.png create mode 100644 assets/kickflip_anim.png.png.import create mode 100644 assets/traffic_cone.png create mode 100644 assets/traffic_cone.png.import create mode 100644 scenes/fallen_trash_bin.tscn diff --git a/assets/bg_layer_1.png b/assets/bg_layer_1.png new file mode 100644 index 0000000000000000000000000000000000000000..160bbb9e6c313f0b19f429426f1a1c60ab1556c0 GIT binary patch literal 7812 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 DHG`Ei literal 0 HcmV?d00001 diff --git a/assets/bg_layer_1.png.import b/assets/bg_layer_1.png.import new file mode 100644 index 0000000..53735d5 --- /dev/null +++ b/assets/bg_layer_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://g72h528mv865" +path="res://.godot/imported/bg_layer_1.png-8aa06c673d4d479858fe120eb3580956.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/bg_layer_1.png" +dest_files=["res://.godot/imported/bg_layer_1.png-8aa06c673d4d479858fe120eb3580956.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/assets/bg_layer_2.png b/assets/bg_layer_2.png new file mode 100644 index 0000000000000000000000000000000000000000..5e3f0139b586417f511180e7589536137ba22119 GIT binary patch literal 7284 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 Gf&c)^Ka}_Y literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Et!3HGD8EPYe)M8H;#}E(i%-f9kQiV|CFEjQcQK*mA)bYh=lIg2BEMO9Uh2>0#n`R*6}FEA=xUAc1Q zgB|AP=F3kM&3HCh-M?w(=JfN&J{VjxF<8LIu#{0zQE@|eqGE$w&k;6monHxxAKu-y zW@`#;ILmk>s>A#4g>r`2#R(?j3hfL_JNaYnPd+`+V9AhTsA2tR^-+&P8N1C43yO0E WTetqd2Xrojr>mdKI;Vst1_l7$id9Si diff --git a/assets/fallen_trash_bin.png b/assets/fallen_trash_bin.png new file mode 100644 index 0000000000000000000000000000000000000000..2e4fc70276ff697d41a65926004ad56b685fa4fa GIT binary patch literal 309 zcmV-50m}Y~P)BwZq=y;_#XB{LzXS*lA!H9!&bj?L!8M6y0enn?*LD4n zn5OBthX^Dt5s=^*;|?9i@qkl=5~Z_eQv!1K6abuKKvRiJ1affBP)cC@90A$+X#(DR zGtaZZFG|8PbW4C;%pS;PjGLk1;N!z#ae`&%5UWx8!aCLS=j1yZEkDS!XvSAPoUE&GM(k=qfu5#f-c|-6@O1TaS?83{#J~Um D<){&s delta 48 zcmeBo>UWx8!YZ2lGx_F5%MbD_9?IGqC+jMl5&L!d-QJ$A@ID40@O1TaS?83{#J~Um D<|h(_ diff --git a/assets/kickflip.png b/assets/kickflip.png new file mode 100644 index 0000000000000000000000000000000000000000..9374ea41d8601ecdca97eee87e5bc3907d80d29e GIT binary patch literal 390 zcmeAS@N?(olHy`uVBq!ia0vp^2|%pC!3HGX9;gjrU|{s|ba4#HaDF@ep`eR_K* ztA!#{HCz2&9PvGK^oh}oUf(@4s_XRq_vME#G1{|$MJvPVFfVJv>;@(c1|J5Q^PCG9 z3>XV+)Ek%%upIa}hk=VhnBjOacFBf%VFRASx4zpRtv_ndbjYc^_u96#nX{fvj43GY zezduH!w21xa>0M=r>|j>sbSx{?saM8v^6sqZPQ+%A>AWT=a{YcDpZ4EjdC|b+5S6O zMT{-_?fKf>f(GY5|68pUdFbN(DJhffSAVRZs`_)~IU`TjJ8$dQ_rJC>?tA?7*I%jl zCbtBgn(s}TDmhH==J@r$yT~=6WM2GZmWUshOJL^gBWep#XrF-0HF_kw+ X+OJp{zO)$_ybPYMelF{r5}FtQg_)rY literal 0 HcmV?d00001 diff --git a/assets/kickflip.png.import b/assets/kickflip.png.import new file mode 100644 index 0000000..660b212 --- /dev/null +++ b/assets/kickflip.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs1aswuagw3d5" +path="res://.godot/imported/kickflip.png-57f5795c54b8adfaec426da4840ba0fd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/kickflip.png" +dest_files=["res://.godot/imported/kickflip.png-57f5795c54b8adfaec426da4840ba0fd.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/assets/kickflip_anim.png.png b/assets/kickflip_anim.png.png new file mode 100644 index 0000000000000000000000000000000000000000..140a3ec28d7bea642b87dbad40c8aac269af24f4 GIT binary patch literal 705 zcmV;y0zUnTP)b}$2u%L}qubaMcZh~#4RT`*>$lbc!5%_(@_g_j0*w)PHtwCR6M+W}KoPV?fCgwy zKbxlksDai9&;YIJXY(`wHP9LX8lW}(Y@P<723jLP1GJ`}&C>wXKx+hOfY$W0c^ZHk zXpI03(3*ZWPXkZ`tr4IBTGP+wX#i@VH3F^yeqPsx&hvF;P+C1c)AJEi?S0Er&9QoX z1%DJj8bCq0DjXF2h~R1+tH)PyMEXzd>=ALR-$#I3y~kDRznTk9fD4o`gS0#3sMb)8 zuTq1oPXi1nBcOT29PyQBr|RgJ@!2}6eN^LTV&FZ)(f}73Ap7EA2Jtg;%-RUPi38FD z4KUdNcM#uO*>|Z9nFG&2y?mh1Qh?qR{BJtMbsKi?RAl#pgmB&9sKQw^Cf?@Joe_UZ_`^|0P7id7XfbdP?+-h_X*&0VD<}2Luph zpTq)43{VaTAj&?81&|n^90&p0_x*E3-?r^`&}QUjWBhkLMFuFo1R&P61T)O*E0A1BHS0aQ5wqwSHc!d}scrgv@G&FN28W@PW`voSLLj3JI{$Z|&j zx4F!Q@C%?(5_FwK5FmxyH&7KG|Msealj%{27yvUZa+PN>A_%kV`_TG1{%jzo01HqB z7{5h&g?b=HzkU7LsqMvKHb9my^M&=F-GJ5n-7BouWY&1^1ZQTVQ0TjR9jMIz57Xs@ UKUhgi%K!iX07*qoM6N<$g2Wm7E&u=k literal 651 zcmV;60(AX}P)0006|NklYui%n*wDeDHw)1i}({hV7ijApn5~0mcLn z2uy$g2NsXkAwYof00aUPAi#meqjd-nU_1bUzyt_zVDV@j0t6TjKp-#y0vuR8T897u z#sd%tOn?9f7LV2;K!EW81OgKvz=6dpwZ1IN&;I*$U7NJNdwmpJG>IBzs4Mh&_W;eF zKZ=J4@Ruqz+raE^dx9BdD+269ngG}W5S^cstv;3|z)qxR8_;R2+bnC_j?> z0i4DUzpPb1YrP7P0IQ@LuNx&`V_RH4h`=cQ32;WxQ34F|6Wa_XFv>p!m;ev9_C2;E zz>{?zCBWn{**-Xd%bvj209xzM_Qk%R(!Z)+*X6!1efR1&ojEr{ZU55jy}j+%Jes36 zn|J-$daLUZV3pL{;H`g2+?H<%pwiM&AC>^BwOeoL{?__4ZXjw8rJIO_eXlo^J#*J& z13dc#vhHuKPl2`E;g4!_#!pX%o>Ol#ziOb`Dcy5|o)N&>9Et|D*=md|^+z|5+>KW0 zW3NN*dba>u1LRS!7@#+NrMlMe*2J~kv8nYXka|oFbvk16o6*?sGj0G0|)SJ^A~1iDh{U=lvFu l({HxL*x#E#YyN%#@)amQ=fizF00000NkvXXu0mjf004W%CTIWv diff --git a/assets/traffic_cone.png b/assets/traffic_cone.png new file mode 100644 index 0000000000000000000000000000000000000000..ad90bc348e83ecd30d450e643efd911fa69fa6b3 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<5!3HFyJAa%3QXQTyjv*f2Z$lmV4k&OOp8rGm zW9qT_pC;$(9F$Pc;hdg(adoEdQV)jboPIVsOc8Q2icyw3J}MmBAvp2n=Gv!$E)ZQu}+>#rsPYB`=*^3Um{Lr>mdKI;Vst1_l5$MoGc| literal 0 HcmV?d00001 diff --git a/assets/traffic_cone.png.import b/assets/traffic_cone.png.import new file mode 100644 index 0000000..83063ca --- /dev/null +++ b/assets/traffic_cone.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://br5fxiry2swpn" +path="res://.godot/imported/traffic_cone.png-e0fb7ebc04fd69b5864bd396516ebcb2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/traffic_cone.png" +dest_files=["res://.godot/imported/traffic_cone.png-e0fb7ebc04fd69b5864bd396516ebcb2.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/assets/traffic_cone_placeholder.png b/assets/traffic_cone_placeholder.png index f1f0e5b0a23a9ecd233c21b6defa4c31ba739984..3ff9b593bf6e83ffe67a2224c0e3a94180b7e152 100644 GIT binary patch delta 228 zcmV}7e&J;qJ2XJ#Kg}nDeh-$$4Xhw}Jx&Y{NO#yH^pX{95AYHv>9t-7k>~41^@s6AM^iV0001bNklE0Q&Vu({7^+@E+bb;TjZUY%&kX^f3|q TZ~-R(0000YRc&Lu7#aT)GSZ0EG|+ zfRvIV1GNBzw+0Z;J_0C1xz17iX8>e?Y;byq1JE4w7-(HW-A6DTfQGQg!2b=QbO32E mhu;GWV7dYB(rN9t?t%yQU5_Ea7B&$80000z8=yu!eC zCs9B~=8wE>!}WEs-GXTr%z`Nlo7hV1&J?U+OV}*CjPb6h1lxnlJ!b{x=zaL|CFRDx zT5IMWF(IL(itq1anH|L&au|0eNk}k!;@V~IkmSFVdQ J&MBdZ0RRCsG>ZTL diff --git a/project.godot b/project.godot index d958d9d..6a15a4e 100644 --- a/project.godot +++ b/project.godot @@ -38,4 +38,4 @@ ui_up={ [rendering] textures/canvas_textures/default_texture_filter=0 -environment/defaults/default_clear_color=Color(0.899258, 0.899258, 0.899258, 1) +environment/defaults/default_clear_color=Color(0.87451, 0.87451, 0.87451, 1) diff --git a/scenes/chunk.tscn b/scenes/chunk.tscn index e2c316d..1a35556 100644 --- a/scenes/chunk.tscn +++ b/scenes/chunk.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://d1ye7lacsmglb"] [ext_resource type="Script" path="res://scripts/chunk.gd" id="1_t73m7"] -[ext_resource type="Texture2D" uid="uid://fotmrav530xb" path="res://assets/road.png" id="2_k5wgc"] +[ext_resource type="Texture2D" uid="uid://diblvp3gxsr6q" path="res://assets/floor.png" id="2_v0ykj"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_5jwgi"] size = Vector2(640, 640) @@ -20,100 +20,8 @@ position = Vector2(320, 320) scale = Vector2(1.1, 1) shape = SubResource("RectangleShape2D_5jwgi") -[node name="Sprite2D9" type="Sprite2D" parent="Floor"] -position = Vector2(-48, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D10" type="Sprite2D" parent="Floor"] -position = Vector2(-16, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D11" type="Sprite2D" parent="Floor"] -position = Vector2(16, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D12" type="Sprite2D" parent="Floor"] -position = Vector2(48, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D13" type="Sprite2D" parent="Floor"] -position = Vector2(80, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D14" type="Sprite2D" parent="Floor"] -position = Vector2(112, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D15" type="Sprite2D" parent="Floor"] -position = Vector2(144, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D16" type="Sprite2D" parent="Floor"] -position = Vector2(176, -289) -texture = ExtResource("2_k5wgc") - [node name="Sprite2D" type="Sprite2D" parent="Floor"] -position = Vector2(-304, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D2" type="Sprite2D" parent="Floor"] -position = Vector2(-272, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D3" type="Sprite2D" parent="Floor"] -position = Vector2(-240, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D4" type="Sprite2D" parent="Floor"] -position = Vector2(-208, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D5" type="Sprite2D" parent="Floor"] -position = Vector2(-176, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D6" type="Sprite2D" parent="Floor"] -position = Vector2(-144, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D7" type="Sprite2D" parent="Floor"] -position = Vector2(-112, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D8" type="Sprite2D" parent="Floor"] -position = Vector2(-80, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D17" type="Sprite2D" parent="Floor"] -position = Vector2(208, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D18" type="Sprite2D" parent="Floor"] -position = Vector2(240, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D19" type="Sprite2D" parent="Floor"] -position = Vector2(272, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D20" type="Sprite2D" parent="Floor"] -position = Vector2(304, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D21" type="Sprite2D" parent="Floor"] -position = Vector2(336, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D22" type="Sprite2D" parent="Floor"] -position = Vector2(368, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D23" type="Sprite2D" parent="Floor"] -position = Vector2(-368, -289) -texture = ExtResource("2_k5wgc") - -[node name="Sprite2D24" type="Sprite2D" parent="Floor"] -position = Vector2(-336, -289) -texture = ExtResource("2_k5wgc") +scale = Vector2(1.1, 1) +texture = ExtResource("2_v0ykj") [connection signal="tree_exited" from="." to="." method="_on_tree_exited"] diff --git a/scenes/dumpster.tscn b/scenes/dumpster.tscn index 3f4ac3d..333fb2c 100644 --- a/scenes/dumpster.tscn +++ b/scenes/dumpster.tscn @@ -4,19 +4,20 @@ [ext_resource type="Script" path="res://scripts/obstacle.gd" id="1_875mt"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_gu0a6"] -size = Vector2(44, 30) +size = Vector2(60, 44) [node name="Dumpster" type="StaticBody2D"] script = ExtResource("1_875mt") [node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(0, -16) scale = Vector2(2, 2) texture = ExtResource("1_2cg1o") [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2(0, 1) +position = Vector2(0, -6) shape = SubResource("RectangleShape2D_gu0a6") [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/scenes/fallen_trash_bin.tscn b/scenes/fallen_trash_bin.tscn new file mode 100644 index 0000000..46cd96f --- /dev/null +++ b/scenes/fallen_trash_bin.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=3 uid="uid://cbp36gw8aqkpq"] + +[ext_resource type="Script" path="res://scripts/obstacle.gd" id="1_8pcuq"] +[ext_resource type="Texture2D" uid="uid://ggokg3argpbk" path="res://assets/fallen_trash_bin.png" id="2_pahix"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_ehy2f"] +radius = 14.0 + +[node name="Fallen_Trash_Bin" type="StaticBody2D"] +script = ExtResource("1_8pcuq") + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(-3.425, -16) +scale = Vector2(2, 2) +texture = ExtResource("2_pahix") + +[node name="Area2D" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(1, 2) +shape = SubResource("CircleShape2D_ehy2f") + +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/scenes/player.tscn b/scenes/player.tscn index 94ac877..34917a6 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -1,13 +1,13 @@ -[gd_scene load_steps=18 format=3 uid="uid://cpos732lfps07"] +[gd_scene load_steps=17 format=3 uid="uid://cpos732lfps07"] [ext_resource type="Script" path="res://scripts/player.gd" id="1_nc2u8"] -[ext_resource type="Texture2D" uid="uid://b85cbrudora1x" path="res://assets/idle_anim.png" id="2_owago"] +[ext_resource type="Texture2D" uid="uid://cs1aswuagw3d5" path="res://assets/kickflip.png" id="3_80mky"] [ext_resource type="Texture2D" uid="uid://c1aadu4ibolyb" path="res://assets/skate_dude_gray.png" id="4_jgj0f"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_s0f7d"] -[sub_resource type="Animation" id="Animation_hv44y"] -resource_name = "idle_anim" +[sub_resource type="Animation" id="Animation_rqdn3"] +length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -30,7 +30,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [15] +"values": [11] } tracks/2/type = "value" tracks/2/imported = false @@ -57,8 +57,11 @@ tracks/3/keys = { "values": [0] } -[sub_resource type="Animation" id="Animation_rqdn3"] -length = 0.001 +[sub_resource type="Animation" id="Animation_a2wt3"] +resource_name = "fall_anim" +length = 0.13334 +loop_mode = 1 +step = 0.0666667 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -69,7 +72,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [ExtResource("2_owago")] +"values": [ExtResource("4_jgj0f")] } tracks/1/type = "value" tracks/1/imported = false @@ -81,8 +84,59 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, +"values": [9] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:vframes") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, "values": [1] } +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Sprite2D:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [8] +} + +[sub_resource type="Animation" id="Animation_hv44y"] +resource_name = "idle_anim" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [ExtResource("3_80mky")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [6] +} tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true @@ -110,7 +164,7 @@ tracks/3/keys = { [sub_resource type="Animation" id="Animation_peq0d"] resource_name = "jump_anim" -length = 0.73334 +length = 0.53334 step = 0.0666667 tracks/0/type = "value" tracks/0/imported = false @@ -134,7 +188,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [15] +"values": [9] } tracks/2/type = "value" tracks/2/imported = false @@ -155,15 +209,15 @@ tracks/3/path = NodePath("Sprite2D:frame") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { -"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2, 0.266667, 0.333333, 0.4, 0.466667, 0.533333, 0.6, 0.666667), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"times": PackedFloat32Array(0, 0.066666, 0.133333, 0.2, 0.266666, 0.333333, 0.4, 0.466667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), "update": 1, -"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +"values": [1, 2, 3, 4, 5, 6, 7, 8] } -[sub_resource type="Animation" id="Animation_a2wt3"] -resource_name = "fall_anim" -length = 0.13334 +[sub_resource type="Animation" id="Animation_ru3gh"] +resource_name = "kickflip" +length = 0.400007 step = 0.0666667 tracks/0/type = "value" tracks/0/imported = false @@ -175,7 +229,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [ExtResource("4_jgj0f")] +"values": [ExtResource("3_80mky")] } tracks/1/type = "value" tracks/1/imported = false @@ -187,7 +241,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [15] +"values": [6] } tracks/2/type = "value" tracks/2/imported = false @@ -208,10 +262,10 @@ tracks/3/path = NodePath("Sprite2D:frame") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/keys = { -"times": PackedFloat32Array(0, 0.0666667), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0, 0.0666667, 0.133333, 0.2, 0.266667, 0.333333), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), "update": 1, -"values": [13, 14] +"values": [0, 1, 2, 3, 4, 5] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_b4cbu"] @@ -219,48 +273,41 @@ _data = { "RESET": SubResource("Animation_rqdn3"), "fall_anim": SubResource("Animation_a2wt3"), "idle_anim": SubResource("Animation_hv44y"), -"jump_anim": SubResource("Animation_peq0d") +"jump_anim": SubResource("Animation_peq0d"), +"kickflip": SubResource("Animation_ru3gh") } -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ohqf5"] -animation = &"fall_anim" - [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_px8r0"] animation = &"idle_anim" -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6bnqg"] -animation = &"jump_anim" +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qqsi6"] +animation = &"kickflip" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sjec6"] advance_mode = 2 -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lcoik"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rxn5g"] -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4ucyu"] -switch_mode = 2 -advance_mode = 2 - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nbp7g"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ki3dc"] switch_mode = 2 advance_mode = 2 [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_io5t7"] states/Start/position = Vector2(266, 109) -states/fall_anim/node = SubResource("AnimationNodeAnimation_ohqf5") -states/fall_anim/position = Vector2(361, 230) states/idle_anim/node = SubResource("AnimationNodeAnimation_px8r0") states/idle_anim/position = Vector2(456, 109) -states/jump_anim/node = SubResource("AnimationNodeAnimation_6bnqg") -states/jump_anim/position = Vector2(568, 230) -transitions = ["Start", "idle_anim", SubResource("AnimationNodeStateMachineTransition_sjec6"), "idle_anim", "jump_anim", SubResource("AnimationNodeStateMachineTransition_lcoik"), "jump_anim", "fall_anim", SubResource("AnimationNodeStateMachineTransition_4ucyu"), "fall_anim", "idle_anim", SubResource("AnimationNodeStateMachineTransition_nbp7g")] -graph_offset = Vector2(-256, 86) +states/kickflip/node = SubResource("AnimationNodeAnimation_qqsi6") +states/kickflip/position = Vector2(517, 206) +transitions = ["Start", "idle_anim", SubResource("AnimationNodeStateMachineTransition_sjec6"), "idle_anim", "kickflip", SubResource("AnimationNodeStateMachineTransition_rxn5g"), "kickflip", "idle_anim", SubResource("AnimationNodeStateMachineTransition_ki3dc")] +graph_offset = Vector2(-115, 16) [node name="Player" type="CharacterBody2D"] script = ExtResource("1_nc2u8") [node name="Sprite2D" type="Sprite2D" parent="."] scale = Vector2(2, 2) -texture = ExtResource("2_owago") +texture = ExtResource("4_jgj0f") +hframes = 11 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(0, 18) @@ -274,3 +321,5 @@ libraries = { [node name="AnimationTree" type="AnimationTree" parent="."] tree_root = SubResource("AnimationNodeStateMachine_io5t7") anim_player = NodePath("../AnimationPlayer") + +[connection signal="animation_finished" from="AnimationTree" to="." method="_on_animation_tree_animation_finished"] diff --git a/scenes/traffic_cone.tscn b/scenes/traffic_cone.tscn index a29b3ec..35999e5 100644 --- a/scenes/traffic_cone.tscn +++ b/scenes/traffic_cone.tscn @@ -1,23 +1,24 @@ [gd_scene load_steps=4 format=3 uid="uid://cprufv651ifle"] -[ext_resource type="Texture2D" uid="uid://bnxkjag7lwjgx" path="res://assets/traffic_cone_placeholder.png" id="1_bo7m2"] [ext_resource type="Script" path="res://scripts/obstacle.gd" id="1_vfbeq"] +[ext_resource type="Texture2D" uid="uid://br5fxiry2swpn" path="res://assets/traffic_cone.png" id="2_gf4au"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bpx8e"] radius = 6.0 -height = 20.0 +height = 34.0 [node name="Traffic_Cone" type="StaticBody2D"] script = ExtResource("1_vfbeq") [node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(0, -16) scale = Vector2(2, 2) -texture = ExtResource("1_bo7m2") +texture = ExtResource("2_gf4au") [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2(0.85, 6.505) +position = Vector2(-1, -1) shape = SubResource("CapsuleShape2D_bpx8e") [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/scenes/trash_bin.tscn b/scenes/trash_bin.tscn index 5650569..bd7787a 100644 --- a/scenes/trash_bin.tscn +++ b/scenes/trash_bin.tscn @@ -4,20 +4,21 @@ [ext_resource type="Texture2D" uid="uid://ura1rws1kt66" path="res://assets/trash_bin.png" id="1_bst32"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ge82x"] -radius = 9.0 -height = 22.0 +radius = 13.0 +height = 36.0 [node name="Trash_Bin" type="StaticBody2D"] script = ExtResource("1_7patp") [node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(-3.425, -16) scale = Vector2(2, 2) texture = ExtResource("1_bst32") [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2(1, 6) +position = Vector2(1, -3) shape = SubResource("CapsuleShape2D_ge82x") [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/scenes/world.tscn b/scenes/world.tscn index bffbc50..a1adf9b 100644 --- a/scenes/world.tscn +++ b/scenes/world.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=4 format=3 uid="uid://1y6mjtlgxsvj"] +[gd_scene load_steps=6 format=3 uid="uid://1y6mjtlgxsvj"] [ext_resource type="Script" path="res://scripts/world.gd" id="1_n02te"] [ext_resource type="FontFile" uid="uid://b51saovrvm1yv" path="res://assets/fonts/Minecraft.ttf" id="2_5ehxf"] [ext_resource type="PackedScene" uid="uid://cpos732lfps07" path="res://scenes/player.tscn" id="2_ctbnd"] +[ext_resource type="Texture2D" uid="uid://g72h528mv865" path="res://assets/bg_layer_1.png" id="4_0hnt7"] +[ext_resource type="Texture2D" uid="uid://d4hor7kdbyuee" path="res://assets/bg_layer_2.png" id="5_63neo"] [node name="World" type="Node2D"] script = ExtResource("1_n02te") @@ -15,7 +17,7 @@ offset_left = 214.0 offset_top = -176.0 offset_right = 317.0 offset_bottom = -152.0 -theme_override_colors/font_color = Color(0.32549, 0.32549, 0.32549, 1) +theme_override_colors/font_color = Color(0.12549, 0.12549, 0.12549, 1) theme_override_fonts/font = ExtResource("2_5ehxf") horizontal_alignment = 2 @@ -24,7 +26,7 @@ offset_left = -316.0 offset_top = -176.0 offset_right = -209.0 offset_bottom = -151.0 -theme_override_colors/font_color = Color(0.32549, 0.32549, 0.32549, 1) +theme_override_colors/font_color = Color(0.12549, 0.12549, 0.12549, 1) theme_override_fonts/font = ExtResource("2_5ehxf") [node name="Chunks" type="Node" parent="."] @@ -33,3 +35,21 @@ theme_override_fonts/font = ExtResource("2_5ehxf") top_level = true position = Vector2(100, -100) World = NodePath("..") + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="MiddleLayer" type="ParallaxLayer" parent="ParallaxBackground"] +motion_scale = Vector2(0.6, 0.6) +motion_mirroring = Vector2(640, 0) + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/MiddleLayer"] +position = Vector2(320, -60) +texture = ExtResource("5_63neo") + +[node name="FrontLayer" type="ParallaxLayer" parent="ParallaxBackground"] +motion_scale = Vector2(0.8, 0.8) +motion_mirroring = Vector2(640, 0) + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/FrontLayer"] +position = Vector2(320, -120) +texture = ExtResource("4_0hnt7") diff --git a/scripts/chunk.gd b/scripts/chunk.gd index 6bc678a..0911e2a 100644 --- a/scripts/chunk.gd +++ b/scripts/chunk.gd @@ -4,7 +4,8 @@ extends Node2D var Trash_Bin: PackedScene = load("res://scenes/trash_bin.tscn") var Traffic_Cone: PackedScene = load("res://scenes/traffic_cone.tscn") var Dumpster: PackedScene = load("res://scenes/dumpster.tscn") -var obstacle_types: Array = [Trash_Bin, Traffic_Cone, Dumpster] +var Fallen_Trash_Bin: PackedScene = load("res://scenes/fallen_trash_bin.tscn") +var obstacle_types: Array = [Trash_Bin, Traffic_Cone, Dumpster, Fallen_Trash_Bin] var obstacles: Array = [] const START_X: int = 40; @@ -28,3 +29,7 @@ func create_obstacle(x_position: int) -> Node2D: obstacles.append(create_obstacle(obstacle.position.x + 200)) Obstacles.add_child(obstacle) return obstacle + +func new_obstacle(obstacle_name: String): + if obstacle_name == "Dumpster": + obstacle_types.append(Dumpster) diff --git a/scripts/player.gd b/scripts/player.gd index 016f60e..953417e 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -2,37 +2,42 @@ extends CharacterBody2D @onready var state_machine = $AnimationTree["parameters/playback"] @export var World: Node2D -const JUMP_VELOCITY = -300.0 +const JUMP_VELOCITY = -400.0 # Get the gravity from the project settings to be synced with RigidBody nodes. -var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") -@export var antiGravity: float = -400.0 - +var gravity = 2000 #ProjectSettings.get_setting("physics/2d/default_gravity") +@export var antiGravity: float = -1100.0 func _physics_process(delta): # Add the gravity. if not is_on_floor(): velocity.y += gravity * delta + else: + state_machine.travel('idle_anim') # Handle jump. if Input.is_action_just_pressed("ui_accept") and is_on_floor(): jump() # if jump is held, jump higher by reducing gravity - if(!is_on_floor() && Input.is_action_pressed("ui_accept") && velocity.y < 0): + if (!is_on_floor() && Input.is_action_pressed("ui_accept") && velocity.y < 0) or is_pressed: velocity.y += antiGravity * delta - - + move_and_slide() func jump(): velocity.y = JUMP_VELOCITY - state_machine.travel("jump_anim") + state_machine.travel("kickflip") func damage(): World.reset() +var is_pressed = false func _unhandled_input(event): if event is InputEventScreenTouch and is_on_floor(): jump() + if event is InputEventScreenTouch and event.pressed: + is_pressed = true + else: + is_pressed = false diff --git a/scripts/world.gd b/scripts/world.gd index e33aeac..128ee8e 100644 --- a/scripts/world.gd +++ b/scripts/world.gd @@ -7,6 +7,7 @@ extends Node2D @onready var Chunks = $Chunks @onready var Score = $Camera2D/Score @onready var HighScore = $Camera2D/HighScore +@onready var Background = $ParallaxBackground var ChunkScene: PackedScene = preload("res://scenes/chunk.tscn") var ChunkNoObstacleScene: PackedScene = preload("res://scenes/chunk_no_obstacles.tscn") var chunks: Array = []; @@ -29,11 +30,15 @@ func _process(delta): Score.text = str(total_score) update_chunks() move_chunks(speed, delta) + move_background(speed, delta) func move_chunks(speed: int, delta: float): for chunk in chunks: chunk.position.x -= speed * delta; +func move_background(speed: int, delta: float): + Background.scroll_base_offset.x -= speed * delta; + func update_chunks(): for chunk in chunks: if chunk.position.x < UNLOAD_CHUNK_X: