Skip to content

Commit

Permalink
WEEK 20 | test BuH plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTakinTeller committed Sep 9, 2024
1 parent c11fe7e commit 3bcea93
Show file tree
Hide file tree
Showing 15 changed files with 821 additions and 38 deletions.
1 change: 1 addition & 0 deletions addons/BulletUpHell/Nodes/BuHSpawnPoint.gd
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func start() -> void:
can_respawn = true
active = true
_start_spawning()
call_deferred("set_pool")


func stop() -> void:
Expand Down
3 changes: 3 additions & 0 deletions global/autoload/signal_bus/signal_bus.gd
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ signal worker_efficiency_updated(efficiencies: Dictionary, generate: bool)
signal enemy_damaged(total_damage: int, damage: int, source_id: String)
signal deaths_door_resolved(enemy_data: EnemyData, new_enemy_data: EnemyData, option: int)

# BuH Scene
signal player_damaged


func _ready() -> void:
if Game.PARAMS["debug_logs"]:
Expand Down
10 changes: 7 additions & 3 deletions global/const/game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const WORKER_RESOURCE_ID: String = "worker"
const WORKER_ROLE_RESOURCE: Array[String] = [WORKER_RESOURCE_ID, "swordsman"]

const VERSION_MAJOR: String = "prototype"
const VERSION_MINOR: String = "week 19"
const VERSION_MINOR: String = "week 20"

const PARAMS: Dictionary = PARAMS_PROD #PARAMS_PROD #PARAMS_DEBUG

Expand All @@ -13,7 +13,9 @@ const WEB_EXPORT_WORKAROUNDS: bool = false

