From 416982d88e97556c9e0dda35622902b19d8914c2 Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Mon, 9 Jan 2023 19:38:49 -0500 Subject: [PATCH] moved player raycast --- ...e.png-b16f6dab3533202eb4820e5dc612ba6f.md5 | 3 + ....png-b16f6dab3533202eb4820e5dc612ba6f.stex | Bin 0 -> 492 bytes ...d.png-d633f5249ccc091a7e592fabc835a18c.md5 | 2 +- ...l.png-665b03ca99f23d92830cd36201ff3f05.md5 | 3 + ....png-665b03ca99f23d92830cd36201ff3f05.stex | Bin 0 -> 190 bytes control.tscn | 2 +- graphics/enemy/snail.png | Bin 0 -> 229 bytes graphics/enemy/snail.png.import | 35 ++++++++++ graphics/hud/hud.png | Bin 736 -> 736 bytes graphics/tiles/cave.png | Bin 0 -> 488 bytes graphics/tiles/cave.png.import | 35 ++++++++++ maps/cave.tscn | 54 +++++++++++++++ objects/enemy/enemy_speedup_in_range.gd | 41 ++++++++++++ objects/enemy/slime.tscn | 1 + objects/enemy/snail.tscn | 50 ++++++++++++++ objects/ladder/ladder.tscn | 2 +- objects/player/player.gd | 2 +- objects/player/player.tscn | 3 +- project.godot | 4 ++ tilesets/t_cave.tres | 63 ++++++++++++++++++ 20 files changed, 294 insertions(+), 6 deletions(-) create mode 100644 .import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.md5 create mode 100644 .import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.stex create mode 100644 .import/snail.png-665b03ca99f23d92830cd36201ff3f05.md5 create mode 100644 .import/snail.png-665b03ca99f23d92830cd36201ff3f05.stex create mode 100644 graphics/enemy/snail.png create mode 100644 graphics/enemy/snail.png.import create mode 100644 graphics/tiles/cave.png create mode 100644 graphics/tiles/cave.png.import create mode 100644 maps/cave.tscn create mode 100644 objects/enemy/enemy_speedup_in_range.gd create mode 100644 objects/enemy/snail.tscn create mode 100644 tilesets/t_cave.tres diff --git a/.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.md5 b/.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.md5 new file mode 100644 index 0000000..96e6dfc --- /dev/null +++ b/.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.md5 @@ -0,0 +1,3 @@ +source_md5="e3faccac81a57b393e0b8825a7fd1a83" +dest_md5="de8e5d579635e1ee91db2d6b92c44407" + diff --git a/.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.stex b/.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.stex new file mode 100644 index 0000000000000000000000000000000000000000..7919e666f9abdcfbd0496865b81bd8e290159bf0 GIT binary patch literal 492 zcmVd=r>omvs?yMow6vK6UgL|_Kfw+gZ=#lQ+!Hj!k- zY73lNNI?fWkwTIE@H8PHDDr=_0RIOb24jjk$mJWH)&|YEzH55fo>vB2r7(UQ z+!C-=>Lxes=u)cGQibl3&=q~IB2vVYdl0UuS%NAvUxRqfERjh>X4dOHc)!MdCYeTS znh5upCyCU;->y)nvs6`JE}4>1G%L#AgA-V08j<`r$^T>4!|C&zZna8<;lx$Huw1~n zO)Z?j5aR?q#|hLx$_ZqWzOMXTCh2{J-VA@#b(XfSy*0+i+z7`k-dYQ54RL4VEDbC) za8Hc0u(h_^xqolOUyR?!mxd8?Pp!EV8*0!)JlKbRz}p^lA^8X8A6CYBtP7S;u06;3 icm|du$3h&U`pTAN0S<=F2@a89U|`?|VhB)RX9O}90dcsiQ$UcXo7*%fJ1oG$rxVE57jIw^uy>e{8{ESf z^Yb0ot!;_HZC7pelqYZFefloP&mrK+{|v?o&R1;z`40vvd-iQ{PGbDBhOyw?YcDCL z+YINf3P_ZGye`Ef_*Yy=Wri)2iKo`^9T5ZxL&>jwCQxK5lnXZ!YJ>&t_jUZggK+eX`Hm)eM0sBl?K3i;o6|Esan|BFul z-!S~YIuEEL{Eak- z;lDNL_OxaN0p^2ix4!%H|9Re|nFk+-{kpco#Y5)s(kW3|?>4bWIlN zPu#+?>(wDIR=-}o@44{&4NmzF_Ho%h>6cvO)bPvHxn)k;0*}ik%=;A*CY$a$`-a^> znpy9<)ZOyt)8?WAk<+gxbtEme*E-T6YP>pa@qD(=FB2IWUcOnD*v8J=zq8SZvH8>S zrl0yrN>M?s<$*rTMtrp&Uq1GGHg5^v@tw1OCiw4=ys%TX_NV&qohP;iw5_h0*Uj=d zamJ$JdEHOCJa;^$hWs)ndp}VGs8R{i))<_l+4%u zpl)|^^C9<|;~#kL-Mk|)Prv+)zE#QuQHweEwBGEt?sMilTeLyz&n8RD>8v^5*e`8S WT(SSogloW%WbkzLb6Mw<&;$T7B-fq* literal 0 HcmV?d00001 diff --git a/graphics/tiles/cave.png.import b/graphics/tiles/cave.png.import new file mode 100644 index 0000000..b84f01c --- /dev/null +++ b/graphics/tiles/cave.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/tiles/cave.png" +dest_files=[ "res://.import/cave.png-b16f6dab3533202eb4820e5dc612ba6f.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=true +svg/scale=1.0 diff --git a/maps/cave.tscn b/maps/cave.tscn new file mode 100644 index 0000000..7a1b713 --- /dev/null +++ b/maps/cave.tscn @@ -0,0 +1,54 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] +[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2] +[ext_resource path="res://objects/rock/rock.tscn" type="PackedScene" id=3] +[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=4] +[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=5] +[ext_resource path="res://objects/death tile/death_tile.tscn" type="PackedScene" id=6] +[ext_resource path="res://objects/enemy/snail.tscn" type="PackedScene" id=7] + +[node name="Map" type="Node2D"] + +[node name="CanvasLayer" parent="." instance=ExtResource( 4 )] + +[node name="TileMap2" type="TileMap" parent="."] +visible = false +tile_set = ExtResource( 2 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 0, 0, 3, 1, 0, 3, 2, 0, 3, 3, 0, 3, 4, 0, 3, 5, 0, 3, 6, 0, 3, 7, 0, 3, 8, 0, 3, 9, 0, 3, 10, 0, 3, 11, 0, 3, 12, 0, 3, 13, 0, 3, 14, 0, 3, 15, 0, 3, 16, 0, 3, 17, 0, 3, 18, 0, 3, 19, 0, 3, 20, 0, 3, 21, 0, 3, 22, 0, 3, 23, 0, 3, 24, 0, 3, 25, 0, 3, 26, 0, 3, 27, 0, 3, 28, 0, 3, 29, 0, 3, 30, 0, 3, 31, 0, 3, 65536, 0, 3, 65537, 0, 3, 65538, 0, 3, 65539, 0, 3, 65540, 0, 3, 65541, 0, 3, 65542, 0, 3, 65543, 0, 3, 65544, 0, 3, 65545, 0, 3, 65546, 0, 3, 65547, 0, 3, 65548, 0, 3, 65549, 0, 3, 65550, 0, 3, 65551, 0, 3, 65552, 0, 3, 65553, 0, 3, 65554, 0, 3, 65555, 0, 3, 65556, 0, 3, 65557, 0, 3, 65558, 0, 3, 65559, 0, 3, 65560, 0, 3, 65561, 0, 3, 65562, 0, 3, 65563, 0, 3, 65564, 0, 3, 65565, 0, 3, 65566, 0, 3, 65567, 0, 3, 131072, 0, 3, 131073, 0, 3, 131074, 0, 3, 131075, 0, 3, 131076, 0, 3, 131077, 0, 3, 131078, 0, 3, 131079, 0, 3, 131080, 0, 3, 131081, 0, 3, 131082, 0, 3, 131083, 0, 3, 131084, 0, 3, 131085, 0, 3, 131086, 0, 3, 131087, 0, 3, 131088, 0, 3, 131089, 0, 3, 131090, 0, 3, 131091, 0, 3, 131092, 0, 3, 131093, 0, 3, 131094, 0, 3, 131095, 0, 3, 131096, 0, 3, 131097, 0, 3, 131098, 0, 3, 131099, 0, 3, 131100, 0, 3, 131101, 0, 3, 131102, 0, 3, 131103, 0, 3, 196608, 0, 3, 196609, 0, 3, 196610, 0, 3, 196611, 0, 3, 196612, 0, 3, 196613, 0, 3, 196614, 0, 3, 196615, 0, 3, 196616, 0, 3, 196617, 0, 3, 196618, 0, 3, 196619, 0, 3, 196620, 0, 3, 196621, 0, 3, 196622, 0, 3, 196623, 0, 3, 196624, 0, 3, 196625, 0, 3, 196626, 0, 3, 196627, 0, 3, 196628, 0, 3, 196629, 0, 3, 196630, 0, 3, 196631, 0, 3, 196632, 0, 3, 196633, 0, 3, 196634, 0, 3, 196635, 0, 3, 196636, 0, 3, 196637, 0, 3, 196638, 0, 3, 196639, 0, 3, 262144, 0, 3, 262145, 0, 3, 262146, 0, 3, 262147, 0, 3, 262148, 0, 3, 262149, 0, 3, 262150, 0, 3, 262151, 0, 3, 262152, 0, 3, 262153, 0, 3, 262154, 0, 3, 262155, 0, 3, 262156, 0, 3, 262157, 0, 3, 262158, 0, 3, 262159, 0, 3, 262160, 0, 3, 262161, 0, 3, 262162, 0, 3, 262163, 0, 3, 262164, 0, 3, 262165, 0, 3, 262166, 0, 3, 262167, 0, 3, 262168, 0, 3, 262169, 0, 3, 262170, 0, 3, 262171, 0, 3, 262172, 0, 3, 262173, 0, 3, 262174, 0, 3, 262175, 0, 3, 327680, 0, 3, 327681, 0, 3, 327682, 0, 3, 327683, 0, 3, 327684, 0, 3, 327685, 0, 3, 327686, 0, 3, 327687, 0, 3, 327688, 0, 3, 327689, 0, 3, 327690, 0, 3, 327691, 0, 3, 327692, 0, 3, 327693, 0, 3, 327694, 0, 3, 327695, 0, 3, 327696, 0, 3, 327697, 0, 3, 327698, 0, 3, 327699, 0, 3, 327700, 0, 3, 327701, 0, 3, 327702, 0, 3, 327703, 0, 3, 327704, 0, 3, 327705, 0, 3, 327706, 0, 3, 327707, 0, 3, 327708, 0, 3, 327709, 0, 3, 327710, 0, 3, 327711, 0, 3, 393216, 0, 3, 393217, 0, 3, 393218, 0, 3, 393219, 0, 3, 393220, 0, 3, 393221, 0, 3, 393222, 0, 3, 393223, 0, 3, 393224, 0, 3, 393225, 0, 3, 393226, 0, 3, 393227, 0, 3, 393228, 0, 3, 393229, 0, 3, 393230, 0, 3, 393231, 0, 3, 393232, 0, 3, 393233, 0, 3, 393234, 0, 3, 393235, 0, 3, 393236, 0, 3, 393237, 0, 3, 393238, 0, 3, 393239, 0, 3, 393240, 0, 3, 393241, 0, 3, 393242, 0, 3, 393243, 0, 3, 393244, 0, 3, 393245, 0, 3, 393246, 0, 3, 393247, 0, 3, 458752, 0, 3, 458753, 0, 3, 458754, 0, 3, 458755, 0, 3, 458756, 0, 3, 458757, 0, 3, 458758, 0, 3, 458759, 0, 3, 458760, 0, 3, 458761, 0, 3, 458762, 0, 3, 458763, 0, 3, 458764, 0, 3, 458765, 0, 3, 458766, 0, 3, 458767, 0, 3, 458768, 0, 3, 458769, 0, 3, 458770, 0, 3, 458771, 0, 3, 458772, 0, 3, 458773, 0, 3, 458774, 0, 3, 458775, 0, 3, 458776, 0, 3, 458777, 0, 3, 458778, 0, 3, 458779, 0, 3, 458780, 0, 3, 458781, 0, 3, 458782, 0, 3, 458783, 0, 3, 524288, 0, 3, 524289, 0, 3, 524290, 0, 3, 524291, 0, 3, 524292, 0, 3, 524293, 0, 3, 524294, 0, 3, 524295, 0, 3, 524296, 0, 3, 524297, 0, 3, 524298, 0, 3, 524299, 0, 3, 524300, 0, 3, 524301, 0, 3, 524302, 0, 3, 524303, 0, 3, 524304, 0, 3, 524305, 0, 3, 524306, 0, 3, 524307, 0, 3, 524308, 0, 3, 524309, 0, 3, 524310, 0, 3, 524311, 0, 3, 524312, 0, 3, 524313, 0, 3, 524314, 0, 3, 524315, 0, 3, 524316, 0, 3, 524317, 0, 3, 524318, 0, 3, 524319, 0, 3, 589824, 0, 3, 589825, 0, 3, 589826, 0, 3, 589827, 0, 3, 589828, 0, 3, 589829, 0, 3, 589830, 0, 3, 589831, 0, 3, 589832, 0, 3, 589833, 0, 3, 589834, 0, 3, 589835, 0, 3, 589836, 0, 3, 589837, 0, 3, 589838, 0, 3, 589839, 0, 3, 589840, 0, 3, 589841, 0, 3, 589842, 0, 3, 589843, 0, 3, 589844, 0, 3, 589845, 0, 3, 589846, 0, 3, 589847, 0, 3, 589848, 0, 3, 589849, 0, 3, 589850, 0, 3, 589851, 0, 3, 589852, 0, 3, 589853, 0, 3, 589854, 0, 3, 589855, 0, 3, 655360, 0, 3, 655361, 0, 3, 655362, 0, 3, 655363, 0, 3, 655364, 0, 3, 655365, 0, 3, 655366, 0, 3, 655367, 0, 3, 655368, 0, 3, 655369, 0, 3, 655370, 0, 3, 655371, 0, 3, 655372, 0, 3, 655373, 0, 3, 655374, 0, 3, 655375, 0, 3, 655376, 0, 3, 655377, 0, 3, 655378, 0, 3, 655379, 0, 3, 655380, 0, 3, 655381, 0, 3, 655382, 0, 3, 655383, 0, 3, 655384, 0, 3, 655385, 0, 3, 655386, 0, 3, 655387, 0, 3, 655388, 0, 3, 655389, 0, 3, 655390, 0, 3, 655391, 0, 3, 720896, 0, 3, 720897, 0, 3, 720898, 0, 3, 720899, 0, 3, 720900, 0, 3, 720901, 0, 3, 720902, 0, 3, 720903, 0, 3, 720904, 0, 3, 720905, 0, 3, 720906, 0, 3, 720907, 0, 3, 720908, 0, 3, 720909, 0, 3, 720910, 0, 3, 720911, 0, 3, 720912, 0, 3, 720913, 0, 3, 720914, 0, 3, 720915, 0, 3, 720916, 0, 3, 720917, 0, 3, 720918, 0, 3, 720919, 0, 3, 720920, 0, 3, 720921, 0, 3, 720922, 0, 3, 720923, 0, 3, 720924, 0, 3, 720925, 0, 3, 720926, 0, 3, 720927, 0, 3, 786432, 0, 3, 786433, 0, 3, 786434, 0, 3, 786435, 0, 3, 786436, 0, 3, 786437, 0, 3, 786438, 0, 3, 786439, 0, 3, 786440, 0, 3, 786441, 0, 3, 786442, 0, 3, 786443, 0, 3, 786444, 0, 3, 786445, 0, 3, 786446, 0, 3, 786447, 0, 3, 786448, 0, 3, 786449, 0, 3, 786450, 0, 3, 786451, 0, 3, 786452, 0, 3, 786453, 0, 3, 786454, 0, 3, 786455, 0, 3, 786456, 0, 3, 786457, 0, 3, 786458, 0, 3, 786459, 0, 3, 786460, 0, 3, 786461, 0, 3, 786462, 0, 3, 786463, 0, 3, 851968, 0, 3, 851969, 0, 3, 851970, 0, 3, 851971, 0, 3, 851972, 0, 3, 851973, 0, 3, 851974, 0, 3, 851975, 0, 3, 851976, 0, 3, 851977, 0, 3, 851978, 0, 3, 851979, 0, 3, 851980, 0, 3, 851981, 0, 3, 851982, 0, 3, 851983, 0, 3, 851984, 0, 3, 851985, 0, 3, 851986, 0, 3, 851987, 0, 3, 851988, 0, 3, 851989, 0, 3, 851990, 0, 3, 851991, 0, 3, 851992, 0, 3, 851993, 0, 3, 851994, 0, 3, 851995, 0, 3, 851996, 0, 3, 851997, 0, 3, 851998, 0, 3, 851999, 0, 3, 917504, 0, 3, 917505, 0, 3, 917506, 0, 3, 917507, 0, 3, 917508, 0, 3, 917509, 0, 3, 917510, 0, 3, 917511, 0, 3, 917512, 0, 3, 917513, 0, 3, 917514, 0, 3, 917515, 0, 3, 917516, 0, 3, 917517, 0, 3, 917518, 0, 3, 917519, 0, 3, 917520, 0, 3, 917521, 0, 3, 917522, 0, 3, 917523, 0, 3, 917524, 0, 3, 917525, 0, 3, 917526, 0, 3, 917527, 0, 3, 917528, 0, 3, 917529, 0, 3, 917530, 0, 3, 917531, 0, 3, 917532, 0, 3, 917533, 0, 3, 917534, 0, 3, 917535, 0, 3, 983040, 0, 3, 983041, 0, 3, 983042, 0, 3, 983043, 0, 3, 983044, 0, 3, 983045, 0, 3, 983046, 0, 3, 983047, 0, 3, 983048, 0, 3, 983049, 0, 3, 983050, 0, 3, 983051, 0, 3, 983052, 0, 3, 983053, 0, 3, 983054, 0, 3, 983055, 0, 3, 983056, 0, 3, 983057, 0, 3, 983058, 0, 3, 983059, 0, 3, 983060, 0, 3, 983061, 0, 3, 983062, 0, 3, 983063, 0, 3, 983064, 0, 3, 983065, 0, 3, 983066, 0, 3, 983067, 0, 3, 983068, 0, 3, 983069, 0, 3, 983070, 0, 3, 983071, 0, 3, 1048576, 0, 3, 1048577, 0, 3, 1048578, 0, 3, 1048579, 0, 3, 1048580, 0, 3, 1048581, 0, 3, 1048582, 0, 3, 1048583, 0, 3, 1048584, 0, 3, 1048585, 0, 3, 1048586, 0, 3, 1048587, 0, 3, 1048588, 0, 3, 1048589, 0, 3, 1048590, 0, 3, 1048591, 0, 3, 1048592, 0, 3, 1048593, 0, 3, 1048594, 0, 3, 1048595, 0, 3, 1048596, 0, 3, 1048597, 0, 3, 1048598, 0, 3, 1048599, 0, 3, 1048600, 0, 3, 1048601, 0, 3, 1048602, 0, 3, 1048603, 0, 3, 1048604, 0, 3, 1048605, 0, 3, 1048606, 0, 3, 1048607, 0, 3, 1114112, 0, 3, 1114113, 0, 3, 1114114, 0, 3, 1114115, 0, 3, 1114116, 0, 3, 1114117, 0, 3, 1114118, 0, 3, 1114119, 0, 3, 1114120, 0, 3, 1114121, 0, 3, 1114122, 0, 3, 1114123, 0, 3, 1114124, 0, 3, 1114125, 0, 3, 1114126, 0, 3, 1114127, 0, 3, 1114128, 0, 3, 1114129, 0, 3, 1114130, 0, 3, 1114131, 0, 3, 1114132, 0, 3, 1114133, 0, 3, 1114134, 0, 3, 1114135, 0, 3, 1114136, 0, 3, 1114137, 0, 3, 1114138, 0, 3, 1114139, 0, 3, 1114140, 0, 3, 1114141, 0, 3, 1114142, 0, 3, 1114143, 0, 3, 1179648, 0, 3, 1179649, 0, 3, 1179650, 0, 3, 1179651, 0, 3, 1179652, 0, 3, 1179653, 0, 3, 1179654, 0, 3, 1179655, 0, 3, 1179656, 0, 3, 1179657, 0, 3, 1179658, 0, 3, 1179659, 0, 3, 1179660, 0, 3, 1179661, 0, 3, 1179662, 0, 3, 1179663, 0, 3, 1179664, 0, 3, 1179665, 0, 3, 1179666, 0, 3, 1179667, 0, 3, 1179668, 0, 3, 1179669, 0, 3, 1179670, 0, 3, 1179671, 0, 3, 1179672, 0, 3, 1179673, 0, 3, 1179674, 0, 3, 1179675, 0, 3, 1179676, 0, 3, 1179677, 0, 3, 1179678, 0, 3, 1179679, 0, 3, 1245184, 0, 3, 1245185, 0, 3, 1245186, 0, 3, 1245187, 0, 3, 1245188, 0, 3, 1245189, 0, 3, 1245190, 0, 3, 1245191, 0, 3, 1245192, 0, 3, 1245193, 0, 3, 1245194, 0, 3, 1245195, 0, 3, 1245196, 0, 3, 1245197, 0, 3, 1245198, 0, 3, 1245199, 0, 3, 1245200, 0, 3, 1245201, 0, 3, 1245202, 0, 3, 1245203, 0, 3, 1245204, 0, 3, 1245205, 0, 3, 1245206, 0, 3, 1245207, 0, 3, 1245208, 0, 3, 1245209, 0, 3, 1245210, 0, 3, 1245211, 0, 3, 1245212, 0, 3, 1245213, 0, 3, 1245214, 0, 3, 1245215, 0, 3, 1310720, 0, 3, 1310721, 0, 3, 1310722, 0, 3, 1310723, 0, 3, 1310724, 0, 3, 1310725, 0, 3, 1310726, 0, 3, 1310727, 0, 3, 1310728, 0, 3, 1310729, 0, 3, 1310730, 0, 3, 1310731, 0, 3, 1310732, 0, 3, 1310733, 0, 3, 1310734, 0, 3, 1310735, 0, 3, 1310736, 0, 3, 1310737, 0, 3, 1310738, 0, 3, 1310739, 0, 3, 1310740, 0, 3, 1310741, 0, 3, 1310742, 0, 3, 1310743, 0, 3, 1310744, 0, 3, 1310745, 0, 3, 1310746, 0, 3, 1310747, 0, 3, 1310748, 0, 3, 1310749, 0, 3, 1310750, 0, 3, 1310751, 0, 3, 1376256, 0, 3, 1376257, 0, 3, 1376258, 0, 3, 1376259, 0, 3, 1376260, 0, 3, 1376261, 0, 3, 1376262, 0, 3, 1376263, 0, 3, 1376264, 0, 3, 1376265, 0, 3, 1376266, 0, 3, 1376267, 0, 3, 1376268, 0, 3, 1376269, 0, 3, 1376270, 0, 3, 1376271, 0, 3, 1376272, 0, 3, 1376273, 0, 3, 1376274, 0, 3, 1376275, 0, 3, 1376276, 0, 3, 1376277, 0, 3, 1376278, 0, 3, 1376279, 0, 3, 1376280, 0, 3, 1376281, 0, 3, 1376282, 0, 3, 1376283, 0, 3, 1376284, 0, 3, 1376285, 0, 3, 1376286, 0, 3, 1376287, 0, 3, 1441792, 0, 3, 1441793, 0, 3, 1441794, 0, 3, 1441795, 0, 3, 1441796, 0, 3, 1441797, 0, 3, 1441798, 0, 3, 1441799, 0, 3, 1441800, 0, 3, 1441801, 0, 3, 1441802, 0, 3, 1441803, 0, 3, 1441804, 0, 3, 1441805, 0, 3, 1441806, 0, 3, 1441807, 0, 3, 1441808, 0, 3, 1441809, 0, 3, 1441810, 0, 3, 1441811, 0, 3, 1441812, 0, 3, 1441813, 0, 3, 1441814, 0, 3, 1441815, 0, 3, 1441816, 0, 3, 1441817, 0, 3, 1441818, 0, 3, 1441819, 0, 3, 1441820, 0, 3, 1441821, 0, 3, 1441822, 0, 3, 1441823, 0, 3, 1507328, 0, 3, 1507329, 0, 3, 1507330, 0, 3, 1507331, 0, 3, 1507332, 0, 3, 1507333, 0, 3, 1507334, 0, 3, 1507335, 0, 3, 1507336, 0, 3, 1507337, 0, 3, 1507338, 0, 3, 1507339, 0, 3, 1507340, 0, 3, 1507341, 0, 3, 1507342, 0, 3, 1507343, 0, 3, 1507344, 0, 3, 1507345, 0, 3, 1507346, 0, 3, 1507347, 0, 3, 1507348, 0, 3, 1507349, 0, 3, 1507350, 0, 3, 1507351, 0, 3, 1507352, 0, 3, 1507353, 0, 3, 1507354, 0, 3, 1507355, 0, 3, 1507356, 0, 3, 1507357, 0, 3, 1507358, 0, 3, 1507359, 0, 3 ) + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 272.0 +margin_bottom = 212.0 +color = Color( 0.12549, 0.109804, 0.227451, 1 ) + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 97, 119 ) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 2 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 1245200, 0, 65537, 1245201, 0, 65537, 1245202, 0, 65537, 1245203, 0, 65537, 1376268, 0, 262144, 1376274, 0, 262144, 1376284, 0, 262144, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0 ) + +[node name="Snail" parent="." instance=ExtResource( 7 )] +position = Vector2( 183, 171 ) +left_up_boundry = 3.0 +right_down_boundry = 3.0 + +[node name="Rock" parent="." instance=ExtResource( 3 )] +position = Vector2( 138, 144 ) + +[node name="Area2D" parent="." instance=ExtResource( 6 )] +position = Vector2( 40, 168 ) + +[node name="Area2D2" parent="." instance=ExtResource( 6 )] +position = Vector2( 64, 168 ) + +[node name="Death" type="TileMap" parent="."] +tile_set = ExtResource( 5 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 1376261, 1, 0, 1376264, 1, 0 ) diff --git a/objects/enemy/enemy_speedup_in_range.gd b/objects/enemy/enemy_speedup_in_range.gd new file mode 100644 index 0000000..228aea0 --- /dev/null +++ b/objects/enemy/enemy_speedup_in_range.gd @@ -0,0 +1,41 @@ +extends "res://objects/enemy/enemy.gd" + +#How far to move +export var left_up_boundry = 0.0 +export var right_down_boundry = 0.0 +#Start direction +export var direction = 1 +export var speed = 50 +#Move horizontal or vertical +export(int, "Horizontal", "Vertical") var move_direction +export var flip_sprite = true +#Onreadys +onready var startpos = position +onready var sprite = $AnimatedSprite + +func _physics_process(delta): + if move_direction == 0: + move_side_to_side(delta) + else: move_up_and_down(delta) + +func move_side_to_side(delta): + #Move + position.x += direction * (speed * delta) + #Switch dir + if position.x >= startpos.x + (right_down_boundry * 8): + direction = -1 + if flip_sprite == true: sprite.scale.x = -1 + if position.x <= startpos.x + (-left_up_boundry * 8): + direction = 1 + if flip_sprite == true: sprite.scale.x = 1 + +func move_up_and_down(delta): + #Move + position.y += direction * (speed * delta) + #Switch dir + if position.y >= startpos.y + (right_down_boundry * 8): + direction = -1 + if flip_sprite == true: sprite.scale.y = 1 + if position.y <= startpos.y + (-left_up_boundry * 8): + direction = 1 + if flip_sprite == true: sprite.scale.y = -1 diff --git a/objects/enemy/slime.tscn b/objects/enemy/slime.tscn index c670cf8..6760ae5 100644 --- a/objects/enemy/slime.tscn +++ b/objects/enemy/slime.tscn @@ -38,6 +38,7 @@ score_for_killing = 10 material = SubResource( 1 ) position = Vector2( 1, 3 ) frames = SubResource( 4 ) +frame = 1 playing = true [node name="Area2D" type="Area2D" parent="."] diff --git a/objects/enemy/snail.tscn b/objects/enemy/snail.tscn new file mode 100644 index 0000000..7a98061 --- /dev/null +++ b/objects/enemy/snail.tscn @@ -0,0 +1,50 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1] +[ext_resource path="res://graphics/enemy/snail.png" type="Texture" id=2] +[ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=3] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 1 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = false + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 2 ) +region = Rect2( 0, 0, 12, 11 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 2 ) +region = Rect2( 12, 0, 12, 11 ) + +[sub_resource type="SpriteFrames" id=4] +animations = [ { +"frames": [ SubResource( 2 ), SubResource( 3 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +} ] + +[sub_resource type="RectangleShape2D" id=5] +extents = Vector2( 4, 4 ) + +[node name="Snail" type="Node2D"] +script = ExtResource( 3 ) + +[node name="AnimatedSprite" type="AnimatedSprite" parent="."] +material = SubResource( 1 ) +frames = SubResource( 4 ) +frame = 1 +playing = true + +[node name="Area2D" type="Area2D" parent="."] +visible = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2( 0, 1 ) +shape = SubResource( 5 ) + +[node name="RayCast2D" type="RayCast2D" parent="."] +cast_to = Vector2( 32, 0 ) + +[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"] diff --git a/objects/ladder/ladder.tscn b/objects/ladder/ladder.tscn index 5a7524c..ee64464 100644 --- a/objects/ladder/ladder.tscn +++ b/objects/ladder/ladder.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://objects/ladder/ladder.gd" type="Script" id=1] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 4, 4 ) +extents = Vector2( 8, 4 ) [node name="Ladder" type="Node2D"] script = ExtResource( 1 ) diff --git a/objects/player/player.gd b/objects/player/player.gd index 24a420b..d7e4cc1 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -238,7 +238,7 @@ func check_ladder(): #Start Climbing current_state = State.CLIMB #Move the raycast - climb_ray.position.x = 4 * sprite.scale.x + #climb_ray.position.x = 4 * sprite.scale.x func die(): position = Game.respawn_point diff --git a/objects/player/player.tscn b/objects/player/player.tscn index 27351ce..1e9f671 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -627,8 +627,7 @@ position = Vector2( 0.5, 5 ) shape = SubResource( 39 ) [node name="ClimbRay" type="RayCast2D" parent="."] -visible = false -position = Vector2( 4, 10 ) +position = Vector2( 0.5, 10 ) enabled = true cast_to = Vector2( 0, -10 ) collision_mask = 4 diff --git a/project.godot b/project.godot index 80174c4..eb08b9d 100644 --- a/project.godot +++ b/project.godot @@ -28,6 +28,10 @@ window/size/height=192 enabled=PoolStringArray( ) +[global] + +scene=false + [gui] common/drop_mouse_on_gui_input_disabled=true diff --git a/tilesets/t_cave.tres b/tilesets/t_cave.tres new file mode 100644 index 0000000..c279195 --- /dev/null +++ b/tilesets/t_cave.tres @@ -0,0 +1,63 @@ +[gd_resource type="TileSet" load_steps=6 format=2] + +[ext_resource path="res://graphics/tiles/cave.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 8, 6, 0, 6, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[resource] +0/name = "cave.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 32, 40 ) +0/tile_mode = 2 +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 8, 8 ) +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, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 3 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 4 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +0/z_index = 0