Compare commits

..

3 commits

Author SHA1 Message Date
07e54a2cdf Merge branch 'main' of https://gamejam.fachschaft.info/Florian/The_Dark_Side_of_Earth 2025-09-18 18:13:12 +02:00
ebc9a77acb Added Boss
Added Giant Leech
2025-09-18 18:10:44 +02:00
714ea48554 Extra Jump 2025-09-18 11:22:03 +02:00
67 changed files with 318 additions and 218 deletions

84
boss.gd Normal file
View file

@ -0,0 +1,84 @@
extends CharacterBody2D
@onready var earthaligner = $EarthAligner
@onready var player = get_tree().get_root().get_node("main/Player")
var moves = ["slam", "wave", "water_rise", "splash"]
@onready var next_move = choose_next_move()
var risen = 0
var attack_ready = true
var idle_dir : Vector2 = Vector2.ZERO
var idle_dir_remaining = 0
var idle_move = true
var target_pos = Vector2.ZERO
var damage = 1
signal grounded
func choose_next_move() -> String:
if $EnemyHurtbox.hp < 2 * $EnemyHurtbox.max_hp / 3 and risen == 0:
risen += 1
return "water_rise"
if $EnemyHurtbox.hp < $EnemyHurtbox.max_hp / 3 and risen == 1:
risen += 1
return "water_rise"
return ["slam", "wave", "splash"].pick_random()
func _physics_process(delta: float) -> void:
up_direction = earthaligner.global_from_local(Vector2.UP)
if attack_ready:
attack_ready = false
call(next_move)
next_move = choose_next_move()
if(is_on_floor()):
grounded.emit()
if idle_move: move_idle(delta)
if($Hitbox.overlaps_body(player)):
player.hurt(damage, self.position - player.position)
move_and_slide()
func move_idle(delta : float):
idle_dir_remaining -= delta
if(idle_dir_remaining <= 0):
target_pos = player.position + player.earth_aligner.global_from_local(Vector2.UP) * 400
target_pos += randf_range(0, max(200, (target_pos - global_position).length())*0.25) * Vector2.from_angle(randf_range(0,TAU))
idle_dir = (target_pos - global_position).normalized()* max(200, (target_pos - global_position).length()) * 0.4
idle_dir_remaining = 0.5
velocity = idle_dir
func slam():
idle_move = false
velocity = up_direction * 500
await get_tree().create_timer(0.6).timeout
damage = 2
velocity = up_direction * -1500
await grounded
destroy_below()
damage = 1
velocity = up_direction * 500
await get_tree().create_timer(0.3).timeout
damage = 2
velocity = up_direction * -1500
await grounded
destroy_below()
damage = 1
velocity = up_direction * 35
await get_tree().create_timer(3).timeout
idle_move = true
attack_ready = true
func destroy_below():
for body in $DestructionChecker.get_overlapping_bodies():
if(body.has_method("destroy")): body.destroy()
func wave():
await get_tree().create_timer(4).timeout
attack_ready = true
func water_rise():
await get_tree().create_timer(4).timeout
attack_ready = true
func splash():
await get_tree().create_timer(4).timeout
attack_ready = true

1
boss.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://uv672p8f4n6k

58
boss.tscn Normal file
View file

@ -0,0 +1,58 @@
[gd_scene load_steps=7 format=3 uid="uid://cpe4s6vsn0ujd"]
[ext_resource type="Texture2D" uid="uid://d3b5hmhjw2jyc" path="res://enemies/ghost animation/Ghost 1.png" id="1_6xxrv"]
[ext_resource type="Script" uid="uid://uv672p8f4n6k" path="res://boss.gd" id="1_skx2t"]
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_skx2t"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_lnbgr"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lnbgr"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lnbgr"]
size = Vector2(300, 250)
[node name="Boss" type="CharacterBody2D"]
collision_mask = 32
script = ExtResource("1_skx2t")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.5708
scale = Vector2(10, 10)
shape = SubResource("CapsuleShape2D_lnbgr")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(3.85156, 1.9375)
texture = ExtResource("1_6xxrv")
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_skx2t")]
collision_layer = 16
collision_mask = 32
max_hp = 600
canvasItem = NodePath("..")
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
rotation = 1.5708
scale = Vector2(11, 11)
shape = SubResource("CapsuleShape2D_lnbgr")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="EnemyHurtbox"]
position = Vector2(0, 6)
rotation = 1.5708
scale = Vector2(5, 14)
shape = SubResource("CapsuleShape2D_lnbgr")
[node name="EarthAligner" parent="." instance=ExtResource("4_lnbgr")]
[node name="Hitbox" type="Area2D" parent="."]
scale = Vector2(1.05, 1.05)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
rotation = 1.5708
scale = Vector2(10, 10)
shape = SubResource("CapsuleShape2D_lnbgr")
[node name="DestructionChecker" type="Area2D" parent="."]
collision_mask = 10
[node name="CollisionShape2D" type="CollisionShape2D" parent="DestructionChecker"]
position = Vector2(0, 200)
shape = SubResource("RectangleShape2D_lnbgr")

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 1x2 fixed.png-e90afc0d25a8919ada5700
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 2x1 downside.png-4b432eb4152bab7dd59
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Building 2x1 fixed.png-b02748fa52aebae62f987c
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