const PARAMS_DEBUG: Dictionary = {
"CLIPBOARD_WEB_WORKAROUND": WEB_EXPORT_WORKAROUNDS,
"cat_boss_battle_fps": true,
"BuH_wall_disabled": false,
"BuH_damage_timer": 0.4,
"BuH_cat_boss_battle_fps": false,
"soul_disabled": false,
"prestige_disabled": false,
"reborn_overlay_shader": true,
Expand Down Expand Up @@ -48,7 +50,9 @@ const PARAMS_DEBUG: Dictionary = {

const PARAMS_PROD: Dictionary = {
"CLIPBOARD_WEB_WORKAROUND": WEB_EXPORT_WORKAROUNDS,
"cat_boss_battle_fps": true,
"BuH_damage_timer": 0.4,
"BuH_wall_disabled": false,
"BuH_cat_boss_battle_fps": false,
"soul_disabled": false,
"prestige_disabled": false,
"reborn_overlay_shader": true,
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Godot Project Zero: A Dark Forest

Inspired by A Dark Room, the Dark Forest is an incremental experimental minimalistic game project.

CONTRIBUTE:
- see "Issues" section on Github for working on **project (enhancements)**
- join Discord (add `tiny_takin_teller` for invites) and Trello for working on **game (content, mechanics, design)**
Expand All @@ -10,7 +12,7 @@ PLAY THE GAME:
READ WEEKLY DEVLOG'S:
- Itch https://tinytakinteller.itch.io/the-best-game-ever/devlog

Current Version - [ PROTOTYPE : WEEK 19 ]
Current Version - [ PROTOTYPE : WEEK 20 ]

**Milestones**
- 29/04/2024 [`prototype.week.01`] **First version shared on Itch** 👀
Expand Down
22 changes: 21 additions & 1 deletion scenes/autostart/soul_screen/soul/soul_sprite.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var min_speed: float = 100

@onready var sprite_2d: Sprite2D = %Sprite2D
@onready var hurtbox_area_2d: Area2D = %HurtboxArea2D
@onready var damage_timer: Timer = %DamageTimer
@onready var damage_tween: SimpleTween = %DamageTween

###############
## overrides ##
Expand All @@ -30,6 +32,12 @@ func _physics_process(_delta: float) -> void:

func _ready() -> void:
_connect_signals()
_initialize()


func _initialize() -> void:
damage_timer.wait_time = Game.PARAMS["BuH_damage_timer"]
damage_tween.duration = Game.PARAMS["BuH_damage_timer"]


#############
Expand All @@ -42,4 +50,16 @@ func _connect_signals() -> void:


func _on_hurtbox_area_entered(_area: Area2D) -> void:
pass
if damage_timer.is_stopped():
damage_timer.start()
damage_tween.play_animation()
SignalBus.player_damaged.emit()


#############
## exports ##
#############


func _damage_tween_method(percent: float) -> void:
self.modulate.a = percent
27 changes: 21 additions & 6 deletions scenes/autostart/soul_screen/soul/soul_sprite.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[gd_scene load_steps=3 format=3 uid="uid://dfrws6lo2o7d0"]
[gd_scene load_steps=5 format=3 uid="uid://dfrws6lo2o7d0"]

[ext_resource type="Texture2D" uid="uid://cfm5va8l2ai3y" path="res://assets/image/soul/soul_16_16.png" id="1_lonsv"]
[ext_resource type="Script" path="res://scenes/autostart/soul_screen/soul/soul_sprite.gd" id="2_wa4lx"]
[ext_resource type="PackedScene" uid="uid://b3awft3ugc6q3" path="res://scenes/component/tween/simple_tween/simple_tween.tscn" id="3_g474e"]

[sub_resource type="CircleShape2D" id="CircleShape2D_o7hs7"]
radius = 6.0

[node name="SoulSprite" type="CharacterBody2D"]
z_index = 4096
Expand All @@ -11,12 +15,23 @@ script = ExtResource("2_wa4lx")
unique_name_in_owner = true
texture = ExtResource("1_lonsv")

[node name="HitboxCollisionPolygon2D" type="CollisionPolygon2D" parent="."]
visible = false
polygon = PackedVector2Array(-7, -5, -8, -5, -8, -1, 0, 7, 8, -1, 8, -5, 7, -5, 5, -7, 5, -8, 2, -8, 2, -7, 0, -6, -2, -7, -2, -8, -5, -8, -5, -7)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -1)
shape = SubResource("CircleShape2D_o7hs7")

[node name="HurtboxArea2D" type="Area2D" parent="."]
unique_name_in_owner = true

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="HurtboxArea2D"]
polygon = PackedVector2Array(-7, -5, -8, -5, -8, -1, 0, 7, 8, -1, 8, -5, 7, -5, 5, -7, 5, -8, 2, -8, 2, -7, 0, -6, -2, -7, -2, -8, -5, -8, -5, -7)
[node name="CollisionShape2D" type="CollisionShape2D" parent="HurtboxArea2D"]
position = Vector2(0, -1)
shape = SubResource("CircleShape2D_o7hs7")

[node name="DamageTimer" type="Timer" parent="."]
unique_name_in_owner = true
wait_time = 0.5
one_shot = true

[node name="DamageTween" parent="." node_paths=PackedStringArray("target") instance=ExtResource("3_g474e")]
unique_name_in_owner = true
target = NodePath("..")
call_method = "_damage_tween_method"
7 changes: 2 additions & 5 deletions scenes/autostart/soul_screen/soul_screen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ extends Node
@onready var control: Control = %Control
@onready var label: Label = $Control/Label


###############
## overrides ##
###############


func _physics_process(_delta: float) -> void:
pattern_master.align_patterns(
cat_sprite_2d.position - cat_sprite_2d.get_rect().size / 4 + Vector2(8, -16.0)
)
pattern_master.align_patterns(cat_sprite_2d.position)


func _ready() -> void:
Expand Down Expand Up @@ -68,5 +65,5 @@ func _initialize() -> void:

func _intro_animation_end() -> void:
_add_shake_effect_to_cat()
# label.visible = true
pattern_master.start_pattern(0)
pattern_master.start_pattern(1)
17 changes: 10 additions & 7 deletions scenes/autostart/soul_screen/soul_screen.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[gd_scene load_steps=7 format=3 uid="uid://dl41mo1e3hnlo"]
[gd_scene load_steps=8 format=3 uid="uid://dl41mo1e3hnlo"]

[ext_resource type="Script" path="res://scenes/autostart/soul_screen/soul_screen.gd" id="1_fyd6i"]
[ext_resource type="Theme" uid="uid://d276arnrjws3i" path="res://resources/theme/dark/dark.tres" id="2_ey0j8"]
[ext_resource type="PackedScene" uid="uid://dfrws6lo2o7d0" path="res://scenes/autostart/soul_screen/soul/soul_sprite.tscn" id="2_rspx0"]
[ext_resource type="PackedScene" uid="uid://bpq246h5ihhck" path="res://scenes/component/shake_shader_component/shake_shader_component.tscn" id="2_whm7q"]
[ext_resource type="PackedScene" uid="uid://dp27xbynyqp65" path="res://scenes/bullet_up_hell/pattern_master/pattern_master.tscn" id="5_742rc"]
[ext_resource type="Texture2D" uid="uid://b4wqq3rdroryo" path="res://assets/image/npc/cat/cat_90_100_shadow.png" id="5_ary8y"]
[ext_resource type="PackedScene" uid="uid://dmyeg6ldx2orv" path="res://scenes/bullet_up_hell/vignette/vignette.tscn" id="7_1mte2"]

[node name="Soul" type="Node"]
script = ExtResource("1_fyd6i")
Expand All @@ -27,6 +28,7 @@ texture = ExtResource("5_ary8y")

[node name="Control" type="Control" parent="."]
unique_name_in_owner = true
modulate = Color(0.392157, 0.392157, 0.878431, 1)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
Expand All @@ -36,17 +38,18 @@ grow_vertical = 2
theme = ExtResource("2_ey0j8")

[node name="Label" type="Label" parent="Control"]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -11.5
offset_right = 20.0
offset_bottom = 11.5
offset_left = -476.0
offset_top = 245.0
offset_right = -217.0
offset_bottom = 268.0
grow_horizontal = 2
grow_vertical = 2
text = "Coming Soon"
text = "[ Work In Progress - Coming Soon ]"

[node name="Vignette" parent="." instance=ExtResource("7_1mte2")]
Loading

0 comments on commit 3bcea93

Please sign in to comment.