Compare commits

...

79 Commits

Author SHA1 Message Date
Spencer Killen f1c66dcb92
a 2023-11-12 16:59:56 -07:00
alex-kumpula fb7054c66f Changed the scene the play button points to 2023-11-12 16:50:48 -07:00
Spencer Killen 8e7b3882db
a 2023-11-12 16:50:16 -07:00
Spencer Killen 095801439d
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 16:48:17 -07:00
Spencer Killen 0ef8c353c2
a 2023-11-12 16:47:53 -07:00
alex-kumpula adfdc67544 Added collision sound effect 2023-11-12 16:42:00 -07:00
alex-kumpula 63f3bdec03 Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 16:31:47 -07:00
alex-kumpula ee33ad74b1 Changed main scene 2023-11-12 16:31:44 -07:00
Spencer Killen 5689b713ca
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 16:25:54 -07:00
Spencer Killen 44f0abbedf
a 2023-11-12 16:25:53 -07:00
alex-kumpula dfed18b62c added domino chain 2023-11-12 16:18:51 -07:00
Spencer Killen d7655bb1e5
a 2023-11-12 16:11:17 -07:00
Spencer Killen 892a3609b6
a 2023-11-12 16:02:29 -07:00
Spencer Killen 3978e1160c
Remove backfaces 2023-11-12 15:59:32 -07:00
alex-kumpula e47157b3a0 Started main scene 2023-11-12 15:49:39 -07:00
Spencer Killen e811a84538
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 15:48:55 -07:00
Spencer Killen e2c9d9cd1a
a 2023-11-12 15:48:54 -07:00
alex-kumpula e7e85088e2 Added present 2023-11-12 15:33:03 -07:00
alex-kumpula db83354c6a Added button sound 2023-11-12 15:07:40 -07:00
Spencer Killen 13e856791b
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 14:56:30 -07:00
Spencer Killen da70c0ebb4
balloon 2023-11-12 14:56:29 -07:00
alex-kumpula 473858c5eb Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 14:41:08 -07:00
Spencer Killen 8490650ffe
a 2023-11-12 14:40:51 -07:00
alex-kumpula 0856765e9c changed scene 2023-11-12 14:40:49 -07:00
Spencer Killen 0c1439c4f3
a 2023-11-12 14:38:27 -07:00
Spencer Killen 03ec6a2651
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 14:29:58 -07:00
Spencer Killen cb2e0b6c5e
menu 2023-11-12 14:29:55 -07:00
alex-kumpula 4e2465aeff domino 2023-11-12 14:27:00 -07:00
alex-kumpula b2ad226825 Added new music 2023-11-12 14:13:29 -07:00
Spencer Killen 6f18e82a5d
Add domino 2023-11-12 14:11:15 -07:00
alex-kumpula 04def51693 Added Domino 2023-11-12 14:04:14 -07:00
Spencer Killen 412b2f4e51
a 2023-11-12 13:56:17 -07:00
Spencer Killen 6d491f60c7
a 2023-11-12 13:53:03 -07:00
Spencer Killen 3fbdf2ded0
a 2023-11-12 13:52:55 -07:00
alex-kumpula 5e81e61e64 Updated Balloon Material 2023-11-12 13:43:57 -07:00
alex-kumpula 51f67fafab Added Balloon 2023-11-12 13:30:55 -07:00
alex-kumpula 6693fed2bf Added music from Jawdat 2023-11-12 12:35:41 -07:00
Spencer Killen 5e213f3dba
time warp effect 2023-11-12 11:45:10 -07:00
Spencer Killen b4d6b40cb0
a 2023-11-12 03:17:46 -07:00
Spencer Killen cbf47648a4
a 2023-11-12 03:16:34 -07:00
Spencer Killen e827cbad8f
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 03:06:35 -07:00
Spencer Killen 1bd93c1161
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 03:02:13 -07:00
alex-kumpula d9002b2171 Added igloo to schene 2023-11-12 03:01:33 -07:00
Spencer Killen 978703caa3
child child 2023-11-12 02:59:43 -07:00
alex-kumpula dfb805e218 Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 02:53:20 -07:00
alex-kumpula 67a6dc7ff4 Added Igloo 2023-11-12 02:53:06 -07:00
Spencer Killen 7ffaa30f6d
a 2023-11-12 02:01:54 -07:00
Spencer Killen c7c3cd4d97
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-12 01:43:08 -07:00
Spencer Killen a65dc1276b
cake 2023-11-12 01:42:51 -07:00
alex-kumpula 5862623196 Added child 2023-11-12 01:23:21 -07:00
Spencer Killen 6693cd26b4
hit history 2023-11-11 22:38:31 -07:00
Spencer Killen ff8c3ef752
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-11 22:20:14 -07:00
Spencer Killen a7c1092f50
a 2023-11-11 22:20:13 -07:00
alex-kumpula 5438bc9ffd Added signal guards 2023-11-11 21:36:00 -07:00
Spencer Killen cf12a96a75
a 2023-11-11 21:32:30 -07:00
Spencer Killen d221962270
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm into sjkillen 2023-11-11 21:25:26 -07:00
Spencer Killen 972c374f4e
a 2023-11-11 21:25:18 -07:00
alex-kumpula 33333714e2 Can hold down Advance and Regress now 2023-11-11 21:23:21 -07:00
alex-kumpula eb668bfd63 Have TASable auto fetch parent if it is null 2023-11-11 21:05:57 -07:00
Spencer Killen 8906d69760
disable camera tweening 2023-11-11 20:56:47 -07:00
Spencer Killen 05cd717984
a 2023-11-11 20:49:19 -07:00
Spencer Killen 3fa504f25a
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm into sjkillen 2023-11-11 20:46:29 -07:00
alex-kumpula 86b29ec476 Save rotations and shorter frame length 2023-11-11 20:46:11 -07:00
Spencer Killen 726de6e49b
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm into sjkillen 2023-11-11 20:46:05 -07:00
Spencer Killen 36a1cdc806
. 2023-11-11 20:45:57 -07:00
alex-kumpula 35f9476c3d Added Timescale System 2023-11-11 19:58:56 -07:00
Spencer Killen 015660c7bd
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm 2023-11-11 18:58:31 -07:00
Spencer Killen dc2c3d94b7
Add signal 2023-11-11 18:58:30 -07:00
alex-kumpula d3324ad81f TASable now saves linear and angular velocities 2023-11-11 18:50:16 -07:00
Spencer Killen 0bac49d257
aaaaaaaaaa 2023-11-11 18:48:23 -07:00
alex-kumpula 7417ff9a11 forgot this 2023-11-11 17:47:53 -07:00
alex-kumpula 9fb9b92aec Fixed weird issue with grape tscn and TASable 2023-11-11 17:47:26 -07:00
Spencer Killen 8c1b431f84
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm into sjkillen 2023-11-11 17:25:24 -07:00
Spencer Killen 3d4c75ddab
progress2 2023-11-11 17:24:52 -07:00
alex-kumpula 5f6e7a3e8e Added regression and advancement to TASable 2023-11-11 17:23:00 -07:00
alex-kumpula b3259e9585 Merge branch 'TAS_UI' 2023-11-11 16:14:24 -07:00
Spencer Killen db7474043b
progress 2023-11-11 16:12:46 -07:00
Spencer Killen 13d6939103
Merge branch 'master' of https://git.sjkillen.ca/sjkillen/hurrmmm into sjkillen 2023-11-11 14:57:07 -07:00
Spencer Killen 8891190a31
Add radial charger 2023-11-11 14:56:43 -07:00
137 changed files with 4966 additions and 93 deletions

