This commit is contained in:
Spencer Killen 2023-01-01 04:28:30 -07:00
parent 7d11e5dd46
commit 39492c6c89
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
25 changed files with 2346 additions and 42 deletions

BIN
blends/ClockFace.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/environment.blend (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
source_md5="1a2157e17e42b67ca431928a838f25a0"
dest_md5="0acb7d4ab9df4ee97de4f86cf92dd6bb"

View File

@ -0,0 +1,3 @@
source_md5="ba9e2a6bbe74c141e57bd390bc76be4a"
dest_md5="36d0ef68b96423efc09191a3cce23970"

View File

@ -0,0 +1,3 @@
source_md5="6a35a976dd0d5125361dc88f07ca5e51"
dest_md5="c754a1af232a755c32293ae1e6075eae"

View File

@ -75,6 +75,14 @@ func sound_color():
if $Color.playing: if $Color.playing:
return return
$Color.play() $Color.play()
func sound_click():
$Move.play()
func sound_bump():
if $Bump.playing:
return
$Bump.play()
func _input(_event): func _input(_event):
if Input.is_action_just_pressed("cursor_interact"): if Input.is_action_just_pressed("cursor_interact"):
@ -89,10 +97,6 @@ func _input(_event):
func _process(_delta): func _process(_delta):
set_color() set_color()
func bump():
if $Bump.playing:
return
$Bump.play()
var locked = false var locked = false
func _physics_process(delta): func _physics_process(delta):
@ -104,7 +108,9 @@ func _physics_process(delta):
var velocity = Vector3(speed, speed, speed) * dir var velocity = Vector3(speed, speed, speed) * dir
var result = move_and_slide(velocity, Vector3.UP) var result = move_and_slide(velocity, Vector3.UP)
if velocity != result: if velocity != result:
bump() sound_bump()
elif speed != 0.0:
sound_click()

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=9 format=2] [gd_scene load_steps=10 format=2]
[ext_resource path="res://3DCursor.gd" type="Script" id=1] [ext_resource path="res://3DCursor.gd" type="Script" id=1]
[ext_resource path="res://3DCursorLight.tscn" type="PackedScene" id=2] [ext_resource path="res://3DCursorLight.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/audio/bassy_bump.ogg" type="AudioStream" id=3] [ext_resource path="res://assets/audio/bassy_bump.ogg" type="AudioStream" id=3]
[ext_resource path="res://assets/audio/beep.ogg" type="AudioStream" id=4] [ext_resource path="res://assets/audio/beep.ogg" type="AudioStream" id=4]
[ext_resource path="res://assets/audio/color.ogg" type="AudioStream" id=5] [ext_resource path="res://assets/audio/color.ogg" type="AudioStream" id=5]
[ext_resource path="res://assets/audio/click.ogg" type="AudioStream" id=6]
[sub_resource type="SpatialMaterial" id=5] [sub_resource type="SpatialMaterial" id=5]
params_diffuse_mode = 4 params_diffuse_mode = 4
@ -54,3 +55,7 @@ stream = ExtResource( 4 )
[node name="Color" type="AudioStreamPlayer" parent="."] [node name="Color" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 ) stream = ExtResource( 5 )
volume_db = 10.0 volume_db = 10.0
[node name="Move" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
volume_db = 10.0

4
godot/StartLineReader.gd Normal file
View File

@ -0,0 +1,4 @@
extends Node
func _ready():
LineReader.start()

BIN
godot/assets/audio/click.ogg (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/click.ogg-cb6f8e57848df8181589839958189a7f.oggstr"
[deps]
source_file="res://assets/audio/click.ogg"
dest_files=[ "res://.import/click.ogg-cb6f8e57848df8181589839958189a7f.oggstr" ]
[params]
loop=false
loop_offset=0

View File

@ -16,24 +16,42 @@ var voice_script = [
["behind_the_bookshelf"], ["behind_the_bookshelf"],
] ]
export var impatience: float = 5.0 export var impatience: float = 10.0
func _ready():
yield(get_tree().create_timer(5.0), "timeout")
script_loop()
func read_line(line): func read_line(line):
pass $Sounds/show_me.play()
yield($Sounds/show_me, "finished")
for phrase in line:
var sound = get_node("Sounds/" + phrase)
sound.play()
yield(sound, "finished")
var loop = null signal advance(did_time_out)
func start():
if loop != null:
return
loop = script_loop()
func script_loop(): func script_loop():
for line in voice_script: for line in voice_script:
read_line(line) completed = false
while not yield(): $ImpatienceTimer.stop()
read_line(line) yield(read_line(line), "completed")
$ImpatienceTimer.start(impatience)
while not completed and yield(self, "advance"):
yield(read_line(line), "completed")
$ImpatienceTimer.start(impatience)
var _err = get_tree().change_scene("res://screens/finished.tscn")
var completed = false
func advance():
completed = true
emit_signal("advance", false)
func _input(_event):
if Input.is_action_just_pressed("cheat"):
advance()
func _on_ImpatienceTimer_timeout(): func _on_ImpatienceTimer_timeout():
script_loop().resume(false) emit_signal("advance", true)

View File

@ -17,42 +17,45 @@
[node name="LineReader" type="Node"] [node name="LineReader" type="Node"]
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="book" type="AudioStreamPlayer" parent="."] [node name="ImpatienceTimer" type="Timer" parent="."]
one_shot = true
[node name="Sounds" type="Node" parent="."]
[node name="book" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 3 ) stream = ExtResource( 3 )
[node name="frog" type="AudioStreamPlayer" parent="."] [node name="frog" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 4 ) stream = ExtResource( 4 )
[node name="show_me" type="AudioStreamPlayer" parent="."] [node name="show_me" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 5 ) stream = ExtResource( 5 )
[node name="squirrel" type="AudioStreamPlayer" parent="."] [node name="squirrel" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 6 ) stream = ExtResource( 6 )
[node name="the_attic" type="AudioStreamPlayer" parent="."] [node name="the_attic" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 7 ) stream = ExtResource( 7 )
[node name="the_clock" type="AudioStreamPlayer" parent="."] [node name="the_clock" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 8 ) stream = ExtResource( 8 )
[node name="the_door" type="AudioStreamPlayer" parent="."] [node name="the_door" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 9 ) stream = ExtResource( 9 )
[node name="the_fridge" type="AudioStreamPlayer" parent="."] [node name="the_fridge" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 10 ) stream = ExtResource( 10 )
[node name="the_long" type="AudioStreamPlayer" parent="."] [node name="the_long" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 11 ) stream = ExtResource( 11 )
[node name="the_tall" type="AudioStreamPlayer" parent="."] [node name="the_tall" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 12 ) stream = ExtResource( 12 )
[node name="under_the_bed" type="AudioStreamPlayer" parent="."] [node name="under_the_bed" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 13 ) stream = ExtResource( 13 )
[node name="behind_the_bookshelf" type="AudioStreamPlayer" parent="."] [node name="behind_the_bookshelf" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 2 ) stream = ExtResource( 2 )
[node name="ImpatienceTimer" type="Timer" parent="."]
[connection signal="timeout" from="ImpatienceTimer" to="." method="_on_ImpatienceTimer_timeout"] [connection signal="timeout" from="ImpatienceTimer" to="." method="_on_ImpatienceTimer_timeout"]