View file

@ -4,6 +4,9 @@ class_name Building extends Node2D
@export var dimension : Vector2i = Vector2(2, 1) # same as above
@onready var grid : Grid = get_parent()
var objects = []
var destroyed = false
# make sure location is set before adding a building to the scene tree
# also make sure that the buildings are instantiated as children of the grid
func _ready() -> void:
@ -14,7 +17,7 @@ func _ready() -> void:
grid.buildings.append(self)
await get_tree().create_timer(0).timeout
await get_tree().create_timer(0.2).timeout
if get_node_or_null("EnemyList") != null:
var enemies = $EnemyList.get_children()
@ -23,6 +26,9 @@ func _ready() -> void:
for enemy in enemies:
var oldpos = enemy.position;
enemy.position = get_world_position(oldpos)
if enemy is Platform or enemy is Trap or enemy is Item:
objects.append(enemy)
if "building" in enemy: enemy.building = self
if(enemy.has_method("init_at_horizontal_distortion")):
enemy.init_at_horizontal_distortion(enemy.position.length() / grid.ground_radius)
@ -43,4 +49,12 @@ func overlaps(other : Building):
# If we get here, angles do not overlap
return false
func destroy():
if not destroyed:
grid.buildings.remove_at(grid.buildings.find(self))
for object in objects:
if object != null and not ("collected" in object and object.collected):
object.queue_free()
destroyed = true
queue_free()

View file

@ -39,18 +39,22 @@ position = Vector2(238, -149)
[node name="Platform" parent="EnemyList" instance=ExtResource("8_evf2t")]
visible = false
position = Vector2(75, -285)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("8_evf2t")]
visible = false
position = Vector2(225, -285)
collision_layer = 41
[node name="Platform3" parent="EnemyList" instance=ExtResource("8_evf2t")]
visible = false
position = Vector2(375, -285)
collision_layer = 41
[node name="Platform4" parent="EnemyList" instance=ExtResource("8_evf2t")]
visible = false
position = Vector2(525, -285)
collision_layer = 41
[node name="Platform5" parent="EnemyList" instance=ExtResource("8_evf2t")]
position = Vector2(431, -150)

View file

@ -33,10 +33,12 @@ position = Vector2(150, -300)
[node name="Platform" parent="EnemyList" instance=ExtResource("6_e6j05")]
visible = false
position = Vector2(75, -585)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("6_e6j05")]
visible = false
position = Vector2(225, -585)
collision_layer = 41
[node name="Platform3" parent="EnemyList" instance=ExtResource("6_e6j05")]
position = Vector2(290, -431)

View file

@ -35,10 +35,12 @@ position = Vector2(-38, -481)
[node name="Platform" parent="EnemyList" instance=ExtResource("6_caaff")]
visible = false
position = Vector2(75, -585)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("6_caaff")]
visible = false
position = Vector2(225, -585)
collision_layer = 41
[node name="Platform3" parent="EnemyList" instance=ExtResource("6_caaff")]
position = Vector2(5, -251)

View file

@ -32,10 +32,12 @@ script = ExtResource("4_ri5b7")
[node name="Platform" parent="EnemyList" instance=ExtResource("6_kom4b")]
visible = false
position = Vector2(75, -585)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("6_kom4b")]
visible = false
position = Vector2(225, -585)
collision_layer = 41
[node name="Platform5" parent="EnemyList" instance=ExtResource("6_kom4b")]
position = Vector2(85, -287)

