Added Cauldron Assets and Witch counting fruits mechanic. Casts Insta Death on 3 Fruits for Debug purposes

pull/1/head
Artur David 2026-04-13 22:49:06 +02:00
parent 3c1dfb3f55
commit 1dbe6cc239
33 changed files with 481 additions and 0 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
assets/.DS_Store vendored

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dab36khbwynfh"
path="res://.godot/imported/Candles.png-3dc9aaa2d557e1ee026a8531821a738b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Candles.png"
dest_files=["res://.godot/imported/Candles.png-3dc9aaa2d557e1ee026a8531821a738b.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2sji04ufhh60"
path="res://.godot/imported/Cauldron and Powder.png-34b6a29acdcbd57f1c6ddfa70f40c77a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Cauldron and Powder.png"
dest_files=["res://.godot/imported/Cauldron and Powder.png-34b6a29acdcbd57f1c6ddfa70f40c77a.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmh6iu3dbvev1"
path="res://.godot/imported/Critters.png-6528fe4f9af3d1d42e9f75f8197afe2b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Critters.png"
dest_files=["res://.godot/imported/Critters.png-6528fe4f9af3d1d42e9f75f8197afe2b.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://484stlylp2nk"
path="res://.godot/imported/Equiptment.png-4a9260b065016a729146397ce95f22d0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Equiptment.png"
dest_files=["res://.godot/imported/Equiptment.png-4a9260b065016a729146397ce95f22d0.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b1lxnw06kx3yg"
path="res://.godot/imported/Eyes.png-ac25ca17dfdde83be1e806c68bc6c471.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Eyes.png"
dest_files=["res://.godot/imported/Eyes.png-ac25ca17dfdde83be1e806c68bc6c471.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://42aj7750brc7"
path="res://.godot/imported/Gems.png-83c502fa3a5c7d59d597c199ab785c05.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Gems.png"
dest_files=["res://.godot/imported/Gems.png-83c502fa3a5c7d59d597c199ab785c05.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfdo4em0d2faf"
path="res://.godot/imported/Jars.png-9e2d77b24ad433dd112bb16615c2f666.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Jars.png"
dest_files=["res://.godot/imported/Jars.png-9e2d77b24ad433dd112bb16615c2f666.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://5enmigob5lif"
path="res://.godot/imported/Plants.png-80f7092d2748aff5e6b8e636bb9070bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Plants.png"
dest_files=["res://.godot/imported/Plants.png-80f7092d2748aff5e6b8e636bb9070bb.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxxvm7nmdro5e"
path="res://.godot/imported/Potions-export.png-c917b6565cc7dd2d60c4bb7845643a56.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Potions-export.png"
dest_files=["res://.godot/imported/Potions-export.png-c917b6565cc7dd2d60c4bb7845643a56.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b7ukpjcfqndks"
path="res://.godot/imported/Slime.png-6b9dc46cbe4670de8188faa4c65022bc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cauldron's Brew/Slime.png"
dest_files=["res://.godot/imported/Slime.png-6b9dc46cbe4670de8188faa4c65022bc.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,19 @@
Hello, thank you for downloading my assets. I hope you enjoy!
16x16 Fantasy icon Pixel Art Pack
by Plopstudio
LICENSE-Free
You MAY:
- Use these assets in non-commercial projects
- Modify, recolour, or resize the assets
- Use them in multiple projects
You MAY NOT:
- Resell or redistribute these assets
- Claim the artwork as your own
- Include them in other asset packs for sale
Thank you for supporting my art!
Id love to see what you create with these assets.

View File

@ -0,0 +1,14 @@
var shake_duration = 0.0
var shake_intensity = 5.0
func shake(duration: float, intensity: float) -> void:
shake_duration = duration
shake_intensity = intensity
func _process(delta: float) -> void:
if shake_duration > 0:
shake_duration -= delta
offset = Vector2(randf_range(-shake_intensity, shake_intensity),
randf_range(-shake_intensity, shake_intensity))
else:
offset = Vector2.ZERO

View File

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

View File

@ -2,6 +2,7 @@
[ext_resource type="PackedScene" uid="uid://cw8jnr0mscanx" path="res://scenes/player.tscn" id="1_uwrxv"] [ext_resource type="PackedScene" uid="uid://cw8jnr0mscanx" path="res://scenes/player.tscn" id="1_uwrxv"]
[ext_resource type="Script" uid="uid://cphrdy0xexx30" path="res://scenes/game.gd" id="1_vtaks"] [ext_resource type="Script" uid="uid://cphrdy0xexx30" path="res://scenes/game.gd" id="1_vtaks"]
[ext_resource type="Script" uid="uid://coplu13jpw4xq" path="res://scripts/camera_2d.gd" id="3_kvpfn"]
[ext_resource type="Script" uid="uid://dovkm6w8af08x" path="res://scripts/spawn_control.gd" id="6_p57ef"] [ext_resource type="Script" uid="uid://dovkm6w8af08x" path="res://scripts/spawn_control.gd" id="6_p57ef"]
[ext_resource type="Texture2D" uid="uid://c4i3fnr6gpjp" path="res://assets/tileset/Tiled_files/details.png" id="7_gee14"] [ext_resource type="Texture2D" uid="uid://c4i3fnr6gpjp" path="res://assets/tileset/Tiled_files/details.png" id="7_gee14"]
[ext_resource type="PackedScene" uid="uid://b4v0ntaukg2je" path="res://scenes/witch.tscn" id="7_u5sy4"] [ext_resource type="PackedScene" uid="uid://b4v0ntaukg2je" path="res://scenes/witch.tscn" id="7_u5sy4"]
@ -2350,6 +2351,7 @@ position = Vector2(355, 172)
position = Vector2(1, 5) position = Vector2(1, 5)
anchor_mode = 0 anchor_mode = 0
zoom = Vector2(2.11, 2.11) zoom = Vector2(2.11, 2.11)
script = ExtResource("3_kvpfn")
[node name="SpawnControl" type="Control" parent="." unique_id=1780647990] [node name="SpawnControl" type="Control" parent="." unique_id=1780647990]
layout_mode = 3 layout_mode = 3
@ -2359,6 +2361,7 @@ offset_bottom = 40.0
script = ExtResource("6_p57ef") script = ExtResource("6_p57ef")
[node name="SpawnTimer" type="Timer" parent="." unique_id=1852920556] [node name="SpawnTimer" type="Timer" parent="." unique_id=1852920556]
wait_time = 0.203
autostart = true autostart = true
[node name="Witch" parent="." unique_id=1188927311 instance=ExtResource("7_u5sy4")] [node name="Witch" parent="." unique_id=1188927311 instance=ExtResource("7_u5sy4")]

View File

@ -1,5 +1,6 @@
[gd_scene format=3 uid="uid://b4v0ntaukg2je"] [gd_scene format=3 uid="uid://b4v0ntaukg2je"]
[ext_resource type="Script" uid="uid://lrvml2008cwk" path="res://scripts/witch.gd" id="1_b1vsk"]
[ext_resource type="Texture2D" uid="uid://dw8pn36yok5jq" path="res://assets/Witch/PNG/24x32/witch-002-SWEN.png" id="1_hgjeu"] [ext_resource type="Texture2D" uid="uid://dw8pn36yok5jq" path="res://assets/Witch/PNG/24x32/witch-002-SWEN.png" id="1_hgjeu"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gyfn7"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gyfn7"]
@ -246,6 +247,7 @@ animations = [{
}] }]
[node name="Witch" type="CharacterBody2D" unique_id=1188927311] [node name="Witch" type="CharacterBody2D" unique_id=1188927311]
script = ExtResource("1_b1vsk")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=774888103] [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=774888103]
position = Vector2(0, 3) position = Vector2(0, 3)

View File

@ -4,10 +4,12 @@ class_name DropsBase
var witch var witch
var player var player
var is_spawning = true var is_spawning = true
signal collected
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
body_entered.connect(_on_body_entered) body_entered.connect(_on_body_entered)
witch = get_node("/root/Game/Witch") witch = get_node("/root/Game/Witch")
collected.connect(witch._on_collect)
player = get_node("/root/Game/Player") player = get_node("/root/Game/Player")
_animate_spawn() _animate_spawn()
pass # Replace with function body. pass # Replace with function body.
@ -25,6 +27,7 @@ func _get_random_landing_position() -> Vector2:
return Vector2(offset_x,offset_y) return Vector2(offset_x,offset_y)
func _animate_spawn() -> void: func _animate_spawn() -> void:
is_spawning = true
var jump = create_tween() var jump = create_tween()
var landing = _get_random_landing_position() var landing = _get_random_landing_position()
jump.tween_property(self, "global_position:x", landing.x, 0.2).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_QUAD) jump.tween_property(self, "global_position:x", landing.x, 0.2).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_QUAD)
@ -40,6 +43,7 @@ func _on_body_entered(body: Node2D) -> void:
pass pass
func collect(): func collect():
is_spawning = true
var position_drop = create_tween() var position_drop = create_tween()
var target = witch.global_position var target = witch.global_position
position_drop.tween_property(self, "global_position:y", global_position.y - 20, 0.2).set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_QUAD) position_drop.tween_property(self, "global_position:y", global_position.y - 20, 0.2).set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_QUAD)
@ -48,4 +52,5 @@ func collect():
position_drop.tween_property(self, "global_position:x", target.x, 0.5).set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_QUAD) position_drop.tween_property(self, "global_position:x", target.x, 0.5).set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_QUAD)
await position_drop.finished await position_drop.finished
var scale_tween = create_tween() var scale_tween = create_tween()
collected.emit(self)
scale_tween.tween_property(self, "scale", Vector2.ZERO,0.2) scale_tween.tween_property(self, "scale", Vector2.ZERO,0.2)

View File

@ -0,0 +1,16 @@
extends Camera2D
var shake_duration = 0.0
var shake_intensity = 5.0
func shake(duration: float, intensity: float) -> void:
shake_duration = duration
shake_intensity = intensity
func _process(delta: float) -> void:
if shake_duration > 0:
shake_duration -= delta
offset = Vector2(randf_range(-shake_intensity, shake_intensity),
randf_range(-shake_intensity, shake_intensity))
else:
offset = Vector2.ZERO

View File

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

View File

@ -12,6 +12,7 @@ var death_sound = preload("res://assets/music&sfx/sfx/hit2.wav")
signal died signal died
func _ready() -> void: func _ready() -> void:
add_to_group("enemies")
died.connect(get_node("/root/Game/DropManager").on_enemy_died) died.connect(get_node("/root/Game/DropManager").on_enemy_died)
witch = get_node("/root/Game/Witch") witch = get_node("/root/Game/Witch")
player = get_node("/root/Game/Player") player = get_node("/root/Game/Player")

18
scripts/witch.gd 100644
View File

@ -0,0 +1,18 @@
extends CharacterBody2D
var camera
var test_apocalypse = 0
func _ready() -> void:
camera = get_node("/root/Game/Camera2D")
func _physics_process(delta: float) -> void:
# Add the gravity.
pass
func _on_collect(DropsBase):
test_apocalypse += 1
if test_apocalypse == 3:
get_tree().call_group("enemies", "_die")
test_apocalypse = 0
camera.shake(0.3,0.8)
pass

View File

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