game_loop nearly done

This commit is contained in:
2025-06-12 22:23:52 +02:00
parent 0730c6d40a
commit 402d44e2bb
30 changed files with 136 additions and 173 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cppnad2sauulq"
path="res://.godot/imported/Office.png-e6c790823ef35154f82a3192d68815e5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/Office.png"
dest_files=["res://.godot/imported/Office.png-e6c790823ef35154f82a3192d68815e5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1bq2kroefeoy"
path="res://.godot/imported/PatientRoom2.jpg-368b72d1e43ab22dbc19aedf5f78c1a6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/PatientRoom2.jpg"
dest_files=["res://.godot/imported/PatientRoom2.jpg-368b72d1e43ab22dbc19aedf5f78c1a6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 MiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bmnsx7d17h3bw"
path="res://.godot/imported/ScaredFace.png-eb6218432951fbe129e10237d69dda7a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/ScaredFace.png"
dest_files=["res://.godot/imported/ScaredFace.png-eb6218432951fbe129e10237d69dda7a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

-34
View File
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cngys5i7ggvhn"
path="res://.godot/imported/ScaredFaceEdited.png-51b8798a61e279c1ccded3d95ea8aca3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/ScaredFaceEdited.png"
dest_files=["res://.godot/imported/ScaredFaceEdited.png-51b8798a61e279c1ccded3d95ea8aca3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c7vyp0s2ci7qf"
path="res://.godot/imported/PatientRoom.jpg-e349da84ef9248e0711fe44a9c6bbc5d.ctex"
uid="uid://h0sbv6vfm8yx"
path="res://.godot/imported/meeting_room.png-a1beaf0a6ed858164e9efb73c7446bc6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/PatientRoom.jpg"
dest_files=["res://.godot/imported/PatientRoom.jpg-e349da84ef9248e0711fe44a9c6bbc5d.ctex"]
source_file="res://Art/meeting_room.png"
dest_files=["res://.godot/imported/meeting_room.png-a1beaf0a6ed858164e9efb73c7446bc6.ctex"]
[params]
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bchkgrmeeryiq"
path="res://.godot/imported/MeetingRoom.png-77aa22d9067935e9f7ec3b696606ea96.ctex"
uid="uid://bs1t18iatp3rk"
path="res://.godot/imported/recovery_room.png-d4d54c93d559cd3cd2958e41cffe65fc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/MeetingRoom.png"
dest_files=["res://.godot/imported/MeetingRoom.png-77aa22d9067935e9f7ec3b696606ea96.ctex"]
source_file="res://Art/recovery_room.png"
dest_files=["res://.godot/imported/recovery_room.png-d4d54c93d559cd3cd2958e41cffe65fc.ctex"]
[params]
Binary file not shown.
+14 -4
View File
@@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://bedroom.gd" id="1_di4oy"]
[ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="2_trxfw"]
[ext_resource type="Texture2D" uid="uid://c7vyp0s2ci7qf" path="res://Art/PatientRoom.jpg" id="3_k53lf"]
[ext_resource type="Texture2D" uid="uid://bs1t18iatp3rk" path="res://Art/recovery_room.png" id="3_le6i2"]
[node name="Corridor" type="Control"]
layout_mode = 3
@@ -13,6 +13,15 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_di4oy")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="Background" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
@@ -20,11 +29,12 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 0
[node name="UpperBorder" type="TextureRect" parent="Background"]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 0.25
size_flags_stretch_ratio = 0.1
texture = ExtResource("2_trxfw")
expand_mode = 1
@@ -32,12 +42,12 @@ expand_mode = 1
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 1.5
texture = ExtResource("3_k53lf")
texture = ExtResource("3_le6i2")
expand_mode = 1
[node name="LowerBorder" type="TextureRect" parent="Background"]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 0.25
size_flags_stretch_ratio = 0.1
texture = ExtResource("2_trxfw")
expand_mode = 1
+17 -1
View File
@@ -1,5 +1,21 @@
~ end_of_day_1
As the door closes on the last patient and the adrenaline subsides, you suddenly feel a day's worth of exhaustion crashing down on you. It is time to retire for the day.
As the door closed on the last patient and the adrenaline subsided, I felt satisfied tiredness. It was time to retire for the day.
=> END
~ end_of_day_2
Today's work was more difficult than yesterday. I couldn't wait to hit the sack.
=> END
~ end_of_day_3
At last, I was done for the day. I was drained. How was I so exhausted after merely 3 days ?
=> END
+31
View File
@@ -0,0 +1,31 @@
~ end_of_day_1
Relaxing in my assigned recovery room, I pondered on today's events. Screening the patients was as tough as I had expected, but I had overestimated how rewarding it would feel.
Commons expressed gratitude, but were above all drenched in fear. Abnormals only communicated with alien, thinly veiled threats.
Still, I gobbled down my Republican-standardized meal with satisfaction, and switfly fell asleep.
My dreams were hazy, full of anxious metaphors and hopeful allegories.
=> END
~ end_of_day_2
I felt wearier than yesterday. After hastily swallowing my nutritionally optimized ration, I lied down and soon went into a deep slumber.
My dreams were embroidered with disturbing events. Dusky shapes lurking in the background, alluring whispers flowing down my ears.
I didn't feel scared however. I was warned this could happen to newly-trained psychiatrists. This was all part of what I had signed up for.
When the alarm clock rang, I was already up and eager to tackle the next batch of patients.
=> END
~ end_of_day_3
Although I hadn't screened that many patients today, I felt drained. I forced myself to gulp down my quite tasteless food, and drifted off to the world of dreams.
I had my first nightmare. The whispers were getting louder. I could catch glimpses of shadowy silhouettes crawling towards me, disappearing as I tried to examine them more closely.
I woke up glittering with perspiration, my heart pounding in my chest.
I had to get to work.
=> END
+15
View File
@@ -0,0 +1,15 @@
[remap]
importer="dialogue_manager_compiler_13"
type="Resource"
uid="uid://ce44tpnnps3m7"
path="res://.godot/imported/recovery.dialogue-d07fcb5de1637d7a496b0a2c9a15fb4c.tres"
[deps]
source_file="res://Dialogues/recovery.dialogue"
dest_files=["res://.godot/imported/recovery.dialogue-d07fcb5de1637d7a496b0a2c9a15fb4c.tres"]
[params]
defaults=true
+1 -1
View File
@@ -3,7 +3,7 @@
[ext_resource type="Script" path="res://main_hub.gd" id="1_rvfpd"]
[ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://title_screen.tscn" id="2_3wmv1"]
[ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://screening_desk.tscn" id="3_whctb"]
[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://bedroom.tscn" id="4_4fm57"]
[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://Bedroom.tscn" id="4_4fm57"]
[ext_resource type="PackedScene" uid="uid://igkl2384rxt1" path="res://text_screens.tscn" id="5_85o5j"]
[ext_resource type="PackedScene" uid="uid://dixsxwodxuf0b" path="res://dialogue_screens.tscn" id="6_60wm2"]
+2 -2
View File
@@ -2,7 +2,7 @@
[ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="1_0xuu6"]
[ext_resource type="Script" path="res://dialogue_screens.gd" id="1_4k063"]
[ext_resource type="Texture2D" uid="uid://bchkgrmeeryiq" path="res://Art/MeetingRoom.png" id="2_2wcr2"]
[ext_resource type="Texture2D" uid="uid://h0sbv6vfm8yx" path="res://Art/meeting_room.png" id="3_k36pg"]
[node name="dialogue_screens" type="Control"]
layout_mode = 3
@@ -33,7 +33,7 @@ expand_mode = 1
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 1.5
texture = ExtResource("2_2wcr2")
texture = ExtResource("3_k36pg")
expand_mode = 1
[node name="LowerBorder" type="TextureRect" parent="Background"]
+2
View File
@@ -3,6 +3,8 @@ extends Node
var is_transitioning = false
var day_count = 1
var daily_patient_limit = 2
var dialogue_intro = load("res://Dialogues/intro.dialogue")
var dialogue_recovery = load("res://Dialogues/recovery.dialogue")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
+24 -6
View File
@@ -7,9 +7,6 @@ extends Control
@export var DialogueScreens: PackedScene
var dialogue_intro = load("res://Dialogues/intro.dialogue")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -83,7 +80,7 @@ func play_intro():
#Text Slides
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $MarginContainer/IntroBoxContainer/Header, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $TextScreens/MarginContainer/IntroBoxContainer/Header, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
await UI.next_slide
for i in 4:
TransitionScreen.transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)])
@@ -93,7 +90,7 @@ func play_intro():
TransitionScreen.transition("big", [$TextScreens, $TextScreens/MarginContainer, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens])
await TransitionScreen.transition_finished
DialogueManager.show_dialogue_balloon(dialogue_intro, "start")
DialogueManager.show_dialogue_balloon(Globals.dialogue_intro, "start")
await DialogueManager.dialogue_ended
#Starting Day Loop
@@ -115,7 +112,7 @@ func start_day_loop():
await TransitionScreen.transition_finished
#Finally starting the Game Loop
$ScreeningDesk.game_loop("564")
$ScreeningDesk.new_patient("564")
@@ -124,3 +121,24 @@ func _on_recovery_pressed():
var scenes_to_hide = [$ScreeningDesk.end_of_day_controls, $ScreeningDesk]
var scenes_to_show:Array[Node] = [$Bedroom]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
DialogueManager.show_dialogue_balloon(Globals.dialogue_recovery, "end_of_day_" + str(Globals.day_count))
await DialogueManager.dialogue_ended
Globals.day_count += 1
#Transitioning to Day Screen
$TextScreens/Day.text = "[center]DAY " + str(Globals.day_count) + "[/center]"
scenes_to_hide = [$Bedroom]
scenes_to_show = [$TextScreens, $TextScreens/Day]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
await get_tree().create_timer(3.0).timeout
#Transitioning to Screening Desk
scenes_to_hide = scenes_to_show
scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
$ScreeningDesk.new_patient("564")
+1 -1
View File
@@ -55,4 +55,4 @@ ui_select={
[internationalization]
locale/translations_pot_files=PackedStringArray("res://Dialogues/intro.dialogue", "res://Dialogues/mr_orleg.dialogue", "res://Dialogues/intro_stash.dialogue", "res://Dialogues/Patients/patient_1.dialogue", "res://Dialogues/Patients/patient_564.dialogue", "res://Dialogues/end_of_day.dialogue")
locale/translations_pot_files=PackedStringArray("res://Dialogues/intro.dialogue", "res://Dialogues/mr_orleg.dialogue", "res://Dialogues/intro_stash.dialogue", "res://Dialogues/Patients/patient_1.dialogue", "res://Dialogues/Patients/patient_564.dialogue", "res://Dialogues/end_of_day.dialogue", "res://Dialogues/recovery.dialogue")
+1 -8
View File
@@ -53,13 +53,6 @@ func _ready() -> void:
#Game Loop
func game_loop(patient_id):
new_patient(patient_id)
#Sets Up New Patient
func new_patient(patient_id):
@@ -210,7 +203,7 @@ func start_balloon(dialogue_resource: Resource, start_title: String):
#Freeing Previous Balloon and Disconnecting DialogueManager signals
clean_balloon()
#Instantiating a custom balloon
var Balloon: Resource = load("res://Dialogues/balloon_small.tscn")
balloon = Balloon.instantiate()
+2
View File
@@ -3,6 +3,7 @@ extends CanvasLayer
@onready var intro_text_container = $MarginContainer/IntroBoxContainer/TextContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -14,6 +15,7 @@ func _ready() -> void:
$Day.hide()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
+7 -1
View File
@@ -2,6 +2,8 @@ extends CanvasLayer
signal new_game_pressed
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
self.get_node("TitleScreen/MenuContainer/NewGame").pressed.connect(_on_new_game_pressed)
@@ -10,14 +12,18 @@ func _ready() -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_new_game_pressed() -> void:
new_game_pressed.emit()
print("Starting New Game...")
func _on_quit_game_pressed():
get_tree().quit()
+5 -3
View File
@@ -9,6 +9,8 @@ signal transition_finished
@onready var small_animation = $SmallFading/SmallFadingAnimation
@onready var mask = $Mask
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -17,7 +19,7 @@ func _ready() -> void:
mask.visible = false
big_animation.connect("animation_finished", _on_animation_finished)
small_animation.connect("animation_finished", _on_animation_finished)
func _on_animation_finished(anim_name):
@@ -31,7 +33,7 @@ func _on_animation_finished(anim_name):
Globals.is_transitioning = false
big_fading.visible = false
small_fading.visible = false
#Handles fading transitions
@@ -45,7 +47,7 @@ func fading(size):
elif size == "small":
small_fading.visible = true
small_animation.play("fade_to_black")
#Transitions the scenes
+6 -2
View File
@@ -9,6 +9,8 @@ extends CanvasLayer
signal next_request
signal next_slide
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -29,8 +31,7 @@ func _ready() -> void:
confirmation_dialog.hide()
self.get_node("UI/UpperContainer").hide()
self.get_node("UI/SkipContainer").hide()
pass
#Requests next when the Next Button is pressed
@@ -38,18 +39,21 @@ func _on_next_pressed():
next_request.emit()
#Requests next when the space key is pressed
func _input(event):
if event is InputEventKey and event.is_action_released("ui_accept"):
next_request.emit()
#Makes sure fading transitions are done before approving a next request
func _on_next_request():
if Globals.is_transitioning == false:
next_slide.emit()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass