Intro cutscene testing

This commit is contained in:
ToasterPanic 2025-12-06 14:33:22 -05:00
parent ad60d493bf
commit 453a0963b4
16 changed files with 439 additions and 20 deletions

View file

@ -41,7 +41,8 @@ theme/custom_font="uid://n1nd5m2kwexu"
ui_accept={ ui_accept={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
@ -50,7 +51,9 @@ ui_accept={
} }
ui_select={ ui_select={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
] ]

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=21 format=3 uid="uid://by43ihcec8e8q"] [gd_scene load_steps=23 format=3 uid="uid://by43ihcec8e8q"]
[ext_resource type="Script" uid="uid://b2sw6ymaf4t0s" path="res://scripts/game_ground.gd" id="1_6ra5r"] [ext_resource type="Script" uid="uid://b2sw6ymaf4t0s" path="res://scripts/game_ground.gd" id="1_6ra5r"]
[ext_resource type="Script" uid="uid://dowu512otgyyf" path="res://scripts/player_ground.gd" id="3_8gbjj"] [ext_resource type="Script" uid="uid://dowu512otgyyf" path="res://scripts/player_ground.gd" id="3_8gbjj"]
[ext_resource type="AudioStream" uid="uid://cdl70q0x28717" path="res://sounds/dialogue.mp3" id="3_rncil"] [ext_resource type="AudioStream" uid="uid://cdl70q0x28717" path="res://sounds/dialogue.mp3" id="3_rncil"]
[ext_resource type="Texture2D" uid="uid://c0cyhybh30ogt" path="res://textures/player-ground-sheet.png" id="4_2c1ag"] [ext_resource type="Texture2D" uid="uid://c0cyhybh30ogt" path="res://textures/player-ground-sheet.png" id="4_2c1ag"]
[ext_resource type="Shader" uid="uid://d3hoh7ec2w8q7" path="res://scripts/outline.gdshader" id="7_vuhkc"] [ext_resource type="Shader" uid="uid://d3hoh7ec2w8q7" path="res://scripts/outline.gdshader" id="7_vuhkc"]
[ext_resource type="Shader" uid="uid://d2e0541hawkml" path="res://scripts/vignette.gdshader" id="9_5vwr8"]
[ext_resource type="Shader" uid="uid://bk7q00br1ms30" path="res://scripts/retro.gdshader" id="9_257nh"] [ext_resource type="Shader" uid="uid://bk7q00br1ms30" path="res://scripts/retro.gdshader" id="9_257nh"]
[ext_resource type="Texture2D" uid="uid://dauoebs801ngm" path="res://addons/super_awesome_input_icons/textures/keyboard/question.png" id="16_e3s4u"] [ext_resource type="Texture2D" uid="uid://dauoebs801ngm" path="res://addons/super_awesome_input_icons/textures/keyboard/question.png" id="16_e3s4u"]
[ext_resource type="Script" uid="uid://b2maxk5g6yb0i" path="res://addons/super_awesome_input_icons/classes/input_icon_texture_rect.gd" id="16_hby33"] [ext_resource type="Script" uid="uid://b2maxk5g6yb0i" path="res://addons/super_awesome_input_icons/classes/input_icon_texture_rect.gd" id="16_hby33"]
@ -75,10 +76,16 @@ animations = [{
radius = 16.0 radius = 16.0
height = 48.0 height = 48.0
[sub_resource type="LabelSettings" id="LabelSettings_e3s4u"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_8gbjj"]
shader = ExtResource("9_5vwr8")
shader_parameter/radius = 1.0
shader_parameter/softness = 1.0
shader_parameter/intensity = 2.0
shader_parameter/contrast = 2.2
shader_parameter/vignette_color = Color(0, 0, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_5vwr8"]
font_size = 32 font_size = 32
outline_size = 4
outline_color = Color(0, 0, 0, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_jo68p"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_jo68p"]
shader = ExtResource("7_vuhkc") shader = ExtResource("7_vuhkc")
@ -135,6 +142,16 @@ shape = SubResource("CapsuleShape2D_176r3")
[node name="UI" type="CanvasLayer" parent="."] [node name="UI" type="CanvasLayer" parent="."]
[node name="Vignette" type="ColorRect" parent="UI"]
material = SubResource("ShaderMaterial_8gbjj")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(1, 1, 1, 0)
[node name="Control" type="Control" parent="UI"] [node name="Control" type="Control" parent="UI"]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
@ -157,10 +174,11 @@ alignment = 1
[node name="Label" type="Label" parent="UI/Control/Dialogue"] [node name="Label" type="Label" parent="UI/Control/Dialogue"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3
text = "How may I help you?" text = "How may I help you?"
label_settings = SubResource("LabelSettings_e3s4u") label_settings = SubResource("LabelSettings_5vwr8")
horizontal_alignment = 1
vertical_alignment = 2 vertical_alignment = 2
autowrap_mode = 3
[node name="InputIcon" type="VFlowContainer" parent="UI/Control/Dialogue"] [node name="InputIcon" type="VFlowContainer" parent="UI/Control/Dialogue"]
layout_mode = 2 layout_mode = 2
@ -168,7 +186,7 @@ alignment = 1
[node name="InputIcon" type="TextureRect" parent="UI/Control/Dialogue/InputIcon"] [node name="InputIcon" type="TextureRect" parent="UI/Control/Dialogue/InputIcon"]
material = SubResource("ShaderMaterial_jo68p") material = SubResource("ShaderMaterial_jo68p")
custom_minimum_size = Vector2(32, 32) custom_minimum_size = Vector2(48, 48)
layout_mode = 2 layout_mode = 2
texture = ExtResource("16_e3s4u") texture = ExtResource("16_e3s4u")
expand_mode = 2 expand_mode = 2

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=42 format=4 uid="uid://dfjnikjjynj0e"] [gd_scene load_steps=47 format=4 uid="uid://dfjnikjjynj0e"]
[ext_resource type="AudioStream" uid="uid://dgv01wy8r7ej2" path="res://sounds/uglyburger.mp3" id="1_kpeax"] [ext_resource type="AudioStream" uid="uid://dgv01wy8r7ej2" path="res://sounds/uglyburger.mp3" id="1_kpeax"]
[ext_resource type="Texture2D" uid="uid://btcap3oh2dqt8" path="res://textures/wall_tile.png" id="2_4uppp"] [ext_resource type="Texture2D" uid="uid://btcap3oh2dqt8" path="res://textures/wall_tile.png" id="2_4uppp"]
[ext_resource type="AudioStream" uid="uid://w3hai62ji61g" path="res://sounds/heart_monitor.mp3" id="2_v7oqm"]
[ext_resource type="Texture2D" uid="uid://xs6tjca62pw1" path="res://textures/wall_side_tile.png" id="3_ir5n7"] [ext_resource type="Texture2D" uid="uid://xs6tjca62pw1" path="res://textures/wall_side_tile.png" id="3_ir5n7"]
[ext_resource type="Texture2D" uid="uid://ddfp7u4a7llnr" path="res://textures/wall_side_tile_left.png" id="4_50pdk"] [ext_resource type="Texture2D" uid="uid://ddfp7u4a7llnr" path="res://textures/wall_side_tile_left.png" id="4_50pdk"]
[ext_resource type="Texture2D" uid="uid://gl7rcrys46ay" path="res://textures/wall_side_tile_right.png" id="5_83fjc"] [ext_resource type="Texture2D" uid="uid://gl7rcrys46ay" path="res://textures/wall_side_tile_right.png" id="5_83fjc"]
@ -16,6 +17,9 @@
[ext_resource type="Texture2D" uid="uid://b047lku56vtve" path="res://textures/galacta_counter.png" id="12_janyw"] [ext_resource type="Texture2D" uid="uid://b047lku56vtve" path="res://textures/galacta_counter.png" id="12_janyw"]
[ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="13_vmpfq"] [ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="13_vmpfq"]
[ext_resource type="Script" uid="uid://khas1kkt2t3k" path="res://scripts/exit_ship.gd" id="14_jxmby"] [ext_resource type="Script" uid="uid://khas1kkt2t3k" path="res://scripts/exit_ship.gd" id="14_jxmby"]
[ext_resource type="Texture2D" uid="uid://ktvnppfhchoj" path="res://textures/bed.png" id="17_50pdk"]
[ext_resource type="Texture2D" uid="uid://cmv4wou5glrl7" path="res://textures/bed_foot.png" id="18_83fjc"]
[ext_resource type="Script" uid="uid://cva4b60iqolqy" path="res://scripts/story_handler_1.gd" id="19_akl5n"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_vmimc"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_vmimc"]
light_mode = 1 light_mode = 1
@ -192,6 +196,9 @@ size = Vector2(128, 60)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4hfpp"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_4hfpp"]
size = Vector2(40, 40) size = Vector2(40, 40)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_83fjc"]
size = Vector2(61.5, 21)
[node name="SpaceStation1" type="Node2D"] [node name="SpaceStation1" type="Node2D"]
[node name="Uglyburger" type="AudioStreamPlayer" parent="."] [node name="Uglyburger" type="AudioStreamPlayer" parent="."]
@ -200,6 +207,10 @@ autoplay = true
bus = &"Music" bus = &"Music"
parameters/looping = true parameters/looping = true
[node name="HeartMonitor" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_v7oqm")
parameters/looping = true
[node name="Map" type="TileMapLayer" parent="."] [node name="Map" type="TileMapLayer" parent="."]
modulate = Color(0.53333336, 0.53333336, 0.53333336, 1) modulate = Color(0.53333336, 0.53333336, 0.53333336, 1)
z_index = -4096 z_index = -4096
@ -279,6 +290,29 @@ shape = SubResource("RectangleShape2D_4hfpp")
[node name="PlayerSpawn" type="Node2D" parent="."] [node name="PlayerSpawn" type="Node2D" parent="."]
position = Vector2(349, -58) position = Vector2(349, -58)
[node name="PlayerSpawnIntro" type="Node2D" parent="."]
position = Vector2(126, -1796)
[node name="Sprite2D3" type="Sprite2D" parent="."]
z_index = -1
position = Vector2(126, -1787)
scale = Vector2(2, 2)
texture = ExtResource("17_50pdk")
[node name="Sprite2D" type="StaticBody2D" parent="."]
position = Vector2(126, -1787)
scale = Vector2(2, 2)
[node name="Sprite2D2" type="Sprite2D" parent="Sprite2D"]
texture = ExtResource("18_83fjc")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite2D"]
position = Vector2(-0.25, 37.5)
shape = SubResource("RectangleShape2D_83fjc")
[node name="StoryHandler1" type="Node2D" parent="."]
script = ExtResource("19_akl5n")
[connection signal="body_entered" from="GalactamartWorker/InteractArea" to="GalactamartWorker/InteractArea" method="_on_body_entered"] [connection signal="body_entered" from="GalactamartWorker/InteractArea" to="GalactamartWorker/InteractArea" method="_on_body_entered"]
[connection signal="body_exited" from="GalactamartWorker/InteractArea" to="GalactamartWorker/InteractArea" method="_on_body_exited"] [connection signal="body_exited" from="GalactamartWorker/InteractArea" to="GalactamartWorker/InteractArea" method="_on_body_exited"]
[connection signal="body_entered" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_entered"] [connection signal="body_entered" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_entered"]

View file

@ -2,5 +2,7 @@ extends Button
var game = null var game = null
var id = null
func _on_pressed() -> void: func _on_pressed() -> void:
game.choice_made.emit(get_name()) game.choice_made.emit(self)

View file

@ -4,6 +4,20 @@ var current_interaction_area = null
signal dialogue_continue signal dialogue_continue
signal choice_made signal choice_made
var dialogue_colors = {
"generic": Color("fff"),
"player": Color("fff"),
"player_woozy": Color("fff"),
"doctor_1": Color("00ffffff"),
"doctor_2": Color("00a2ffff"),
}
var dialogue_speed = {
"generic": 0.037,
"player_slow": 0.06,
"player_woozy": 0.2,
}
func _ready() -> void: func _ready() -> void:
$UI/Control/Dialogue.visible = false $UI/Control/Dialogue.visible = false
@ -21,6 +35,10 @@ func _ready() -> void:
if "game" in o: if "game" in o:
o.game = self o.game = self
for n in get_children():
if "_ground_ready" in n:
n._ground_ready()
location_scene.free() location_scene.free()
func _process(delta: float) -> void: func _process(delta: float) -> void:
@ -33,10 +51,18 @@ func _process(delta: float) -> void:
else: else:
$UI/Control/Interact.visible = false $UI/Control/Interact.visible = false
func dialogue(text: String) -> void: func dialogue(text: String, type: String = "generic", allow_input: bool = true) -> void:
$UI/Control/Dialogue/InputIcon.visible = false $UI/Control/Dialogue/InputIcon.visible = false
$UI/Control/Dialogue.visible = true $UI/Control/Dialogue.visible = true
var speed = dialogue_speed.generic
if dialogue_speed.has(type): speed = dialogue_speed[type]
$UI/Control/Dialogue/Label.label_settings.font_color = dialogue_colors.generic
if dialogue_colors.has(type): $UI/Control/Dialogue/Label.label_settings.font_color = dialogue_colors[type]
var displayed_text = "" var displayed_text = ""
var i = 0 var i = 0
@ -47,14 +73,18 @@ func dialogue(text: String) -> void:
$Dialogue.play() $Dialogue.play()
await get_tree().create_timer(0.03).timeout await get_tree().create_timer(speed).timeout
i += 1 i += 1
$UI/Control/Dialogue/InputIcon.visible = true if allow_input:
$UI/Control/Dialogue/InputIcon.visible = true
await dialogue_continue await dialogue_continue
$UI/Control/Dialogue.visible = false
func end_dialogue() -> void:
$UI/Control/Dialogue.visible = false $UI/Control/Dialogue.visible = false
return return
@ -64,7 +94,7 @@ func make_choice(options: Dictionary = {}) -> String:
var dialogue_select_button_scene = preload("res://scenes/dialogue_select_button.tscn") var dialogue_select_button_scene = preload("res://scenes/dialogue_select_button.tscn")
for n in $UI/Control/DialogueOptions.get_children(): if n.is_class("Button"): n.free() for n in $UI/Control/DialogueOptions.get_children(): if n.is_class("Button"): n.queue_free()
var first_button = null var first_button = null
var last_button = null var last_button = null
@ -73,6 +103,7 @@ func make_choice(options: Dictionary = {}) -> String:
var dialogue_select_button = dialogue_select_button_scene.instantiate() var dialogue_select_button = dialogue_select_button_scene.instantiate()
dialogue_select_button.name = n dialogue_select_button.name = n
dialogue_select_button.id = n
dialogue_select_button.text = options[n] dialogue_select_button.text = options[n]
dialogue_select_button.game = self dialogue_select_button.game = self
@ -87,12 +118,19 @@ func make_choice(options: Dictionary = {}) -> String:
first_button.grab_focus() first_button.grab_focus()
var response = await choice_made var button = await choice_made
var response = button.id
$UI/Control/DialogueOptions.visible = false $UI/Control/DialogueOptions.visible = false
return response return response
func get_vignette_parameter(name: String) -> float:
return $UI/Vignette.material.get_shader_parameter(name)
func set_vignette_parameter(name: String, value: float) -> void:
$UI/Vignette.material.set_shader_parameter(name, value)
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if event.is_action_released("dialogue_continue"): if event.is_action_released("dialogue_continue"):

View file

@ -84,7 +84,7 @@ func load_settings():
func delete_game(): func delete_game():
await DirAccess.remove_absolute("user://savegame.save") await DirAccess.remove_absolute("user://savegame.save")
var stats = { var default_stats = {
"loaded": false, "loaded": false,
"fuel": 12, "fuel": 12,
"fuel_tank_size": 1, "fuel_tank_size": 1,
@ -93,9 +93,12 @@ var stats = {
"marks": 200, "marks": 200,
"location": "space", "location": "space",
"ship_position": Vector2(), "ship_position": Vector2(),
"ship_rotation": 0 "ship_rotation": 0,
"story_progress": 0,
} }
var stats = default_stats.duplicate_deep()
var settings = { var settings = {
"master_volume": 1.0, "master_volume": 1.0,
"music_volume": 1.0, "music_volume": 1.0,

189
scripts/story_handler_1.gd Normal file
View file

@ -0,0 +1,189 @@
extends Node2D
var game = null
@onready var player = null
func _ground_ready() -> void:
player = game.get_node("PlayerGround")
if global.stats.story_progress == 0:
game.get_node("Uglyburger").stop()
game.get_node("HeartMonitor").play()
game.set_vignette_parameter("radius", 0)
game.set_vignette_parameter("softness", 0)
player.position = game.get_node("PlayerSpawnIntro").global_position
player.busy = true
await get_tree().create_timer(0.5).timeout
await game.dialogue("ugh...", "player_woozy", false)
await get_tree().create_timer(1).timeout
game.end_dialogue()
"""var i = 0
while i < 5:
await get_tree().create_timer(0.2).timeout
game.set_vignette_parameter("softness", i * 0.02)
i += 1
while i > 0:
await get_tree().create_timer(0.2).timeout
game.set_vignette_parameter("softness", i * 0.02)
i -= 1
await game.dialogue("Is he concious..?", "doctor_1", false)
await get_tree().create_timer(2).timeout
await game.dialogue("Franky, I doubt it. You know the recovery rates.", "doctor_2", false)
await get_tree().create_timer(1.5).timeout
await game.dialogue("Monitor's probably just bugging out, per the usual...", "doctor_2", false)
var choice_1 = await game.make_choice({
"what": "...what..?",
"huh": "...huh..?",
"whhngh": "...whhngh..."
})
if choice_1 == "what":
await game.dialogue("...what...", "player_woozy", false)
elif choice_1 == "huh":
await game.dialogue("...huh..?", "player_woozy", false)
elif choice_1 == "whhngh":
await game.dialogue("...whhngh...", "player_woozy", false)
await game.dialogue("Wait... can you hear me?", "doctor_2", false)
var choice_2 = await game.make_choice({
"yeah": "...yeah..?",
"yeah2": "...yea..."
})
if choice_2 == "yeah":
await game.dialogue("...yeah..?", "player_woozy", false)
elif choice_2 == "yeah2":
await game.dialogue("...yea...", "player_woozy", false)
await get_tree().create_timer(0.5).timeout
while i < 5:
await get_tree().create_timer(0.2).timeout
game.set_vignette_parameter("softness", i * 0.02)
i += 1
await game.dialogue("Woah, that's...", "doctor_1", false)
while i < 10:
await get_tree().create_timer(0.2).timeout
game.set_vignette_parameter("softness", i * 0.02)
i += 1
await get_tree().create_timer(1.5).timeout
await game.dialogue("...well, what do we do now?", "doctor_2", false)
await get_tree().create_timer(2).timeout
await game.dialogue("I can handle it if you want.", "doctor_1", false)
await get_tree().create_timer(1.5).timeout
await game.dialogue("Well, if you need any help, ping me.", "doctor_2", false)
await get_tree().create_timer(1).timeout
await game.dialogue("Don't worry, I won't.", "doctor_1", false)"""
var i = 0
while i < 50:
await get_tree().create_timer(0.2).timeout
game.set_vignette_parameter("softness", i * 0.04)
i += 2
var choice_3 = await game.make_choice({
"where_am_i": "...where am I?",
"who_are_you": "...who are you?"
})
if choice_3 == "where_am_i":
await game.dialogue("...where am I..?", "player_slow", false)
await get_tree().create_timer(0.5).timeout
elif choice_3 == "who_are_you":
await game.dialogue("...who are you..?", "player_slow", false)
await get_tree().create_timer(0.5).timeout
await game.dialogue("Well, I'm Doctor Hohm.", "doctor_1")
await game.dialogue("You're currently in the Rosenhein Memorial Intergalatic Hospital.", "doctor_1")
await game.dialogue("You've been in a... coma-like state for the past four weeks.", "doctor_1")
var choice_4 = null
while choice_4 != "whats_next":
choice_4 = await game.make_choice({
"space": "I'm in space...?",
"coma": "Coma...?",
"whats_next": "What's next...?",
})
print(choice_4)
if choice_4 == "space":
await game.dialogue("Hold on... intergalactic... I'm in space?", "player_slow", false)
await get_tree().create_timer(0.5).timeout
await game.dialogue("Yes, you're in space.", "doctor_1")
await game.dialogue("...how the hell did I get here?", "player_slow")
await game.dialogue("Well, I don't know..", "doctor_1")
await game.dialogue("The story is that you collapsed trying to buy a pack of Twizzlers at the Galacta store.", "doctor_1")
await game.dialogue("Thankfully, we're right next to the Galacta store.", "doctor_1")
elif choice_4 == "coma":
await game.dialogue("A coma..?", "player_slow", false)
await get_tree().create_timer(0.5).timeout
await game.dialogue("Well, it's not actually a coma.", "doctor_1")
await game.dialogue("It's called Intergalactic Processing Disorder.", "doctor_1")
await game.dialogue("People with certain genetics are prone to have that happen under extreme, prolonged stress.", "doctor_1")
await game.dialogue("Most people don't wake up again. You got lucky.", "doctor_1")
await game.dialogue("So, what's next?", "player_slow")
await game.dialogue("Well, we're going to give you a minute to fully regain conciousness.", "doctor_1")
await game.dialogue("Then we'll make sure you're fit to leave.", "doctor_1")
await game.dialogue("Once that's done, you'll be discharged.", "doctor_1")
await game.dialogue("Feel free to get up and walk around, by the way.", "doctor_1")
await game.dialogue("When you're feeling ready, I'll be at the end of the hall.", "doctor_1")

View file

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

31
scripts/vignette.gdshader Normal file
View file

@ -0,0 +1,31 @@
shader_type canvas_item;
// Stronger defaults
uniform float radius: hint_range(0.0, 1.0) = 0.22; // where darkening starts (smaller = more encroachment)
uniform float softness: hint_range(0.0, 1.0) = 0.38; // feather width toward center
uniform float intensity: hint_range(0.0, 3.0) = 2.00; // overall darkness
uniform float contrast: hint_range(0.5, 4.0) = 2.20; // >1.0 sharpens falloff
uniform vec4 vignette_color: source_color = vec4(0.0, 0.0, 0.0, 1.0);
void fragment() {
vec2 uv = SCREEN_UV;
vec2 centered = uv - vec2(0.5);
// Edge-driven shape (0 at center, 1 at edges):
// Chebyshev distance = pushes from ALL edges uniformly
float edge_box = max(abs(centered.x) * 2.0, abs(centered.y) * 2.0);
// Blend a little radial in to avoid a "boxy" look (optional)
float edge_radial = length(centered) * 2.0; // 0 center -> ~1 corners
float shape = mix(edge_box, edge_radial, 0.25);
// Darken from radius inward with feather = softness
float v = smoothstep(radius, radius + softness, shape);
v = pow(v, contrast);
vec4 overlay = vignette_color;
overlay.a = clamp(v * intensity, 0.0, 1.0);
// Output just the vignette color/alpha (use on a full-screen ColorRect)
COLOR = overlay;
}

View file

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

BIN
sounds/heart_monitor.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://w3hai62ji61g"
path="res://.godot/imported/heart_monitor.mp3-45d576a1b1b5142ddb4f4128785db226.mp3str"
[deps]
source_file="res://sounds/heart_monitor.mp3"
dest_files=["res://.godot/imported/heart_monitor.mp3-45d576a1b1b5142ddb4f4128785db226.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
textures/bed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

40
textures/bed.png.import Normal file
View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ktvnppfhchoj"
path="res://.godot/imported/bed.png-47204cdaa89ced7b267c46ad935d7e83.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://textures/bed.png"
dest_files=["res://.godot/imported/bed.png-47204cdaa89ced7b267c46ad935d7e83.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

BIN
textures/bed_foot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmv4wou5glrl7"
path="res://.godot/imported/bed_foot.png-5e2b75af78e16c9e31b39cc83b18d40b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://textures/bed_foot.png"
dest_files=["res://.godot/imported/bed_foot.png-5e2b75af78e16c9e31b39cc83b18d40b.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