View file

@ -44,18 +44,22 @@ position = Vector2(118, -125)
[node name="Platform" parent="EnemyList" instance=ExtResource("8_sifiv")]
visible = false
position = Vector2(75, -285)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("8_sifiv")]
visible = false
position = Vector2(225, -285)
collision_layer = 41
[node name="Platform3" parent="EnemyList" instance=ExtResource("8_sifiv")]
visible = false
position = Vector2(375, -285)
collision_layer = 41
[node name="Platform4" parent="EnemyList" instance=ExtResource("8_sifiv")]
visible = false
position = Vector2(525, -285)
collision_layer = 41
[node name="Platform5" parent="EnemyList" instance=ExtResource("8_sifiv")]
position = Vector2(300, -150)

View file

@ -38,18 +38,22 @@ grid_offset = Vector2i(0, -1)
[node name="Platform" parent="EnemyList" instance=ExtResource("6_me65q")]
visible = false
position = Vector2(75, -285)
collision_layer = 41
[node name="Platform2" parent="EnemyList" instance=ExtResource("6_me65q")]
visible = false
position = Vector2(225, -285)
collision_layer = 41
[node name="Platform3" parent="EnemyList" instance=ExtResource("6_me65q")]
visible = false
position = Vector2(375, -285)
collision_layer = 41
[node name="Platform4" parent="EnemyList" instance=ExtResource("6_me65q")]
visible = false
position = Vector2(525, -285)
collision_layer = 41
[node name="ItemSpawn" parent="EnemyList" instance=ExtResource("7_crruu")]
position = Vector2(137, -329)

4
destroy_area.gd Normal file
View file

@ -0,0 +1,4 @@
extends Area2D
func destroy():
get_parent().queue_free()

1
destroy_area.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://dwvb52u1hnx5m

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 0.png-54508e305bb055698e5019e1d53e16ab.
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 1.png-43131954ed622829dc5453ddf6a96b4c.
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 2.png-67077adaa01a71a5c0b85fac254bdf8e.
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 3.png-18da238556f83c92715d2db31a14d159.
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 4.png-45ba6df3ef207a5eff72f5f0036139d6.
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Ghost 5.png-08f0125e59cfd0173a5d36d75efeae60.
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

62
enemies/giant_leech.tscn Normal file
View file

