Compare commits

...

3 commits

Author SHA1 Message Date
f13be176a9 add basic win indicator 2025-02-16 13:30:23 -07:00
1e9eddc4ef adjust valentine spotlight 2025-02-16 12:18:07 -07:00
76bf56d8d5 separate and rebake voxelgi 2025-02-16 12:17:12 -07:00
15 changed files with 233 additions and 28 deletions

BIN
assets/boombap.ogg Normal file

Binary file not shown.

19
assets/boombap.ogg.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://iquu0ttk5ib1"
path="res://.godot/imported/boombap.ogg-87f100dad48530603cd8a71c6b152bfc.oggvorbisstr"
[deps]
source_file="res://assets/boombap.ogg"
dest_files=["res://.godot/imported/boombap.ogg-87f100dad48530603cd8a71c6b152bfc.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=140.0
beat_count=0
bar_beats=4

BIN
assets/crash.ogg Normal file

Binary file not shown.

19
assets/crash.ogg.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://chh3mqdtd3nw4"
path="res://.godot/imported/crash.ogg-b1191c6b92c1b51c76cfcb881e83d310.oggvorbisstr"
[deps]
source_file="res://assets/crash.ogg"
dest_files=["res://.godot/imported/crash.ogg-b1191c6b92c1b51c76cfcb881e83d310.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,5 +1,5 @@
[gd_scene load_steps=2 format=3 uid="uid://bgh4fmqrhb0cs"]
[ext_resource type="PackedScene" uid="uid://ewhlayr70v2l" path="res://assets/Star bulb.glb" id="1_onaud"]
[ext_resource type="PackedScene" uid="uid://ewhlayr70v2l" path="res://assets/Models/Star bulb.glb" id="1_onaud"]
[node name="Star bulb" instance=ExtResource("1_onaud")]

View file

@ -1,3 +1,3 @@
[xr]
openxr/enabled=false
openxr/enabled=true

View file

@ -80,7 +80,16 @@ func check_puzzle_completion(delta: float) -> void:
_completion_timer += delta
if _completion_timer >= completion_time:
_puzzle_complete = true
print("puzzle completed")
puzzle_completed.emit()
force_drop_and_disable_manipulators()
else:
_completion_timer = 0.0
# Force drop and disable all manipulators when puzzle is complete
func force_drop_and_disable_manipulators():
var manipulators = get_tree().get_nodes_in_group("manipulators")
for manipulator in manipulators:
manipulator.drop()
manipulator.enabled = false

View file

@ -6,7 +6,7 @@ class_name Manipulator
extends XRToolsPickable
var held_controller: XRController3D = null
var attractor: GPUParticlesAttractorSphere3D
const MIN_SCALE = 0.5

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=3 uid="uid://dqbxp72mjmbc"]
[gd_scene load_steps=25 format=3 uid="uid://dqbxp72mjmbc"]
[ext_resource type="PackedScene" uid="uid://1rwj4eq63xgb" path="res://scenes/tutorial_scenes/tutorial_scene_base.tscn" id="1_lkcbi"]
[ext_resource type="VoxelGIData" uid="uid://nuw3xyd4kkpq" path="res://scenes/tutorial_scenes/tutorial_scene_1.VoxelGI_data.res" id="2_4e4av"]
@ -8,6 +8,7 @@
[ext_resource type="AudioStream" uid="uid://cqb1bo72232vs" path="res://assets/Sounds/03 highpiano.ogg" id="6_bxnqe"]
[ext_resource type="PackedScene" uid="uid://bgh4fmqrhb0cs" path="res://assets/star_bulb.tscn" id="7_aq638"]
[ext_resource type="Script" path="res://assets/star_bulb_target.gd" id="8_ipvvg"]
[ext_resource type="PackedScene" uid="uid://bu0fu4uiwyu65" path="res://scenes/win_particles.tscn" id="9_31knv"]
[sub_resource type="Gradient" id="Gradient_0ygfi"]
colors = PackedColorArray(0.720471, 0.182584, 0.797749, 1, 1, 1, 3, 1)
@ -179,4 +180,8 @@ autoplay = true
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 0, -0.542325, 0)
script = ExtResource("8_ipvvg")
[node name="WinParticles" parent="." index="20" instance=ExtResource("9_31knv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, -3)
[connection signal="puzzle_completed" from="." to="WinParticles" method="_on_puzzle_completed"]
[connection signal="occupancy_changed" from="Target1" to="Target1/Star bulb" method="_on_target_1_occupancy_changed"]

View file

@ -102,6 +102,10 @@ shape = SubResource("BoxShape3D_jwkgy")
[node name="Floor" type="MeshInstance3D" parent="."]
mesh = SubResource("PlaneMesh_gsjte")
[node name="GPUParticlesCollisionBox3D" type="GPUParticlesCollisionBox3D" parent="Floor"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3)
size = Vector3(10, 0.1, 10)
[node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.571688, 0.820471, 0, -0.820471, 0.571688, 0, 4.06392, -0.511663)
shadow_enabled = true

View file

@ -4,7 +4,7 @@
[ext_resource type="PackedScene" uid="uid://7uc6tf2tvn1k" path="res://scenes/xr_origin_3d.tscn" id="2_i3vfe"]
[ext_resource type="PackedScene" uid="uid://clc5dre31iskm" path="res://addons/godot-xr-tools/xr/start_xr.tscn" id="3_d0uvh"]
[ext_resource type="PackedScene" uid="uid://57q7hhomocdh" path="res://addons/godot-xr-tools/objects/world_grab_area.tscn" id="4_54g2v"]
[ext_resource type="VoxelGIData" uid="uid://bxphdae7hohsh" path="res://scenes/title_scene/title_scene.VoxelGI_data.res" id="8_qelii"]
[ext_resource type="VoxelGIData" uid="uid://buf7pi8wefjwt" path="res://scenes/valentine_scene/valentine_scene.VoxelGI_data.res" id="5_lo6fo"]
[ext_resource type="Script" path="res://scenes/performance_settings/voxel_gi_toggle.gd" id="9_busdy"]
[ext_resource type="Environment" uid="uid://c1yf8e4qr42hr" path="res://scenes/environment.tres" id="10_wr4yd"]
[ext_resource type="PackedScene" uid="uid://c20kawop2lrv" path="res://assets/Models/Arcane Source 2.glb" id="11_1bcu4"]
@ -298,7 +298,7 @@ shape = SubResource("BoxShape3D_gj4t1")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.4, -3.27626)
subdiv = 0
size = Vector3(10, 5, 10)
data = ExtResource("8_qelii")
data = ExtResource("5_lo6fo")
script = ExtResource("9_busdy")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
@ -320,9 +320,11 @@ transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0,
mesh = SubResource("PlaneMesh_gsjte")
[node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.571688, 0.820471, 0, -0.820471, 0.571688, 0, 4.06392, -0.511663)
transform = Transform3D(1, 0, 0, 0, 0.629158, 0.777278, 0, -0.777278, 0.629158, 0, 4.06392, -0.511663)
shadow_enabled = true
spot_range = 40.0
spot_attenuation = 0.32
spot_angle = 78.21
[node name="Arcane Source 2" parent="." instance=ExtResource("11_1bcu4")]
transform = Transform3D(-3.27835e-08, 0, -0.75, 0, 0.75, 0, 0.75, 0, -3.27835e-08, 3.33249, 0, -2.02237)
@ -454,32 +456,32 @@ transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.7
[node name="Pipes" parent="." instance=ExtResource("20_dn0uk")]
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, -6.23829, 2.38419e-07, -3.4459)
[node name="Light Segment" parent="Pipes" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.612772, 0.731119, 0.457281)
[node name="Pipe Connector" parent="Pipes" index="1"]
transform = Transform3D(-1.31134e-07, 3, -1.31134e-07, 0, -1.31134e-07, -3, -3, -1.31134e-07, 5.73206e-15, 0.45822, 0.913214, -0.259165)
[node name="Pipe Segment" parent="Pipes" index="2"]
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 1.50575, 1.4942, -0.581697)
[node name="Pipe Segment 90" parent="Pipes" index="3"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.615002, 1.3479, 0.454257)
[node name="T Pipe Segment" parent="Pipes" index="4"]
transform = Transform3D(1, 0, 4.37114e-08, -4.37114e-08, 1.91069e-15, 1, 0, -1, 1.91069e-15, 0.615232, 1.4923, -0.580647)
[node name="Broken Pipe" parent="Pipes" index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.616053, 0.47833, 0.459138)
[node name="Pipe Segment Split" parent="Pipes" index="6"]
transform = Transform3D(0.999957, 0.00925011, 0, -0.00925011, 0.999957, 0, 0, 0, 1, 0.612797, -0.265908, 0.463929)
[node name="Pipe Segment 91" type="MeshInstance3D" parent="Pipes"]
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 2.61936, 1.4933, -0.579223)
mesh = SubResource("ArrayMesh_bwvdg")
skeleton = NodePath("")
[node name="Light Segment" parent="Pipes" index="1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.612772, 0.731119, 0.457281)
[node name="Pipe Connector" parent="Pipes" index="2"]
transform = Transform3D(-1.31134e-07, 3, -1.31134e-07, 0, -1.31134e-07, -3, -3, -1.31134e-07, 5.73206e-15, 0.45822, 0.913214, -0.259165)
[node name="Pipe Segment" parent="Pipes" index="3"]
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 1.50575, 1.4942, -0.581697)
[node name="Pipe Segment 90" parent="Pipes" index="4"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.615002, 1.3479, 0.454257)
[node name="T Pipe Segment" parent="Pipes" index="5"]
transform = Transform3D(1, 0, 4.37114e-08, -4.37114e-08, 1.91069e-15, 1, 0, -1, 1.91069e-15, 0.615232, 1.4923, -0.580647)
[node name="Broken Pipe" parent="Pipes" index="6"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.616053, 0.47833, 0.459138)
[node name="Pipe Segment Split" parent="Pipes" index="7"]
transform = Transform3D(0.999957, 0.00925011, 0, -0.00925011, 0.999957, 0, 0, 0, 1, 0.612797, -0.265908, 0.463929)
[node name="Light Segment2" type="MeshInstance3D" parent="Pipes"]
transform = Transform3D(0.999991, 0, 0.00422368, 0, 1, 0, -0.00422368, 0, 0.999991, 0.61305, 0.253352, 0.462031)
mesh = SubResource("ArrayMesh_ywi2y")

