copy from thegates-jam repo

This commit is contained in:
Nordup 2024-03-31 09:25:42 +04:00
parent c1a7ad74e1
commit 1a335de566
523 changed files with 22408 additions and 0 deletions

View file

@ -0,0 +1,108 @@
[gd_resource type="AnimationNodeBlendTree" load_steps=24 format=3 uid="uid://ctycm6blx4sw4"]
[sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_dpb3n"]
[sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_766tv"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_080es"]
animation = &"Godot Custom Animations/simple_blink"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_cakye"]
animation = &"simple_punch"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u6r87"]
animation = &"Godot Custom Animations/default_heartbeat"
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_rfqjk"]
filter_enabled = true
filters = ["Armature/Skeleton3D:finger_1_1.L", "Armature/Skeleton3D:finger_1_2.L", "Armature/Skeleton3D:finger_2_1.L", "Armature/Skeleton3D:finger_2_2.L", "Armature/Skeleton3D:finger_3_1.L", "Armature/Skeleton3D:finger_3_2.L", "Armature/Skeleton3D:finger_4_1.L", "Armature/Skeleton3D:finger_4_2.L", "Armature/Skeleton3D:lowerarm.L", "Armature/Skeleton3D:thumb_1.L", "Armature/Skeleton3D:thumb_2.L", "Armature/Skeleton3D:torso", "Armature/Skeleton3D:upperarm.L"]
sync = true
fadein_time = 0.1
fadeout_time = 0.1
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pi646"]
animation = &"fall"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_53liu"]
animation = &"ground_impact"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nan6l"]
animation = &"Idle"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fy3xa"]
animation = &"jump"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qysix"]
animation = &"run"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ynydo"]
animation = &"walk"
[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_cfy75"]
blend_point_0/node = SubResource("AnimationNodeAnimation_qysix")
blend_point_0/pos = 1.0
blend_point_1/node = SubResource("AnimationNodeAnimation_ynydo")
blend_point_1/pos = 0.0
min_space = 0.0
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_5sbif"]
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sawiy"]
xfade_time = 0.2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xu61x"]
xfade_time = 0.2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2yld2"]
xfade_time = 0.2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ad878"]
xfade_time = 0.1
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_63es0"]
xfade_time = 0.1
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bsdcg"]
xfade_time = 0.2
switch_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rbpx6"]
xfade_time = 0.1
switch_mode = 1
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_42lpg"]
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_k7175"]
states/End/position = Vector2(701, 90)
states/Start/position = Vector2(212, 90)
states/fall/node = SubResource("AnimationNodeAnimation_pi646")
states/fall/position = Vector2(342, 207)
states/ground_impact/node = SubResource("AnimationNodeAnimation_53liu")
states/ground_impact/position = Vector2(521, 207)
states/idle/node = SubResource("AnimationNodeAnimation_nan6l")
states/idle/position = Vector2(328, 90)
states/jump/node = SubResource("AnimationNodeAnimation_fy3xa")
states/jump/position = Vector2(179, 207)
states/move/node = SubResource("AnimationNodeBlendSpace1D_cfy75")
states/move/position = Vector2(531, 90)
transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_5sbif"), "idle", "move", SubResource("AnimationNodeStateMachineTransition_sawiy"), "move", "idle", SubResource("AnimationNodeStateMachineTransition_xu61x"), "jump", "fall", SubResource("AnimationNodeStateMachineTransition_2yld2"), "idle", "jump", SubResource("AnimationNodeStateMachineTransition_ad878"), "fall", "ground_impact", SubResource("AnimationNodeStateMachineTransition_63es0"), "ground_impact", "idle", SubResource("AnimationNodeStateMachineTransition_bsdcg"), "ground_impact", "move", SubResource("AnimationNodeStateMachineTransition_rbpx6"), "move", "jump", SubResource("AnimationNodeStateMachineTransition_42lpg")]
graph_offset = Vector2(4, -47)
[resource]
graph_offset = Vector2(-162.506, 80.4752)
nodes/Add2/node = SubResource("AnimationNodeAdd2_766tv")
nodes/Add2/position = Vector2(260, 80)
"nodes/Add2 2/node" = SubResource("AnimationNodeAdd2_dpb3n")
"nodes/Add2 2/position" = Vector2(540, 80)
nodes/Animation/node = SubResource("AnimationNodeAnimation_u6r87")
nodes/Animation/position = Vector2(-160, 80)
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_080es")
"nodes/Animation 2/position" = Vector2(-160, 200)
"nodes/Animation 3/node" = SubResource("AnimationNodeAnimation_cakye")
"nodes/Animation 3/position" = Vector2(20, 520)
nodes/PunchOneShot/node = SubResource("AnimationNodeOneShot_rfqjk")
nodes/PunchOneShot/position = Vector2(300, 380)
nodes/StateMachine/node = SubResource("AnimationNodeStateMachine_k7175")
nodes/StateMachine/position = Vector2(20, 380)
nodes/output/position = Vector2(780, 80)
node_connections = [&"Add2", 0, &"Animation", &"Add2", 1, &"Animation 2", &"Add2 2", 0, &"Add2", &"Add2 2", 1, &"PunchOneShot", &"PunchOneShot", 0, &"StateMachine", &"PunchOneShot", 1, &"Animation 3", &"output", 0, &"Add2 2"]

View file

@ -0,0 +1,58 @@
class_name CharacterSkin
extends Node3D
@export var main_animation_player : AnimationPlayer
var moving_blend_path := "parameters/StateMachine/move/blend_position"
# False : set animation to "idle"
# True : set animation to "move"
@onready var moving : bool = false : set = set_moving
# Blend value between the walk and run cycle
# 0.0 walk - 1.0 run
@onready var move_speed : float = 0.0 : set = set_moving_speed
@onready var animation_tree : AnimationTree = $AnimationTree
@onready var state_machine : AnimationNodeStateMachinePlayback = animation_tree.get("parameters/StateMachine/playback")
@onready var _step_sound: AudioStreamPlayer3D = $StepSound
@onready var _landing_sound: AudioStreamPlayer3D = $LandingSound
func _ready():
animation_tree.active = true
main_animation_player["playback_default_blend_time"] = 0.1
@rpc("authority", "call_local", "unreliable_ordered")
func set_moving(value : bool):
moving = value
if moving:
state_machine.travel("move")
else:
state_machine.travel("idle")
@rpc("authority", "call_local", "unreliable_ordered")
func set_moving_speed(value : float):
move_speed = clamp(value, 0.0, 1.0)
animation_tree.set(moving_blend_path, move_speed)
@rpc("authority", "call_local", "unreliable_ordered")
func jump():
state_machine.travel("jump")
@rpc("authority", "call_local", "unreliable_ordered")
func fall():
state_machine.travel("fall")
func play_step_sound():
_step_sound.pitch_scale = randfn(1.1, 0.05)
_step_sound.play()
func play_landing_sound():
_landing_sound.play()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,17 @@
[gd_resource type="Animation" format=3 uid="uid://b627b68jhaqwt"]
[resource]
length = 3.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/gdbot_mesh:surface_material_override/2:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.5, 3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.5, 3.0, 0.5]
}

View file

@ -0,0 +1,20 @@
[gd_resource type="Animation" load_steps=3 format=3 uid="uid://diuutac72yquv"]
[ext_resource type="Texture2D" uid="uid://dbag7f8i27ub1" path="res://player/model/faces/open.png" id="1_vbky0"]
[ext_resource type="Texture2D" uid="uid://ci7cn145ld3l5" path="res://player/model/faces/closed.png" id="2_xwfhj"]
[resource]
length = 4.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/gdbot_mesh:surface_material_override/1:shader_parameter/face_texture")
tracks/0/interp = 0
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(1.5, 1.7, 1.9, 2.1, 2.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [ExtResource("1_vbky0"), ExtResource("2_xwfhj"), ExtResource("1_vbky0"), ExtResource("2_xwfhj"), ExtResource("1_vbky0")]
}

View file

@ -0,0 +1,3 @@
[gd_resource type="AnimationNodeStateMachinePlayback" format=3 uid="uid://uhx6kfu45rrc"]
[resource]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci7cn145ld3l5"
path.s3tc="res://.godot/imported/closed.png-3e590ab69a341bea90ae32196457e22a.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://player/model/faces/closed.png"
dest_files=["res://.godot/imported/closed.png-3e590ab69a341bea90ae32196457e22a.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
player/model/faces/open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dbag7f8i27ub1"
path.s3tc="res://.godot/imported/open.png-5012805d48e71003c4f690b36cedcba1.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://player/model/faces/open.png"
dest_files=["res://.godot/imported/open.png-5012805d48e71003c4f690b36cedcba1.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
player/model/gdbot.glb Normal file

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,40 @@
shader_type spatial;
uniform sampler2D face_texture : filter_nearest, repeat_disable;
uniform float intensity = 1.5;
uniform vec4 screen_color : source_color = vec4(1.0);
uniform vec2 screen_red_offset = vec2(0.0);
uniform vec2 screen_green_offset = vec2(0.0);
uniform vec2 screen_blue_offset = vec2(0.0);
uniform float pixel_size = 20.0;
void fragment() {
vec2 scaled_uv = round(UV * pixel_size) / pixel_size;
float face_red = 1.0 - texture(face_texture, screen_red_offset + scaled_uv).x;
float face_green = 1.0 - texture(face_texture, screen_green_offset + scaled_uv).x;
float face_blue = 1.0 - texture(face_texture, screen_blue_offset + scaled_uv).x;
vec2 grid_2d = sin(fract(UV * pixel_size + 0.5) * 3.14);
float grid = grid_2d.x * grid_2d.y;
grid = grid * 0.6 + 0.4;
ALBEDO = vec3(0.0);
SPECULAR = 0.25;
ROUGHNESS = 0.45;
vec3 iris = vec3(0.0);
iris.r = ((screen_color.r * face_red) / 3.0);
iris.g = ((screen_color.g * face_green) / 3.0);
iris.b = ((screen_color.b * face_blue) / 3.0);
iris.rgb *= 1.0 - screen_color.a;
vec3 fill = screen_color.rgb * screen_color.a;
EMISSION = (iris + fill) * grid * intensity;
}

View file

@ -0,0 +1,15 @@
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://dh42cdejchkr3"]
[ext_resource type="Shader" path="res://player/model/materials/face_mat.gdshader" id="1_u8nh3"]
[ext_resource type="Texture2D" uid="uid://ci7cn145ld3l5" path="res://player/model/faces/closed.png" id="2_r4pvf"]
[resource]
render_priority = 0
shader = ExtResource("1_u8nh3")
shader_parameter/intensity = 4.0
shader_parameter/screen_color = Color(0.0784314, 0.556863, 1, 0.00784314)
shader_parameter/screen_red_offset = Vector2(0, 0)
shader_parameter/screen_green_offset = Vector2(0, 0)
shader_parameter/screen_blue_offset = Vector2(0, 0)
shader_parameter/pixel_size = 44.0
shader_parameter/face_texture = ExtResource("2_r4pvf")

View file

@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://4ugdxr58llu8"]
[resource]
transparency = 1
albedo_color = Color(1, 1, 1, 0.443137)
metallic_specular = 1.0
roughness = 0.1

View file

@ -0,0 +1,7 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cq6bdna8ieu87"]
[resource]
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
emission = Color(0, 1, 0.392157, 1)
emission_energy_multiplier = 0.831129

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cbcb2d63weegs"
path="res://.godot/imported/landing.wav-af9f0fb6e2c7495f9e2392633d92b046.sample"
[deps]
source_file="res://player/model/sounds/landing.wav"
dest_files=["res://.godot/imported/landing.wav-af9f0fb6e2c7495f9e2392633d92b046.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

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bx0t7f2nuk2lr"
path="res://.godot/imported/step.wav-79a20c90fb5056e8188ac1531dfedbf8.sample"
[deps]
source_file="res://player/model/sounds/step.wav"
dest_files=["res://.godot/imported/step.wav-79a20c90fb5056e8188ac1531dfedbf8.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