BIN
godot/assets/room/ClockFace.material (Stored with Git LFS) Normal file

Binary file not shown.

BIN
godot/assets/room/Door.material (Stored with Git LFS)

Binary file not shown.

BIN
godot/assets/room/bookcase_collisions.glb (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
godot/assets/room/clock.glb (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,6 @@ config/icon="res://icon.png"
[autoload] [autoload]
GlobalCursorState="*res://GlobalCursorState.tscn" GlobalCursorState="*res://GlobalCursorState.tscn"
LineReader="*res://assets/audio/voice_lines/LineReader.gd"
[display] [display]
@ -69,6 +68,11 @@ keyboard_down={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777234,"unicode":0,"echo":false,"script":null) "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":16777234,"unicode":0,"echo":false,"script":null)
] ]
} }
cheat={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":0,"physical_scancode":96,"unicode":0,"echo":false,"script":null)
]
}
[mono] [mono]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=34 format=2] [gd_scene load_steps=38 format=2]
[ext_resource path="res://assets/effects/dithering/CanvasLayer.tscn" type="PackedScene" id=1] [ext_resource path="res://assets/effects/dithering/CanvasLayer.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/room/environment.tscn" type="PackedScene" id=2] [ext_resource path="res://assets/room/environment.tscn" type="PackedScene" id=2]
@ -8,10 +8,33 @@
[ext_resource path="res://CursorInteractArea.tscn" type="PackedScene" id=6] [ext_resource path="res://CursorInteractArea.tscn" type="PackedScene" id=6]
[ext_resource path="res://assets/audio/AmbientSound.tscn" type="PackedScene" id=7] [ext_resource path="res://assets/audio/AmbientSound.tscn" type="PackedScene" id=7]
[ext_resource path="res://AtticAmberLight.gd" type="Script" id=8] [ext_resource path="res://AtticAmberLight.gd" type="Script" id=8]
[ext_resource path="res://assets/audio/voice_lines/LineReader.tscn" type="PackedScene" id=9]
[sub_resource type="Environment" id=1] [sub_resource type="Environment" id=1]
background_mode = 1 background_mode = 1
[sub_resource type="Animation" id=29]
resource_name = "color"
length = 0.387
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
[sub_resource type="SpatialMaterial" id=30]
albedo_color = Color( 0, 0, 0, 1 )
[sub_resource type="CubeMesh" id=31]
[sub_resource type="AnimationNodeAnimation" id=9] [sub_resource type="AnimationNodeAnimation" id=9]
animation = "camera_attic_inner" animation = "camera_attic_inner"
@ -88,7 +111,7 @@ states/camera_pos_corner/node = SubResource( 8 )
states/camera_pos_corner/position = Vector2( 230, 169 ) states/camera_pos_corner/position = Vector2( 230, 169 )
transitions = [ "camera_pos_corner", "camera_bookcase", SubResource( 11 ), "camera_outer_attic", "camera_pos_corner", SubResource( 12 ), "camera_outer_attic", "camera_bookcase", SubResource( 13 ), "camera_outer_attic", "camera_attic_inner", SubResource( 14 ), "camera_pos_corner", "camera_outer_attic", SubResource( 15 ), "camera_pos_corner", "camera_attic_inner", SubResource( 16 ), "camera_bookcase", "camera_pos_corner", SubResource( 17 ), "camera_bookcase", "camera_attic_inner", SubResource( 18 ), "camera_bookcase", "camera_outer_attic", SubResource( 19 ), "camera_attic_inner", "camera_bookcase", SubResource( 20 ), "camera_attic_inner", "camera_outer_attic", SubResource( 21 ), "camera_attic_inner", "camera_pos_corner", SubResource( 22 ), "camera_pos_corner", "camera_bookshelf_secret", SubResource( 24 ), "camera_bookshelf_secret", "camera_pos_corner", SubResource( 25 ), "camera_bookshelf_secret", "camera_bookcase", SubResource( 26 ), "camera_bookcase", "camera_bookshelf_secret", SubResource( 27 ) ] transitions = [ "camera_pos_corner", "camera_bookcase", SubResource( 11 ), "camera_outer_attic", "camera_pos_corner", SubResource( 12 ), "camera_outer_attic", "camera_bookcase", SubResource( 13 ), "camera_outer_attic", "camera_attic_inner", SubResource( 14 ), "camera_pos_corner", "camera_outer_attic", SubResource( 15 ), "camera_pos_corner", "camera_attic_inner", SubResource( 16 ), "camera_bookcase", "camera_pos_corner", SubResource( 17 ), "camera_bookcase", "camera_attic_inner", SubResource( 18 ), "camera_bookcase", "camera_outer_attic", SubResource( 19 ), "camera_attic_inner", "camera_bookcase", SubResource( 20 ), "camera_attic_inner", "camera_outer_attic", SubResource( 21 ), "camera_attic_inner", "camera_pos_corner", SubResource( 22 ), "camera_pos_corner", "camera_bookshelf_secret", SubResource( 24 ), "camera_bookshelf_secret", "camera_pos_corner", SubResource( 25 ), "camera_bookshelf_secret", "camera_bookcase", SubResource( 26 ), "camera_bookcase", "camera_bookshelf_secret", SubResource( 27 ) ]
start_node = "camera_pos_corner" start_node = "camera_pos_corner"
graph_offset = Vector2( -64, 18 ) graph_offset = Vector2( -121, -28 )
[sub_resource type="AnimationNodeStateMachinePlayback" id=3] [sub_resource type="AnimationNodeStateMachinePlayback" id=3]
@ -116,6 +139,13 @@ layer = 99
[node name="environment" parent="." instance=ExtResource( 2 )] [node name="environment" parent="." instance=ExtResource( 2 )]
[node name="ClockLight" type="SpotLight" parent="."]
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -2.44573, 8.37317, -1.81664 )
light_color = Color( 0.603922, 0.701961, 0.94902, 1 )
light_energy = 1.5
spot_range = 3.66733
spot_angle = 38.3586
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 1 ) environment = SubResource( 1 )
@ -128,6 +158,30 @@ shadow_enabled = true
omni_range = 8.917 omni_range = 8.917
omni_attenuation = 2.73208 omni_attenuation = 2.73208
[node name="SecretLight" type="OmniLight" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00275469, 5.33571, 12.162 )
visible = false
light_energy = 7.092
light_indirect_energy = 1.306
light_cull_mask = 4294443007
shadow_enabled = true
omni_range = 13.347
omni_attenuation = 1.27456
[node name="AnimationPlayer" type="AnimationPlayer" parent="SecretLight"]
autoplay = "color"
anims/color = SubResource( 29 )
[node name="MeshInstance" type="MeshInstance" parent="SecretLight/AnimationPlayer"]
transform = Transform( 3.54479, 0, 0, 0, 8.93949, 0, 0, 0, 0.75139, 0, 0, 6.36648 )
material_override = SubResource( 30 )
mesh = SubResource( 31 )
[node name="MeshInstance2" type="MeshInstance" parent="SecretLight/AnimationPlayer"]
transform = Transform( 15.4712, 0, 0, 0, 8.93949, 0, 0, 0, 0.75139, 0, 18.0633, 6.36648 )
material_override = SubResource( 30 )
mesh = SubResource( 31 )
[node name="SpotLight" type="SpotLight" parent="."] [node name="SpotLight" type="SpotLight" parent="."]
transform = Transform( -0.999987, 5.82069e-11, 0.00514878, 0.00507827, 0.164927, 0.986293, -0.000849173, 0.986306, -0.164925, 0, 4.25661, -0.823411 ) transform = Transform( -0.999987, 5.82069e-11, 0.00514878, 0.00507827, 0.164927, 0.986293, -0.000849173, 0.986306, -0.164925, 0, 4.25661, -0.823411 )
light_color = Color( 0.623529, 0.247059, 0.756863, 1 ) light_color = Color( 0.623529, 0.247059, 0.756863, 1 )
@ -145,6 +199,9 @@ KB_ACTIONS_PER_SECOND = 6.0
[node name="camera_positions" parent="." instance=ExtResource( 4 )] [node name="camera_positions" parent="." instance=ExtResource( 4 )]
[node name="Camera" parent="camera_positions" index="0"]
transform = Transform( -0.767553, -0.313861, 0.558887, 7.45058e-08, 0.871917, 0.489653, -0.640986, 0.375835, -0.669243, -12.6719, 16.3714, -6.79586 )
[node name="AnimationTree" type="AnimationTree" parent="."] [node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 2 ) tree_root = SubResource( 2 )
anim_player = NodePath("../camera_positions/AnimationPlayer") anim_player = NodePath("../camera_positions/AnimationPlayer")
@ -185,6 +242,11 @@ transform = Transform( 10.8129, 0, 0, 0, 4.7198, 0, 0, 0, 7.91118, -26.7224, 13.
on_leave_func = "_on_Cursor_set_camera" on_leave_func = "_on_Cursor_set_camera"
call_string = "camera_outer_attic" call_string = "camera_outer_attic"
[node name="SecretEnter" parent="CameraMoveZones" instance=ExtResource( 6 )]
transform = Transform( 8.71637, 0, 0, 0, 13.8749, 0, 0, 0, 5.83956, 0, 0, 15.4817 )
on_enter_func = "_on_Cursor_set_camera"
call_string = "camera_bookshelf_secret"
[node name="AmbientSound" parent="." instance=ExtResource( 7 )] [node name="AmbientSound" parent="." instance=ExtResource( 7 )]
[node name="Attic" type="Spatial" parent="."] [node name="Attic" type="Spatial" parent="."]
@ -203,6 +265,8 @@ script = ExtResource( 8 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="Attic/AtticAmberLight"] [node name="AnimationPlayer" type="AnimationPlayer" parent="Attic/AtticAmberLight"]
anims/light_flicker = SubResource( 28 ) anims/light_flicker = SubResource( 28 )
[node name="LineReader" parent="." instance=ExtResource( 9 )]
[connection signal="motion_status" from="AnimationTree" to="3DCursor" method="_on_AnimationTree_motion_status"] [connection signal="motion_status" from="AnimationTree" to="3DCursor" method="_on_AnimationTree_motion_status"]
[connection signal="motion_status" from="AnimationTree" to="AmbientSound" method="_on_AnimationTree_motion_status"] [connection signal="motion_status" from="AnimationTree" to="AmbientSound" method="_on_AnimationTree_motion_status"]
[connection signal="motion_status" from="AnimationTree" to="Attic/AtticAmberLight" method="_on_AnimationTree_motion_status"] [connection signal="motion_status" from="AnimationTree" to="Attic/AtticAmberLight" method="_on_AnimationTree_motion_status"]