10
scenes/win_particles.gd Normal file
View file

@ -0,0 +1,10 @@
extends GPUParticles3D
func _ready() -> void:
$boombap.volume_db = linear_to_db(0.0)
func _on_puzzle_completed() -> void:
emitting = true
$Crash.play()
var tween = create_tween()
tween.tween_property($boombap, "volume_db", linear_to_db(1.0), 2.0)

137
scenes/win_particles.tscn Normal file
View file

@ -0,0 +1,137 @@
[gd_scene load_steps=8 format=3 uid="uid://bu0fu4uiwyu65"]
[ext_resource type="Script" path="res://scenes/win_particles.gd" id="1_ittcg"]
[ext_resource type="AudioStream" uid="uid://chh3mqdtd3nw4" path="res://assets/crash.ogg" id="2_sr0qd"]
[ext_resource type="AudioStream" uid="uid://iquu0ttk5ib1" path="res://assets/boombap.ogg" id="3_xnety"]
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_bm8qp"]
particle_flag_align_y = true
emission_shape_scale = Vector3(3, 1, 3)
emission_shape = 3
emission_box_extents = Vector3(1, 1, 1)
angle_min = -122.4
angle_max = 151.5
spread = 180.0
initial_velocity_min = 0.1
initial_velocity_max = 0.5
angular_velocity_min = -105.82
angular_velocity_max = 157.69
gravity = Vector3(0, -5, 0)
damping_min = 2.0
damping_max = 3.0
scale_min = 0.5
scale_max = 2.0
color = Color(0.997807, 0.645565, 0.348555, 1)
hue_variation_min = -0.33
hue_variation_max = 0.33
turbulence_enabled = true
turbulence_noise_scale = 5.45
collision_mode = 1
collision_friction = 1.0
collision_bounce = 0.0
[sub_resource type="Shader" id="Shader_xdn50"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.3.stable's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, vertex_lighting;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
uniform float point_size : hint_range(0.1, 128.0, 0.1);
uniform float roughness : hint_range(0.0, 1.0);
uniform sampler2D texture_metallic : hint_default_white, filter_linear_mipmap, repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r, filter_linear_mipmap, repeat_enable;
uniform float specular : hint_range(0.0, 1.0, 0.01);
uniform float metallic : hint_range(0.0, 1.0, 0.01);
uniform sampler2D texture_emission : source_color, hint_default_black, filter_linear_mipmap, repeat_enable;
uniform vec4 emission : source_color;
uniform float emission_energy : hint_range(0.0, 100.0, 0.01);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
// Vertex Color is sRGB: Enabled
if (!OUTPUT_IS_SRGB) {
COLOR.rgb = mix(
pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)),
COLOR.rgb * (1.0 / 12.92),
lessThan(COLOR.rgb, vec3(0.04045)));
}
// Shading Mode: Per Vertex
ROUGHNESS = roughness;
UV = UV * uv1_scale.xy + uv1_offset.xy;
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo, base_uv);
// Vertex Color Use as Albedo: Enabled
albedo_tex *= COLOR;
ALBEDO = albedo.rgb * albedo_tex.rgb;
float metallic_tex = dot(texture(texture_metallic, base_uv), metallic_texture_channel);
METALLIC = metallic_tex * metallic;
SPECULAR = specular;
vec4 roughness_texture_channel = vec4(1.0, 0.0, 0.0, 0.0);
float roughness_tex = dot(texture(texture_roughness, base_uv), roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
// Emission Operator: Add
EMISSION = ALBEDO * emission_energy;
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bvlxl"]
render_priority = 0
shader = SubResource("Shader_xdn50")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = null
shader_parameter/specular = 1.0
shader_parameter/metallic = 1.0
shader_parameter/emission = Color(0.996454, 0.721284, 0.467443, 1)
shader_parameter/emission_energy = 0.5
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
[sub_resource type="QuadMesh" id="QuadMesh_tfxeh"]
material = SubResource("ShaderMaterial_bvlxl")
size = Vector2(0.01, 0.01)
orientation = 1
[node name="WinParticles" type="GPUParticles3D"]
emitting = false
amount = 3000
lifetime = 20.0
one_shot = true
explosiveness = 0.75
randomness = 0.58
visibility_aabb = AABB(-8, -8, -8, 16, 16, 16)
process_material = SubResource("ParticleProcessMaterial_bm8qp")
draw_pass_1 = SubResource("QuadMesh_tfxeh")
script = ExtResource("1_ittcg")
[node name="Crash" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("2_sr0qd")
volume_db = -10.444
[node name="boombap" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource("3_xnety")
autoplay = true