@ -0,0 +1,62 @@
[gd_scene load_steps=5 format=3 uid="uid://5nb7pf8g1ck"]
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech.gd" id="1_wfsrb"]
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://segment.tscn" id="2_7ngsb"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_vk62e"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
size = Vector2(2, 24)
[node name="Giant_Leech" type="Node2D"]
scale = Vector2(1, 1.2)
script = ExtResource("1_wfsrb")
broadth = 400
hp = 500
[node name="Segments" type="Node2D" parent="."]
[node name="Segment0" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment2" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment3" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment4" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment5" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment6" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment7" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment8" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="Segment9" parent="Segments" instance=ExtResource("2_7ngsb")]
scale = Vector2(2, 2)
[node name="EarthAligner" parent="." instance=ExtResource("3_vk62e")]
[node name="RayCast2D" type="Area2D" parent="."]
position = Vector2(248, 31.2)
collision_layer = 0
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")
[node name="RayCast2D2" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")

View file

@ -12,6 +12,8 @@ var pause_time = 0.1
var iframes = 0.2
var iframe_time = 0
var check_grounded_delay = 8
func _ready() -> void:
for segment in segments:
segment.segment_damaged.connect(hurt)
@ -47,6 +49,10 @@ func _physics_process(delta: float) -> void:
var segment_pos_data = calculate_segment_location_and_rotation(i)
segments[i].position = segment_pos_data.position
segments[i].rotation = segment_pos_data.rotation
if check_grounded_delay > 0:
check_grounded_delay -= delta
elif not $RayCast2D2.has_overlapping_bodies():
queue_free()
func calculate_segment_location_and_rotation (i) -> Dictionary:
var aerial_end_location = Vector2.from_angle(-angle) * broadth

View file

@ -8,7 +8,10 @@
size = Vector2(2, 24)
[node name="Leech" type="Node2D"]
scale = Vector2(1, 1.2)
script = ExtResource("1_6u582")
broadth = 200
hp = 250
[node name="Segments" type="Node2D" parent="."]
@ -40,3 +43,11 @@ collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")
[node name="RayCast2D2" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")

View file

@ -8,7 +8,7 @@ size = Vector2(20, 5)
[node name="Arrow" type="Area2D"]
collision_layer = 0
collision_mask = 2
collision_mask = 18
script = ExtResource("1_lxthq")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

View file

@ -1,5 +1,6 @@
class_name Item extends Area2D
@onready var player = get_tree().get_root().get_node_or_null("main/Player")
var collected = false
func _physics_process(_delta: float) -> void:
if(is_instance_valid(player) and overlaps_body(player)):
@ -8,6 +9,7 @@ func _physics_process(_delta: float) -> void:
set_deferred("monitorable", false)
call_deferred("reparent", player)
collect_animation()
collected = true
func collect_animation():
self.visible = false

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://xj0of571aur1"]
[gd_scene load_steps=8 format=3 uid="uid://xj0of571aur1"]
[ext_resource type="Script" uid="uid://b8em61mqgdi58" path="res://items/generic/item_spawn.gd" id="1_ms6tn"]
[ext_resource type="PackedScene" uid="uid://b00185vygcka1" path="res://items/immediate_items/heal_item/heal_item.tscn" id="2_w6i8k"]
@ -6,11 +6,12 @@
[ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/immediate_items/healthup/healthup.tscn" id="3_yi7ag"]
[ext_resource type="PackedScene" uid="uid://ddn025xnjngko" path="res://items/active_items/bow/bow.tscn" id="4_v0ua0"]
[ext_resource type="PackedScene" uid="uid://ewe36lqcjojk" path="res://items/active_items/updash/updash.tscn" id="5_uitgx"]
[ext_resource type="PackedScene" uid="uid://wc7kgtomy6xm" path="res://items/permanent_items/extrajump.tscn" id="6_xqgya"]
[node name="ItemSpawn" type="Node2D"]
script = ExtResource("1_ms6tn")
common_items = Array[PackedScene]([ExtResource("2_w6i8k")])
rare_items = Array[PackedScene]([ExtResource("4_v0ua0"), ExtResource("5_uitgx"), ExtResource("3_yi7ag")])
rare_items = Array[PackedScene]([ExtResource("4_v0ua0"), ExtResource("5_uitgx"), ExtResource("3_yi7ag"), ExtResource("6_xqgya")])
unique_base_chance = 0.1
rare_base_chance = 0.3
metadata/_custom_type_script = "uid://b8em61mqgdi58"

View file

@ -0,0 +1,6 @@
extends Item
func collect() -> bool:
player.air_jumps_max += 1
player.air_jumps_current += 1
return true

View file

@ -0,0 +1 @@
uid://bnr7cpjuvy6xj

View file

@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://wc7kgtomy6xm"]
[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump.gd" id="1_t7gtn"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_70c5v"]
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="3_qmwml"]
[sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"]
[node name="ExtraJump" type="Area2D"]
scale = Vector2(1, -1)
script = ExtResource("1_t7gtn")
[node name="EarthAligner" parent="." instance=ExtResource("2_70c5v")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(7, 7)
shape = SubResource("CircleShape2D_hvhjo")
[node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(2.00392, 2.00392, 2.00392, 1)
texture = ExtResource("3_qmwml")

View file

@ -41,7 +41,7 @@ script = ExtResource("4_1bvp3")
initial_buildings = 10
[node name="Timer" type="Timer" parent="Building Generator"]
wait_time = 2.5
wait_time = 3.0
autostart = true
[node name="CanvasLayer1" type="CanvasLayer" parent="."]
@ -68,6 +68,9 @@ script = ExtResource("8_5vw27")
[node name="Leech" parent="." instance=ExtResource("9_kek77")]
position = Vector2(0, -3015)
[node name="Boss" parent="." instance=ExtResource("10_4c57u")]
position = Vector2(0, -3500)
[node name="Water" parent="." instance=ExtResource("10_4c57u")]
z_index = 15

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Heart Grey.png-6b86b8edc4802c3a483d9a14eb7ce1
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Heart.png-33902e9ff8206d83f93ea6d088b4a1bc.ct
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Heart_cut Grey.png-b4b9be15b5a8a36395d31eba43
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Heart_cut.png-f11ef12fc6c55a0077b5ba659ce17ad
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 1.png-47c623e9d3540b4a00d2bddf52ae0b2a.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 2.png-5dea4fdec55fa43e26680e08090fd654.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 3.png-27890c0cb512383b8ecbd848c73efee1.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 4.png-232b1eae2acf3ad82130431014262cde.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 5.png-cfb8eb15ace876127c083283fe74cdc0.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Walk 6.png-f243f98e182be67eb8681a11d34ee554.c
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Attack Animation 0.png-489acc9ce1151ab08e3e3b
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Attack Animation 1.png-ee24e1daff1b2693d0a213
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Attack Animation 2.png-d547f6c17bbb65420b4918
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Attack Animation 3.png-d741f7f68a27aab201a287
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Double Jump 0.png-e1ba562e6b13c8446a336c30d2d
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Double Jump 1.png-69539f806c4752d0093ea6a956b
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Double Jump 2.png-f1a820e0078cf2a6b005cbe59b4
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Double Jump 3.png-4cfca0f35700bb4d12354620aff
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Double Jump 4.png-3e8f9f85498209cd3a65d2e632f
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

View file

@ -18,7 +18,7 @@ animations = [{
[node name="Sword" type="Area2D"]
scale = Vector2(1.8, 1.8)
collision_mask = 2
collision_mask = 18
script = ExtResource("1_hv1tj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

View file

@ -12,7 +12,7 @@ config_version=5
config/name="The Dark Side of Earth"
run/main_scene="uid://cxo6bq26huau7"
config/features=PackedStringArray("4.5", "Forward Plus")
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
[display]
@ -69,3 +69,5 @@ drop_item={
2d_physics/layer_2="EnemyHurtBox"
2d_physics/layer_3="PlayerHurtBox"
2d_physics/layer_4="SolidGround"
2d_physics/layer_5="EnemyHurtBoxNonTrap"
2d_physics/layer_6="TrulySolidGround"

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Morning Star.png-5c8aa4aef917e837888eb86be042
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

View file

@ -1,4 +1,4 @@
extends Node2D
extends Trap
@export var player_damage : int;
@export var enemy_damage : int;

View file

@ -1,4 +1,4 @@
extends Node2D
extends Trap
@onready var ball : Area2D = $Area2D
var anglespeed = 0.3
var player_damage = 1

View file

@ -17,7 +17,7 @@ collision_layer = 0
collision_mask = 6
[node name="Sprite2D" type="Sprite2D" parent="Area2D"]
position = Vector2(1.9999962, 25.000004)
position = Vector2(2, 25)
scale = Vector2(0.65, 0.65)
texture = ExtResource("2_4n2t1")

1
traps/trap.gd Normal file
View file

@ -0,0 +1 @@
class_name Trap extends Node2D

1
traps/trap.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://umx7q0tml2ul

View file

@ -26,3 +26,6 @@ func hurt(damage : int, dir : Vector2 = Vector2.ZERO):
func die():
died.emit()
func destroy():
hurt(9999)

View file

@ -3,5 +3,5 @@
[ext_resource type="Script" uid="uid://ct8am2xeyymuj" path="res://utils/enemy_hurtbox.gd" id="1_wa58b"]
[node name="EnemyHurtbox" type="Area2D"]
collision_layer = 2
collision_layer = 18
script = ExtResource("1_wa58b")

View file

@ -1,4 +1,8 @@
extends StaticBody2D
class_name Platform extends StaticBody2D
var building
func init_at_horizontal_distortion(distortion : float):
scale.x *= distortion
func destroy():
building.destroy()

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 1.png-47bb54b6d20a
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 2.png-ab86220f0fff
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 3.png-5a49ea16a5dc
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background Prototype Layer 4.png-ee5791549e67
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

View file

@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Background prototype.png-3a0b707a19d2bad45954
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

View file

@ -17,7 +17,7 @@ radius = 3000.0
script = ExtResource("1_wxnww")
[node name="Ground" type="StaticBody2D" parent="."]
collision_layer = 9
collision_layer = 41
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
shape = SubResource("CircleShape2D_5i67w")