View File

@ -9,3 +9,10 @@ Fresnel: https://godotshaders.com/snippet/fresnel/
Code:
occlussion shader: https://www.reddit.com/r/godot/comments/rww6e9/comment/hrfa51g/?utm_source=share&utm_medium=web2x&context=3
Sound:
billiard-clack: https://freesound.org/people/Za-Games/sounds/539854/
https://freesound.org/people/original_sound/sounds/372197/

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

Binary file not shown.

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

Binary file not shown.

BIN
blends/Domino.blend (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
blends/balloon.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/cake.blend (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
blends/child.blend (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -23,8 +23,8 @@ def export(path: str):
use_selection=True,
export_colors=False,
export_apply=True,
export_animation_mode="NLA_TRACKS",
export_anim_slide_to_zero=True,
#export_animation_mode="NLA_TRACKS",
#export_anim_slide_to_zero=True,
)
try:

BIN
blends/grape.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/igloo.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blends/present.blend (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

BIN
blends/string.blend (Stored with Git LFS) Normal file

Binary file not shown.

8
godot/Button.gd Normal file
View File

@ -0,0 +1,8 @@
extends Button
func _on_pressed():
get_tree().change_scene_to_file("res://main.tscn")
func _input(event):
if event.is_action("charge"):
_on_pressed()

30
godot/CollisionSound.cs Normal file
View File

@ -0,0 +1,30 @@
using Godot;
using System;
public partial class CollisionSound : AudioStreamPlayer
{
Node controller;
bool firstPlayed = false;
public override void _Ready()
{
controller = GetNode<Node>("/root/ControllerEventBus");
Callable callable = new Callable(this, MethodName.OnControllerContact);
controller.Connect("new_target", callable);
this.OnControllerContact(this);
}
public void OnControllerContact(Node node)
{
if (firstPlayed) this.Play();
firstPlayed = true;
}
}

BIN
godot/Domino.glb (Stored with Git LFS) Normal file

Binary file not shown.

41
godot/Domino.glb.import Normal file
View File

@ -0,0 +1,41 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dmttoc025f26x"
path="res://.godot/imported/Domino.glb-425929d56fd611b3f418978da5619fbf.scn"
[deps]
source_file="res://Domino.glb"
dest_files=["res://.godot/imported/Domino.glb-425929d56fd611b3f418978da5619fbf.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path="res://physics/import_billiard.gd"
_subresources={
"nodes": {
"PATH:Domino2": {
"generate/physics": true,
"physics/body_type": 1,
"physics/shape_type": 3,
"primitive/size": Vector3(0.01, 0.01, 0.01)
}
}
}
gltf/embedded_image_handling=1

BIN
godot/Domino_Domino_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ds1wgysoytgp3"
path.s3tc="res://.godot/imported/Domino_Domino_Colour.png-07a86699fb9aab3fc9c77e79728398fd.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Domino_Domino_Colour.png"
dest_files=["res://.godot/imported/Domino_Domino_Colour.png-07a86699fb9aab3fc9c77e79728398fd.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

6
godot/Hurrmmm.csproj.old Normal file
View File

@ -0,0 +1,6 @@
<Project Sdk="Godot.NET.Sdk/4.1.3">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<Project Sdk="Godot.NET.Sdk/4.1.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
[gd_scene load_steps=4 format=3 uid="uid://db3h7pscfif84"]
[ext_resource type="PackedScene" uid="uid://dl005e2rvn86b" path="res://balloon.glb" id="1_sa42c"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_wfeli"]
friction = 0.0
bounce = 12.8
[sub_resource type="SphereShape3D" id="SphereShape3D_pjfh4"]
radius = 0.258256
[node name="balloon" instance=ExtResource("1_sa42c")]
mass = 0.1
physics_material_override = SubResource("PhysicsMaterial_wfeli")
gravity_scale = 0.0
[node name="Balloon_String" parent="." index="2"]
transform = Transform3D(-0.002, 0, -1.74846e-10, 0, 0.286, 0, 1.74846e-10, 0, -0.002, 0, -0.378486, 0)
[node name="Balloon" parent="." index="3"]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
[node name="CollisionShape3D" parent="." index="4"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.239173, 0)
shape = SubResource("SphereShape3D_pjfh4")

View File

@ -0,0 +1,7 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bnn6mfpgaqxvb"]
[ext_resource type="Shader" path="res://Objects/balloon/balloon_shader.gdshader" id="1_i5nh0"]
[resource]
render_priority = 0
shader = ExtResource("1_i5nh0")

View File

@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cqhehgwersrkl"]
[resource]
albedo_color = Color(1, 0, 0, 1)
metallic = 0.26
roughness = 0.0
clearcoat_enabled = true
clearcoat_roughness = 0.83

View File

@ -0,0 +1,9 @@
shader_type spatial;
render_mode specular_schlick_ggx;
void fragment() {
ALBEDO = vec3(255.0, 0.0, 0.0);
METALLIC = 0.9;
ROUGHNESS = 0.2;
ALPHA = 0.98;
}

View File

@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://3r1biqr3c4l7"]
[resource]
resource_name = "string"
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_color = Color(0.906332, 0.906332, 0.906332, 1)
roughness = 0.5

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://dkoiku0t4b0o7"]
[ext_resource type="PackedScene" uid="uid://4imncqpi4gw5" path="res://string.glb" id="1_otewq"]
[node name="string" instance=ExtResource("1_otewq")]
[node name="Balloon_String" parent="." index="0"]
transform = Transform3D(-0.00735031, 1.59288e-05, -5.56369e-06, 1.21871e-07, 1, -6.21002e-06, 5.56359e-06, -0.000844878, -0.00735031, 0, -1.5621, 0)

View File

@ -0,0 +1,19 @@
extends Node3D
var delta := 1.0 / float(Engine.physics_ticks_per_second)
func _ready():
Engine.get_physics_frames()
TAS_System.FrameIncremented.connect(frame_inc)
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
func frame_inc(frame: int):
%AnimationTree.advance(delta)
func frames_change(start: int, end: int):
%AnimationTree.advance((end - start)*delta)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View File

@ -0,0 +1,57 @@
[gd_scene load_steps=9 format=3 uid="uid://cfpiau12q3fut"]
[ext_resource type="PackedScene" uid="uid://c2kmady6gqslx" path="res://child.glb" id="1_rqu88"]
[ext_resource type="Script" path="res://animation_tree.gd" id="2_tcc3g"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_uc42e"]
animation = &"JumpingJacksNLA"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ijpln"]
animation = &"JumpingJacksNLA"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_57k3o"]
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3idly"]
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_h2mkw"]
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_u0o4a"]
states/JumpingJacksNLA/node = SubResource("AnimationNodeAnimation_ijpln")
states/JumpingJacksNLA/position = Vector2(559, 54)
"states/JumpingJacksNLA 2/node" = SubResource("AnimationNodeAnimation_uc42e")
"states/JumpingJacksNLA 2/position" = Vector2(633, 131)
transitions = ["JumpingJacksNLA", "JumpingJacksNLA 2", SubResource("AnimationNodeStateMachineTransition_57k3o"), "JumpingJacksNLA 2", "JumpingJacksNLA", SubResource("AnimationNodeStateMachineTransition_3idly"), "Start", "JumpingJacksNLA", SubResource("AnimationNodeStateMachineTransition_h2mkw")]
[node name="child" instance=ExtResource("1_rqu88")]
[node name="Skeleton3D" parent="Armature" index="0"]
bones/0/position = Vector3(0, 2.32035, 0)
bones/3/rotation = Quaternion(0.0514876, -5.4438e-17, -2.71031e-16, 0.998674)
bones/5/rotation = Quaternion(0.0965706, 0.063607, -0.119505, 0.986077)
bones/6/rotation = Quaternion(0.0206859, -0.0873376, 0.0694537, 0.993539)
bones/7/rotation = Quaternion(0.00777981, 0.0423361, -0.0822345, 0.995683)
bones/9/rotation = Quaternion(0.0965705, -0.063607, 0.119505, 0.986077)
bones/10/rotation = Quaternion(0.0206859, 0.0873376, -0.0694538, 0.993539)
bones/11/rotation = Quaternion(0.00777978, -0.0423361, 0.0822345, 0.995683)
bones/12/rotation = Quaternion(0.626251, 0.334163, 0.616519, -0.340661)
bones/13/rotation = Quaternion(-0.27126, -0.0288476, 0.0393126, 0.96127)
bones/14/rotation = Quaternion(-0.0251956, -0.00324478, 0.00115795, 0.999677)
bones/15/rotation = Quaternion(0.0339653, 0.0223564, -0.693306, 0.719495)
bones/16/rotation = Quaternion(0.626251, -0.334163, -0.616519, -0.340661)
bones/17/rotation = Quaternion(-0.27126, 0.0288476, -0.0393126, 0.96127)
bones/18/rotation = Quaternion(-0.0251956, 0.00324479, -0.00115795, 0.999677)
bones/19/rotation = Quaternion(0.0339653, -0.0223564, 0.693306, 0.719495)
[node name="AnimationTree" type="AnimationTree" parent="." index="2"]
unique_name_in_owner = true
tree_root = SubResource("AnimationNodeStateMachine_u0o4a")
anim_player = NodePath("../AnimationPlayer")
active = true
process_callback = 2
script = ExtResource("2_tcc3g")

BIN
godot/Objects/child/child_Child_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://75axeu8xnj41"
path.bptc="res://.godot/imported/child_Child_Colour.png-c4c784e55c596fd0d230ba7bb48dd996.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://Objects/child/child_Child_Colour.png"
dest_files=["res://.godot/imported/child_Child_Colour.png-c4c784e55c596fd0d230ba7bb48dd996.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

BIN
godot/Objects/child/child_Child_Normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b5s7geaamdsd1"
path.bptc="res://.godot/imported/child_Child_Normal.png-e0c80530ce3d1ba886433b18216a7e2c.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://Objects/child/child_Child_Normal.png"
dest_files=["res://.godot/imported/child_Child_Normal.png-e0c80530ce3d1ba886433b18216a7e2c.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://child_Child_Normal.png"
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=0

BIN
godot/Objects/domino/Domino_Domino_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvkvdhygvvxae"
path.s3tc="res://.godot/imported/Domino_Domino_Colour.png-067d515b08069aa1e54b6d66cb76bf8b.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://Objects/domino/Domino_Domino_Colour.png"
dest_files=["res://.godot/imported/Domino_Domino_Colour.png-067d515b08069aa1e54b6d66cb76bf8b.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://b7qky0n2ea40e"]
[ext_resource type="PackedScene" uid="uid://dmttoc025f26x" path="res://Domino.glb" id="1_n2u88"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ndu5u"]
size = Vector3(0.153, 0.279, 0.066)
[node name="Domino" instance=ExtResource("1_n2u88")]
mass = 20.0
[node name="Domino2" parent="." index="2"]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0)
[node name="CollisionShape3D" parent="." index="3"]
transform = Transform3D(0.999984, 0, 0, 0, 0.999984, 0, 0, 0, 0.999984, 0, 0, 0)
shape = SubResource("BoxShape3D_ndu5u")

File diff suppressed because one or more lines are too long

BIN
godot/Objects/igloo/igloo_Igloo_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cbqufebenynym"
path.bptc="res://.godot/imported/igloo_Igloo_Colour.png-3593c486967c2287e44aad91030db888.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://Objects/igloo/igloo_Igloo_Colour.png"
dest_files=["res://.godot/imported/igloo_Igloo_Colour.png-3593c486967c2287e44aad91030db888.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

BIN
godot/Objects/igloo/igloo_Igloo_Normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7w2x04tm1opn"
path.bptc="res://.godot/imported/igloo_Igloo_Normal.png-ca22887363a6b45a9fd447d212cdb2df.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://Objects/igloo/igloo_Igloo_Normal.png"
dest_files=["res://.godot/imported/igloo_Igloo_Normal.png-ca22887363a6b45a9fd447d212cdb2df.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://igloo_Igloo_Normal.png"
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=0

View File

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://y0mo5gxmd08q"]
[ext_resource type="PackedScene" uid="uid://b7kpas3rxox0u" path="res://present.glb" id="1_420vr"]
[sub_resource type="BoxShape3D" id="BoxShape3D_v5kqf"]
size = Vector3(2.18126, 1.97943, 2.07727)
[node name="present" instance=ExtResource("1_420vr")]
[node name="Present" parent="." index="2"]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0)
[node name="CollisionShape3D" parent="." index="3"]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0)
shape = SubResource("BoxShape3D_v5kqf")

View File

@ -8,6 +8,15 @@ public partial class TAS_System : Node
private double _timeSinceLastFrame;
private int _currentFrame = 0;
private int _lastAdvancedFrame = 0;
[Export]
public double min_speed = 1.0;
[Export]
public double max_speed = 10.0;
// Number of ms passed while speeding up
[Export]
public double speed = 0.0;
[Export]
public double exp_speed_base = 1.05;
public double FrameLength
{
@ -64,21 +73,42 @@ public partial class TAS_System : Node
[Signal]
public delegate void FramesRegressedEventHandler(int startFrame, int endFrame);
[Signal]
public delegate void StartedIncrementingEventHandler();
[Signal]
public delegate void StoppedIncrementingEventHandler();
[Signal]
public delegate void FramesResetEventHandler();
[Signal]
public delegate void SpeedChangeEventHandler(float speed);
public void StartIncrementingFrames()
{
if (this.IsIncrementingFrames == false)
{
this.IsIncrementingFrames = true;
EmitSignal(SignalName.StartedIncrementing);
}
}
public void StopIncrementingFrames()
{
if (this.IsIncrementingFrames == true)
{
this.IsIncrementingFrames = false;
EmitSignal(SignalName.StoppedIncrementing);
}
}
public void ResetFrameCount()
{
this.CurrentFrame = 0;
this.LastAdvancedFrame = 0;
EmitSignal(SignalName.FramesReset);
}
// Returns how many frames it could successfully advance
@ -91,6 +121,25 @@ public partial class TAS_System : Node
return framesAdvanced;
}
public int AdvanceWithSpeedup(double time_delta) {
speed += time_delta;
speed = Math.Clamp(speed, min_speed, max_speed);
EmitSignal(SignalName.SpeedChange, speed);
return Advance((int)Math.Pow(exp_speed_base, speed));
}
public int RegressWithSpeedup(double time_delta) {
speed += time_delta;
speed = Math.Clamp(speed, min_speed, max_speed);
EmitSignal(SignalName.SpeedChange, speed);
return Regress((int)Math.Pow(exp_speed_base, speed));
}
public void ResetSpeedup() {
speed = 0.0;
EmitSignal(SignalName.SpeedChange, speed);
}
// Returns how many frames it could successfully regress
public int Regress(int numFrames)
{
@ -122,14 +171,15 @@ public partial class TAS_System : Node
this.TimeSinceLastFrame = 0 + (this.TimeSinceLastFrame - this.FrameLength);
}
}
// GD.Print(CurrentFrame);
}
// public void Test()
// {
// GD.Print("test123");
// // EmitSignal(SignalName.TestSignal, "test456");
// }
public override void _Ready()
{
this.FrameLength = 1/60;
this.StartIncrementingFrames();
}
}

View File

@ -1,33 +1,93 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
public partial class TASable : Node
{
Node3D _parent;
[Export] RigidBody3D _assignedRigidBody3D;
public RigidBody3D AssignedRigidBody3D
{
get { return this._assignedRigidBody3D; }
}
// Frame data
public Dictionary<int, Vector3> framePositions = new Dictionary<int, Vector3>();
public Dictionary<int, Vector3> frameRotations = new Dictionary<int, Vector3>();
public Dictionary<int, Vector3> frameLinearVelocities = new Dictionary<int, Vector3>();
public Dictionary<int, Vector3> frameAngularVelocities = new Dictionary<int, Vector3>();
public virtual void SaveState(int frame)
{
this.framePositions[frame] = this.AssignedRigidBody3D.Position;
this.frameRotations[frame] = this.AssignedRigidBody3D.Rotation;
this.frameLinearVelocities[frame] = this.AssignedRigidBody3D.LinearVelocity;
this.frameAngularVelocities[frame] = this.AssignedRigidBody3D.AngularVelocity;
}
public virtual void LoadState(int frame)
{
this.AssignedRigidBody3D.Position = this.framePositions[frame];
this.AssignedRigidBody3D.Rotation = this.frameRotations[frame];
this.AssignedRigidBody3D.LinearVelocity = this.frameLinearVelocities[frame];
this.AssignedRigidBody3D.AngularVelocity = this.frameAngularVelocities[frame];
}
public override void _Ready()
{
this._parent = this.GetParent<Node3D>();
if (this._assignedRigidBody3D is null)
{
this._assignedRigidBody3D = this.GetParent<RigidBody3D>();
}
TAS_System TAS = GetNode<TAS_System>("/root/TAS_System");
TAS.FrameIncremented += this.OnFrameIncremented;
TAS.FramesAdvanced += this.OnFramesAdvanced;
TAS.FramesRegressed += this.OnFramesRegressed;
TAS.StartedIncrementing += this.OnStartedIncrementing;
TAS.StoppedIncrementing += this.OnStoppedIncrementing;
TAS.FramesReset += this.OnFramesReset;
this.SaveState(0);
}
public virtual void OnFrameIncremented(int newFrame)
{
GD.Print($"Frame advanced to {newFrame}, called from node {_parent.Name}");
this.SaveState(newFrame);
// GD.Print($"Frame advanced to {newFrame}, called from node {this.AssignedRigidBody3D.Name}");
}
public virtual void OnFramesAdvanced(int startFrame, int endFrame)
{
GD.Print($"Frames advanced from {startFrame} to {endFrame}, called from node {_parent.Name}");
this.LoadState(endFrame);
// GD.Print($"Frames advanced from {startFrame} to {endFrame}, called from node {this.AssignedRigidBody3D.Name}");
}
public virtual void OnFramesRegressed(int startFrame, int endFrame)
{
GD.Print($"Frames regressed from {startFrame} to {endFrame}, called from node {_parent.Name}");
this.LoadState(endFrame);
// GD.Print($"Frames regressed from {startFrame} to {endFrame}, called from node {this.AssignedRigidBody3D.Name}");
}
public virtual void OnStartedIncrementing()
{
this.AssignedRigidBody3D.Freeze = false;
this.AssignedRigidBody3D.LockRotation = false;
}
public virtual void OnStoppedIncrementing()
{
this.AssignedRigidBody3D.Freeze = true;
this.AssignedRigidBody3D.LockRotation = true;
}
public virtual void OnFramesReset()
{
this.SaveState(0);
}
}

View File

@ -0,0 +1,52 @@
using Godot;
using System;
public partial class TimescaleSystem : Node
{
[Export] public double SlowLength = 1.0;
[Export] public double SlowMagnitude = 0.2;
Node controller;
public override void _Ready()
{
controller = GetNode<Node>("/root/ControllerEventBus");
Callable callable = new Callable(this, MethodName.OnControllerContact);
controller.Connect("new_target", callable);
this.OnControllerContact(this);
}
public void OnControllerContact(Node node)
{
GD.Print("toUCHED!");
Engine.TimeScale = this.SlowMagnitude;
Timer timer = new Timer();
timer.Name = "SlowTimer";
this.AddChild(timer);
timer.WaitTime = this.SlowLength * this.SlowMagnitude;
timer.OneShot = true;
timer.Timeout += () => {
GD.Print("TimE!");
Engine.TimeScale = 1.0;
timer.QueueFree();
};
timer.Start();
}
}

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bs3yqnctxfwaa"]
[ext_resource type="Script" path="res://Timescale_System/TimescaleSystem.cs" id="1_6tt5j"]
[node name="TimescaleSystem" type="Node"]
script = ExtResource("1_6tt5j")

View File

@ -4,12 +4,25 @@ using System;
public partial class AdvanceButton : Button
{
TAS_System TAS;
bool isButtonPressed = false;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
TAS = GetNode<TAS_System>("/root/TAS_System");
this.Pressed += () => { TAS.Advance(1); };
AudioStreamPlayer buttonSound = this.GetNode<AudioStreamPlayer>("../../ButtonSound");
bool playSound = true;
this.Pressed += () => {
TAS.Advance(1);
if (playSound) buttonSound.Play();
playSound = false;
};
this.ButtonDown += () => { this.isButtonPressed = true; };
this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); playSound = true; };
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
@ -18,10 +31,18 @@ public partial class AdvanceButton : Button
if (TAS.AdvancedFramesRemaining == 0)
{
this.Disabled = true;
TAS.ResetSpeedup();
this.isButtonPressed = false;
}
else
{
this.Disabled = false;
if (this.isButtonPressed)
{
TAS.AdvanceWithSpeedup(delta);
}
}
}
}

View File

@ -0,0 +1,4 @@
extends Label
func _process(delta):
text = "Speed: " + str(TAS_System.speed)

View File

@ -3,15 +3,49 @@ using System;
public partial class RegressButton : Button
{
TAS_System TAS;
bool isButtonPressed = false;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
TAS_System TAS = GetNode<TAS_System>("/root/TAS_System");
this.Pressed += () => { TAS.Regress(1); };
TAS = GetNode<TAS_System>("/root/TAS_System");
AudioStreamPlayer buttonSound = this.GetNode<AudioStreamPlayer>("../../ButtonSound");
bool playSound = true;
this.Pressed += () => {
TAS.Regress(1);
if (playSound) buttonSound.Play();
playSound = false;
};
this.ButtonDown += () => { this.isButtonPressed = true; TAS.StopIncrementingFrames(); };
this.ButtonUp += () => { this.isButtonPressed = false; TAS.ResetSpeedup(); playSound = true; };
}
public virtual void OnFrameIncremented(int newFrame)
{
this.Text = $"Current frame: {newFrame}";
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if (TAS.CurrentFrame == 0)
{
this.Disabled = true;
TAS.ResetSpeedup();
this.isButtonPressed = false;
}
else
{
this.Disabled = false;
if (this.isButtonPressed)
{
TAS.RegressWithSpeedup(delta);
}
}
}
}

28
godot/UI/TAS UI/TAS UI.gd Normal file
View File

@ -0,0 +1,28 @@
extends Control
func _input(event):
var f: Callable
if event.is_pressed():
f = press
else:
f = release
if event.is_action("regress"):
f.call($FrameButtons/RegressButton)
elif event.is_action("advance"):
f.call($FrameButtons/AdvanceButton)
elif event.is_action("increment"):
if TAS_System.IsIncrementingFrames:
f.call($TASButtons/StopIncrementButton)
else:
f.call($TASButtons/StartIncrementButton)
func press(btn: Button):
btn.button_pressed = true
btn.pressed.emit()
btn.button_down.emit()
func release(btn: Button):
btn.button_pressed = false
btn.button_up.emit()

View File

@ -1,8 +1,12 @@
[gd_scene load_steps=7 format=3 uid="uid://b1uf31ed6h0ir"]
[gd_scene load_steps=11 format=3 uid="uid://b1uf31ed6h0ir"]
[ext_resource type="Script" path="res://UI/TAS UI/CurrentFrameLabel.cs" id="1_27u4w"]
[ext_resource type="Script" path="res://UI/TAS UI/TAS UI.gd" id="1_ytl0x"]
[ext_resource type="Script" path="res://UI/TAS UI/RegressButton.cs" id="2_fhmsa"]
[ext_resource type="AudioStream" uid="uid://cio6yfcnyf2lx" path="res://audio/note.wav" id="2_nsxig"]
[ext_resource type="Script" path="res://UI/TAS UI/Label2.gd" id="2_otida"]
[ext_resource type="Script" path="res://UI/TAS UI/AdvanceButton.cs" id="3_0ti6q"]
[ext_resource type="Script" path="res://UI/TAS UI/UIAudioPlayer.cs" id="3_251uv"]
[ext_resource type="Script" path="res://UI/TAS UI/StopIncrementButton.cs" id="4_4gd4c"]
[ext_resource type="Script" path="res://UI/TAS UI/StartIncrementButton.cs" id="5_5af83"]
[ext_resource type="Script" path="res://UI/TAS UI/ResetFramesButton.cs" id="6_nwwkv"]
@ -14,14 +18,22 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_ytl0x")
[node name="ButtonSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_nsxig")
script = ExtResource("3_251uv")
[node name="DEBUG" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="Label" type="Label" parent="DEBUG"]
layout_mode = 1
@ -34,7 +46,21 @@ grow_vertical = 0
text = "Current Frame: 0"
script = ExtResource("1_27u4w")
[node name="Label2" type="Label" parent="DEBUG"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 2.0
offset_top = -55.0
offset_right = 201.0
offset_bottom = -29.0
grow_vertical = 0
text = "Current Frame: 0"
script = ExtResource("2_otida")
[node name="FrameButtons" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
@ -53,6 +79,7 @@ anchors_preset = -1
anchor_right = 0.5
anchor_bottom = 1.0
grow_vertical = 2
focus_mode = 0
text = "Regress"
script = ExtResource("2_fhmsa")
@ -63,11 +90,13 @@ anchor_left = 0.5
anchor_right = 1.0
anchor_bottom = 1.0
grow_vertical = 2
focus_mode = 0
disabled = true
text = "Advance"
script = ExtResource("3_0ti6q")
[node name="TASButtons" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
@ -85,6 +114,7 @@ anchors_preset = 10
anchor_right = 1.0
offset_bottom = 31.0
grow_horizontal = 2
focus_mode = 0
text = "Stop Increment"
script = ExtResource("4_4gd4c")
@ -98,6 +128,7 @@ offset_top = -15.5
offset_bottom = 15.5
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0
text = "Start Increment"
script = ExtResource("5_5af83")
@ -110,5 +141,6 @@ anchor_bottom = 1.0
offset_top = -31.0
grow_horizontal = 2
grow_vertical = 0
focus_mode = 0
text = "Reset Frames"
script = ExtResource("6_nwwkv")

View File

@ -0,0 +1,15 @@
using Godot;
using System;
public partial class UIAudioPlayer : AudioStreamPlayer
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
}

14
godot/animation_tree.gd Normal file
View File

@ -0,0 +1,14 @@
extends AnimationTree
var delta := 1.0 / float(Engine.physics_ticks_per_second)
func _ready():
TAS_System.FrameIncremented.connect(frame_inc)
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
func frame_inc(_frame: int):
advance(delta)
func frames_change(start: int, end: int):
advance((end - start)*delta)

BIN
godot/audio/TricksterGhost.mp3 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b88pn0htpxvo3"
path="res://.godot/imported/TricksterGhost.mp3-9e9257851e7178f1dea40efb12b41b62.mp3str"
[deps]
source_file="res://audio/TricksterGhost.mp3"
dest_files=["res://.godot/imported/TricksterGhost.mp3-9e9257851e7178f1dea40efb12b41b62.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
godot/audio/TricksterGhostNew.mp3 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dw06bektw4j8m"
path="res://.godot/imported/TricksterGhostNew.mp3-04c37f493148cbf09dc4a34a27263367.mp3str"
[deps]
source_file="res://audio/TricksterGhostNew.mp3"
dest_files=["res://.godot/imported/TricksterGhostNew.mp3-04c37f493148cbf09dc4a34a27263367.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://c5v6c6x05lqg3"
path="res://.godot/imported/billiard-clack.wav-3f99ec74be11d1cb465d3dc06a94b10f.sample"
[deps]
source_file="res://audio/billiard-clack.wav"
dest_files=["res://.godot/imported/billiard-clack.wav-3f99ec74be11d1cb465d3dc06a94b10f.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
godot/audio/charge.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ckhf7ksthi053"
path="res://.godot/imported/charge.wav-9ea0e7ab134da578b6f69151780ec24f.sample"
[deps]
source_file="res://audio/charge.wav"
dest_files=["res://.godot/imported/charge.wav-9ea0e7ab134da578b6f69151780ec24f.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
godot/audio/error.mp3 (Stored with Git LFS) Normal file

Binary file not shown.

View File

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

BIN
godot/audio/impact.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d2ncd2qoklbbe"
path="res://.godot/imported/impact.wav-606f8b40b78eec03bfd2693747f9e1cb.sample"
[deps]
source_file="res://audio/impact.wav"
dest_files=["res://.godot/imported/impact.wav-606f8b40b78eec03bfd2693747f9e1cb.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
godot/audio/note.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cio6yfcnyf2lx"
path="res://.godot/imported/note.wav-f74766d8f2fafbaa9729bf4b58d8f300.sample"
[deps]
source_file="res://audio/note.wav"
dest_files=["res://.godot/imported/note.wav-f74766d8f2fafbaa9729bf4b58d8f300.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
godot/balloon.glb (Stored with Git LFS) Normal file

Binary file not shown.

50
godot/balloon.glb.import Normal file
View File

@ -0,0 +1,50 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dl005e2rvn86b"
path="res://.godot/imported/balloon.glb-1dbd4246a6d2ad23da187ebfe5c7e652.scn"
[deps]
source_file="res://balloon.glb"
dest_files=["res://.godot/imported/balloon.glb-1dbd4246a6d2ad23da187ebfe5c7e652.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path="res://physics/import_billiard.gd"
_subresources={
"materials": {
"balloon": {
"use_external/enabled": true,
"use_external/path": "res://Objects/balloon/balloon_material_standard.tres"
},
"string": {
"use_external/enabled": true,
"use_external/path": "res://Objects/balloon/string.tres"
}
},
"nodes": {
"PATH:Balloon": {
"generate/physics": true,
"physics/body_type": 1,
"physics/shape_type": 3
}
}
}
gltf/embedded_image_handling=1

BIN
godot/cake.glb (Stored with Git LFS) Normal file

Binary file not shown.

53
godot/cake.glb.import Normal file
View File

@ -0,0 +1,53 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://djj412h1ien4o"
path="res://.godot/imported/cake.glb-e60e073e8642f273d1a78ec90c85894b.scn"
[deps]
source_file="res://cake.glb"
dest_files=["res://.godot/imported/cake.glb-e60e073e8642f273d1a78ec90c85894b.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path="res://physics/import_billiard.gd"
_subresources={
"materials": {
"cake": {
"use_external/enabled": true,
"use_external/path": "res://cake.tres"
},
"candles": {
"use_external/enabled": true,
"use_external/path": "res://candles.tres"
}
},
"nodes": {
"PATH:cake2": {
"generate/physics": true,
"physics/body_type": 1,
"physics/shape_type": 5,
"primitive/height": 0.244,
"primitive/position": Vector3(0, 0.042, 0),
"primitive/radius": 0.219
}
}
}
gltf/embedded_image_handling=1

12
godot/cake.tres Normal file
View File

@ -0,0 +1,12 @@
[gd_resource type="StandardMaterial3D" load_steps=3 format=3 uid="uid://b8htfw5f1a4wf"]
[ext_resource type="Texture2D" uid="uid://dhyh1g25bmhtf" path="res://cake_cake_albedo.png" id="1_jefwg"]
[ext_resource type="Texture2D" uid="uid://cer3pk0fspi1c" path="res://cake_cake_normals.png" id="2_55xkl"]
[resource]
resource_name = "cake"
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("1_jefwg")
roughness = 0.5
normal_enabled = true
normal_texture = ExtResource("2_55xkl")

8
godot/cake.tscn Normal file
View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://cx4ohbn84hmc3"]
[ext_resource type="PackedScene" uid="uid://djj412h1ien4o" path="res://cake.glb" id="1_q3mni"]
[node name="cake" instance=ExtResource("1_q3mni")]
[node name="CollisionShape3D" parent="." index="4"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0367587, 0)

BIN
godot/cake_cake_albedo.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dhyh1g25bmhtf"
path.bptc="res://.godot/imported/cake_cake_albedo.png-8e7e933b04d67a69b2a262d9cdfe2bb0.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://cake_cake_albedo.png"
dest_files=["res://.godot/imported/cake_cake_albedo.png-8e7e933b04d67a69b2a262d9cdfe2bb0.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

BIN
godot/cake_cake_normals.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cer3pk0fspi1c"
path.bptc="res://.godot/imported/cake_cake_normals.png-85023f0c4cf5997d4101eb078e7a1400.bptc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://cake_cake_normals.png"
dest_files=["res://.godot/imported/cake_cake_normals.png-85023f0c4cf5997d4101eb078e7a1400.bptc.ctex"]
[params]
compress/mode=2
compress/high_quality=true
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://cake_cake_normals.png"
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=0

8
godot/candles.tres Normal file
View File

@ -0,0 +1,8 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://li4gdaji6poj"]
[resource]
resource_name = "candles"
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_color = Color(0.453326, 0, 0.0696221, 1)
roughness = 0.5

BIN
godot/child.glb (Stored with Git LFS) Normal file

Binary file not shown.

1834
godot/child.glb.import Normal file

File diff suppressed because it is too large Load Diff

BIN
godot/child_Child_Colour.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ykvmuu6gxuom"
path.s3tc="res://.godot/imported/child_Child_Colour.png-f361e4e6aa172920dd7d8097cc2e5595.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://child_Child_Colour.png"
dest_files=["res://.godot/imported/child_Child_Colour.png-f361e4e6aa172920dd7d8097cc2e5595.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

BIN
godot/child_Child_Normal.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgwi7p5178xwg"
path.s3tc="res://.godot/imported/child_Child_Normal.png-2c56fd0195c1c8de3aa3abb3c7b11f2f.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://child_Child_Normal.png"
dest_files=["res://.godot/imported/child_Child_Normal.png-2c56fd0195c1c8de3aa3abb3c7b11f2f.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://child_Child_Normal.png"
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=0

View File

@ -11,7 +11,7 @@ void vertex() {
void fragment() {
float scale = 50.0;
float speed = 1000.0;
float f = random2(round(UV * scale)/scale + round(TIME*speed)/speed);
float f = random2(UV + round(TIME*speed)/speed);
if (f > 0.1) {
discard;
}

Binary file not shown.

View File

@ -4,26 +4,135 @@ extends Node3D
@export var initial_target: Node3D
var target: Targetable = null
@export var sensitivity := 0.01
@export var controller_sensitivity := 0.04
@export var charge_time := 1.7
@export var min_charge := 0.2
var camera_tweening = false
var time_targets := Dictionary()
func _ready():
set_target(initial_target)
set_target(initial_target, false)
time_targets[0] = target
camera.set_as_top_level(true)
ControllerEventBus.billiard_touched_billiard.connect(_on_billiard_touched_billiard)
TAS_System.FrameIncremented.connect(frame_inc)
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
TAS_System.FramesReset.connect(frames_reset)
func frame_inc(frame: int):
time_targets[frame] = target
func frames_change(_start: int, end: int):
if not time_targets.has(end):
return
if time_targets[end] != target:
set_target(time_targets[end].get_billiard())
func frames_reset():
time_targets = Dictionary()
time_targets[0] = target
func _on_billiard_touched_billiard(who: Billiard, touched: Billiard):
var who_target = Targetable.is_targetable(who)
if who_target != target or who.can_hit:
return
set_target(touched)
ControllerEventBus.new_target.emit(touched)
func get_charge():
return %radial_ui.charge_amount
func _input(event):
if event is InputEventMouseMotion:
var billiard := target.get_billiard()
if camera_tweening or not MouseControl.mouse_is_locked():
return
if event is InputEventMouseMotion and get_charge() == 0.0 :
rotate_view(event.relative*sensitivity)
if event.is_action_released("charge") and not billiard.can_hit and charge_tween != null:
release()
if event.is_action_pressed("charge") and charge_tween == null:
if billiard.can_hit:
charge(event.get_action_strength("charge"))
else:
$NoChargesSound.play()
func _process(_delta):
if target.get_billiard().can_hit:
set_strobe(strobe_amount)
else:
set_strobe(0.0)
transform.origin = target.global_position
camera.global_position = %camera_spot.global_position
camera.look_at(target.global_position)
%camera_spot.look_at(target.global_position)
if not camera_tweening:
camera.global_transform = %camera_spot.global_transform
else:
camera.global_position = lerp(camera.global_position, %camera_spot.global_position, 0.5)
camera.global_rotation = lerp(camera.global_rotation, %camera_spot.global_rotation, 0.5)
var epsilon: float = 0.005
if (camera.global_position - %camera_spot.global_position).length() <= epsilon and (camera.global_rotation - %camera_spot.global_rotation).length() <= epsilon:
camera_tweening = false
if get_charge() >= 1.0:
cancel_charge()
var look := Input.get_vector("look_left", "look_right", "loop_up", "look_down")
rotate_view(look*controller_sensitivity)
func cancel_charge():
%radial_ui.set_charge(0.0)
%ChargeSound.stop()
if charge_tween != null:
charge_tween.kill()
charge_tween = null
var billiard := target.get_billiard()
billiard.can_hit = true
func release():
if get_charge() <= min_charge:
cancel_charge()
return
%ChargeReleaseSound.volume_db = get_charge() * 12
%ChargeReleaseSound.play()
var billiard := target.get_billiard()
TAS_System.StartIncrementingFrames()
billiard.hit((target.global_position - %camera_spot.global_position).normalized(), get_charge())
%radial_ui.set_charge(0.0)
%ChargeSound.stop()
if charge_tween != null:
charge_tween.kill()
charge_tween = null
var charge_tween: Tween = null
func charge(_amount: float):
var billiard := target.get_billiard()
billiard.can_hit = false
if charge_tween != null:
charge_tween.kill()
charge_tween = create_tween()
charge_tween.tween_method(%radial_ui.set_charge, 0.0, 1.0, charge_time)
%ChargeSound.play()
func rotate_view(amount: Vector2):
rotate_y(-amount.x)
%rotate_helper.rotate_z(amount.y)
%rotate_helper.rotation_degrees.z = clampf(%rotate_helper.rotation_degrees.z, -77, 77)
func set_target(node: Node3D):
func set_target(node: Node3D, should_create_tween=true):
camera_tweening = should_create_tween
$AnimationPlayer.seek(0)
var ntarget = Targetable.is_targetable(node)
var billiard = ntarget.get_billiard()
billiard.can_hit = true
if ntarget == null:
push_error("Node is node targetable", node)
return
@ -31,3 +140,7 @@ func set_target(node: Node3D):
target.unmake_target()
ntarget.make_target()
target = ntarget
@export var strobe_amount: float = 0.0
func set_strobe(c: float):
target.set_strobe(c)

View File

@ -1,6 +1,31 @@
[gd_scene load_steps=2 format=3 uid="uid://drmb4sitb74fx"]
[gd_scene load_steps=8 format=3 uid="uid://drmb4sitb74fx"]
[ext_resource type="Script" path="res://control_scheme/controller.gd" id="1_h3pjb"]
[ext_resource type="PackedScene" uid="uid://p2n48c8st55d" path="res://control_scheme/radial_ui.tscn" id="2_qidcb"]
[ext_resource type="AudioStream" uid="uid://ckhf7ksthi053" path="res://audio/charge.wav" id="3_exgm6"]
[ext_resource type="AudioStream" uid="uid://c5v6c6x05lqg3" path="res://audio/billiard-clack.wav" id="4_12r5s"]
[ext_resource type="AudioStream" uid="uid://bg07vavc0duo5" path="res://audio/error.mp3" id="5_l6rvw"]
[sub_resource type="Animation" id="Animation_p1nwe"]
resource_name = "highlight_target"
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:strobe_amount")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 0.3, 0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_e1dcv"]
_data = {
"highlight_target": SubResource("Animation_p1nwe")
}
[node name="controller" type="Node3D"]
top_level = true
@ -12,3 +37,23 @@ unique_name_in_owner = true
[node name="camera_spot" type="Marker3D" parent="rotate_helper"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)
[node name="radial_ui" parent="." instance=ExtResource("2_qidcb")]
unique_name_in_owner = true
[node name="ChargeSound" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("3_exgm6")
[node name="ChargeReleaseSound" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("4_12r5s")
[node name="NoChargesSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_l6rvw")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "highlight_target"
libraries = {
"": SubResource("AnimationLibrary_e1dcv")
}

View File

@ -6,6 +6,9 @@ class_name Targetable
static func is_targetable(node: Node3D) -> Targetable:
return node.get_node_or_null("is_targetable")
func get_billiard() -> Billiard:
return get_parent()
func make_target():
walk_meshes_post_order(self.get_parent(), change_all_materials)
@ -21,21 +24,19 @@ func walk_meshes_post_order(parent: Node, f: Callable):
func change_all_materials(mesh: MeshInstance3D):
for i in range(mesh.get_surface_override_material_count()):
var original_mat: BaseMaterial3D = mesh.get_active_material(i)
var layer0 = original_mat.duplicate()
var layer1 = preload("control_target_overlay.material").duplicate()
var layer0: BaseMaterial3D = original_mat.duplicate()
var layer1: ShaderMaterial = preload("control_target_overlay.material").duplicate()
# Non-occlused
var layer2 = original_mat.duplicate()
var layer2: BaseMaterial3D = original_mat.duplicate()
layer0.next_pass = layer1
layer1.next_pass = layer2
layer0.render_priority = 0
layer1.render_priority = 1
layer2.render_priority = 2
layer0.render_priority = 10
layer1.render_priority = 20
layer2.render_priority = 30
layer0.no_depth_test = true
layer0.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA_DEPTH_PRE_PASS
layer0.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA_HASH
layer0.grow = true
layer0.grow_amount = -0.001
layer0.albedo_color = layer0.albedo_color.darkened(0.5)
@ -44,26 +45,31 @@ func change_all_materials(mesh: MeshInstance3D):
layer2.depth_draw_mode = BaseMaterial3D.DEPTH_DRAW_ALWAYS
mesh.set_surface_override_material(i, layer0)
#mesh.set_surface_override_material(i, mat)
#mat.next_pass = preload("control_target_overlay.material")
func unchange_all_materials(mesh: MeshInstance3D):
for i in range(mesh.get_surface_override_material_count()):
var mat := mesh.get_active_material(i)
unchange_material(mat)
while mat.next_pass != null:
unchange_material(mat.next_pass)
mat = mat.next_pass
mat.next_pass = null
var layer2: StandardMaterial3D = mat.next_pass.next_pass
layer2.transparency = BaseMaterial3D.TRANSPARENCY_DISABLED
layer2.depth_draw_mode = BaseMaterial3D.DEPTH_DRAW_OPAQUE_ONLY
layer2.emission_enabled = false
layer2.emission = Color(1.0, 1.0, 1.0)
mesh.set_surface_override_material(i, layer2.duplicate())
func change_material(mat: BaseMaterial3D) -> BaseMaterial3D:
mat = mat.duplicate()
mat.render_priority = 100
mat.no_depth_test = true
return mat
func set_strobe(color: float):
walk_meshes_post_order(self.get_parent(), set_mesh_strobe.bind(color))
func set_mesh_strobe(mesh: MeshInstance3D, color: float):
for i in range(mesh.get_surface_override_material_count()):
var mat := mesh.get_active_material(i)
var layer0: BaseMaterial3D = mat
var layer1: ShaderMaterial = mat.next_pass
var layer2: BaseMaterial3D = mat.next_pass.next_pass
layer0.emission_enabled = true
layer2.emission_enabled = true
layer0.emission_energy_multiplier = color
layer2.emission_energy_multiplier = color
layer0.emission = Color(1.0, 0.0, 0.0)
layer2.emission = Color(1.0, 0.0, 0.0)
func unchange_material(mat: BaseMaterial3D) -> BaseMaterial3D:
mat.render_priority = 0
mat.no_depth_test = false
return mat

View File

@ -0,0 +1,12 @@
extends Node3D
func _ready():
set_charge(0.0)
var charge_amount: float = 0.0
func set_charge(amount: float):
charge_amount = amount
var mat: ShaderMaterial = $MeshInstance3D.get_active_material(0)
mat.set_shader_parameter("charge", amount)

View File

@ -0,0 +1,37 @@
// NOTE: Shader automatically converted from Godot Engine 4.1.3.stable.mono's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_disabled,unshaded,shadows_disabled,ambient_light_disabled, depth_test_disabled;
uniform float grow;
uniform sampler2D colors : source_color, repeat_disable;
uniform float charge = 1.0;
void vertex() {
// Billboarding
MODELVIEW_MATRIX = VIEW_MATRIX * mat4(INV_VIEW_MATRIX[0], INV_VIEW_MATRIX[1], INV_VIEW_MATRIX[2], MODEL_MATRIX[3]);
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
VERTEX+=NORMAL*grow;
float speed = pow(2.0, ((charge+.4)*5.0));
float dy = sin(speed*.7) * 0.005;
float dx = sin(speed) * 0.005;
VERTEX.y += dy;
VERTEX.x += dx;
}
uniform sampler2D alpha_falloff : repeat_disable;
void fragment() {
float where = distance(UV, vec2(0.5))*2.0;
if (where >= charge) {
discard;
}
vec2 buv = floor(UV * 350.0);
int bx = int(buv.x);
int by = int(buv.y);
int amount = 2;
ALPHA = texture(alpha_falloff, vec2(where/charge)).r;
ALBEDO = texture(colors, vec2(where)).rgb;
}

Some files were not shown because too many files have changed in this diff Show More