feat: final version

This commit is contained in:
Sara Gerretsen 2026-06-26 00:42:47 +02:00
parent 6387bcd926
commit e39b251fd7
34 changed files with 792 additions and 313 deletions

View file

@ -6,6 +6,7 @@
void AreaLoader::_bind_methods() {
BIND_HPROPERTY(Variant::OBJECT, area, PROPERTY_HINT_NODE_TYPE, "Node3D");
BIND_PROPERTY(Variant::BOOL, start_loaded);
BIND_PROPERTY(Variant::BOOL, enables_fog);
}
void AreaLoader::body_entered(Node3D *body) {

View file

@ -15,8 +15,10 @@ protected:
private:
Node3D *area{ nullptr };
bool start_loaded{ false };
bool enables_fog{ false };
public:
GET_SET_FNS(Node3D *, area);
GET_SET_FNS(bool, start_loaded);
GET_SET_FNS(bool, enables_fog);
};

View file

@ -13,6 +13,12 @@ Level *Level::get_singleton() {
void Level::_bind_methods() {
BIND_HPROPERTY(Variant::OBJECT, player_scene, PROPERTY_HINT_RESOURCE_TYPE, "PackedScene");
BIND_HPROPERTY(Variant::OBJECT, default_spawnpoint, PROPERTY_HINT_NODE_TYPE, "Node3D");
BIND_PROPERTY(Variant::BOOL, player_has_spark);
BIND_HPROPERTY(Variant::TRANSFORM3D, last_checkpoint, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR);
ClassDB::bind_static_method(get_class_static(), "get_singleton", &self_type::get_singleton);
ClassDB::bind_method(D_METHOD("respawn"), &self_type::respawn);
ClassDB::bind_method(D_METHOD("checkpoint"), &self_type::checkpoint);
ClassDB::bind_method(D_METHOD("rescue"), &self_type::rescue);
}
void Level::respawn() {

View file

@ -26,8 +26,11 @@ private:
PlayerBody *player{ nullptr };
Transform3D last_checkpoint{};
bool player_has_spark{ false };
public:
GET_SET_FNS(Transform3D, last_checkpoint);
GET_SET_FNS(Ref<PackedScene>, player_scene);
GET_SET_FNS(Node3D *, default_spawnpoint);
GET_SET_FNS(bool, player_has_spark);
};

View file

@ -14,6 +14,7 @@ void PlayerBehaviourTree::_bind_methods() {
BIND_HPROPERTY(Variant::OBJECT, hang_ray, PROPERTY_HINT_NODE_TYPE, "RayCast3D", PROPERTY_USAGE_READ_ONLY);
BIND_HPROPERTY(Variant::OBJECT, ground_ray, PROPERTY_HINT_NODE_TYPE, "RayCast3D", PROPERTY_USAGE_READ_ONLY);
BIND_HPROPERTY(Variant::OBJECT, high_wall_ray, PROPERTY_HINT_NODE_TYPE, "RayCast3D", PROPERTY_USAGE_READ_ONLY);
BIND_HPROPERTY(Variant::OBJECT, dash_effect, PROPERTY_HINT_NODE_TYPE, "Node3D");
ClassDB::bind_method(D_METHOD("get_world_move_input"), &self_type::get_world_move_input);
ClassDB::bind_method(D_METHOD("get_ground_distance"), &self_type::get_ground_distance);
}

View file

@ -27,6 +27,7 @@ private:
RayCast3D *hang_ray{ nullptr };
RayCast3D *ground_ray{ nullptr };
RayCast3D *high_wall_ray{ nullptr };
Node3D *dash_effect{ nullptr };
public:
GET_SET_FNS(RayCast3D *, ground_ray);
@ -36,5 +37,6 @@ public:
GET_SET_FNS(AnimationTree *, anim);
GET_SET_FNS(RayCast3D *, hang_ray);
GET_SET_FNS(RayCast3D *, high_wall_ray);
GET_SET_FNS(Node3D *, dash_effect);
float get_ground_distance() const;
};

Binary file not shown.

View file

@ -4,14 +4,19 @@
[node name="PlayerModel" unique_id=1710695753 instance=ExtResource("1_1oybq")]
[node name="HumanArmature" parent="." index="0" unique_id=1896649604]
[node name="HumanArmature" parent="." index="0" unique_id=93785257]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[node name="Eyes" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(1440142689) index="2" unique_id=1884078126]
[node name="Eyes" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(205110424) index="2" unique_id=654698670]
layers = 3
[node name="Mouth" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(1440142689) index="4" unique_id=224250952]
[node name="Mouth" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(205110424) index="4" unique_id=769921609]
layers = 3
[node name="Skin" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(1440142689) index="6" unique_id=579811232]
[node name="Skates" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(205110424) index="5" unique_id=548640118]
unique_name_in_owner = true
visible = false
[node name="Skin" parent="HumanArmature/Skeleton3D" parent_id_path=PackedInt32Array(205110424) index="6" unique_id=483301328]
unique_name_in_owner = true
instance_shader_parameters/health = 1.0

View file

@ -24,7 +24,7 @@ shader_parameter/under_layer_albedo = ExtResource("3_i1ahx")
shader_parameter/under_layer_normal = ExtResource("4_thik8")
shader_parameter/under_layer_depth = ExtResource("4_i1ahx")
shader_parameter/under_layer_scale = 8.171
shader_parameter/under_layer_depth_scale = 0.081
shader_parameter/max_depth_layers = 500.0
shader_parameter/min_depth_layers = 100.0
shader_parameter/under_layer_depth_scale = 0.1
shader_parameter/max_depth_layers = 250.0
shader_parameter/min_depth_layers = 1.0
shader_parameter/under_emission_strength = 0.052

BIN
project/assets/effects/dash.blend (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,71 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bawuxm5g5jh1e"
path="res://.godot/imported/dash.blend-5e38ccffb224728e129d1833d9ef4d43.scn"
[deps]
source_file="res://assets/effects/dash.blend"
dest_files=["res://.godot/imported/dash.blend-5e38ccffb224728e129d1833d9ef4d43.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
mesh_library/use_node_names_as_mesh_names=false
array_mesh/deduplicate_surfaces=true
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Material": {
"use_external/enabled": true,
"use_external/fallback_path": "res://assets/materials/kaleidoscope_mosaic.tres",
"use_external/path": "uid://6ton7xdddycw"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/vertex_colors=1
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2
gltf/texture_map_mode=1

Binary file not shown.

View file

@ -1,6 +1,20 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cirdfdncgft7o"]
[gd_resource type="ShaderMaterial" format=3 uid="uid://cirdfdncgft7o"]
[sub_resource type="Shader" id="Shader_rp0qo"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.8.dev's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, unshaded, shadows_disabled;
void vertex() {
}
void fragment() {
vec2 base_uv = UV;
ALBEDO = vec3(0);
}
"
[resource]
cull_mode = 2
shading_mode = 0
albedo_color = Color(0, 0, 0, 1)
render_priority = 0
shader = SubResource("Shader_rp0qo")

View file

@ -1,11 +1,14 @@
shader_type spatial;
render_mode cull_disabled, blend_mix, depth_prepass_alpha, unshaded;
render_mode cull_back, blend_mix, depth_prepass_alpha;
group_uniforms Albedo;
uniform vec3 color_modulation : source_color;
uniform sampler2D color : source_color, hint_default_white;
uniform float triplanar_scale = 1.0;
group_uniforms Normal;
uniform sampler2D normal : hint_normal;
group_uniforms FresnelOutline;
uniform float alpha_min : hint_range(0, 1) = 0.02;
uniform float alpha_max : hint_range(0, 1) = 1.0;
@ -33,8 +36,10 @@ void fragment() {
vec2 uv_y = vec2(local_position.z, local_position.x);
vec2 uv_z = vec2(local_position.x, local_position.y);
vec2 uv = ((weights.y > weights.x && weights.y > weights.z ? uv_y : (weights.x > weights.z ? uv_x : uv_z)));
vec4 sample = mix(texture(color, uv * triplanar_scale - vec2(0, TIME)), texture(color, uv + vec2(0, TIME)), 0.35);
vec2 moving_uv = uv * triplanar_scale - vec2(0, TIME);
vec4 sample = mix(texture(color, moving_uv), texture(color, uv + vec2(0, TIME)), 0.35);
ALBEDO = sample.rgb * color_modulation;
NORMAL_MAP = texture(normal, moving_uv).rgb;
float damage_adjusted = (step(texture(damage_map, vec2(0.5) + uv).r, 1.0 - damage * 1.01));
ALPHA = clamp(mix(alpha_min, alpha_max, smoothstep(fresnel_start, fresnel_end, 1.0 - dot(NORMAL, VIEW))) * sample.a, 0.0, 1.0) * damage_adjusted;
EMISSION = ALBEDO * emission * ALPHA;

View file

@ -3,6 +3,7 @@
[ext_resource type="Shader" uid="uid://b3gr12o27c4ah" path="res://assets/effects/kaleidoscope_shield.gdshader" id="1_is1u6"]
[ext_resource type="Texture2D" uid="uid://cda6w3283bwgr" path="res://assets/materials/kaleidoscope_mosaic_gray_emission.png" id="2_7x4lx"]
[ext_resource type="Texture2D" uid="uid://cwiwjin51th2h" path="res://assets/effects/cracks_albedo.png" id="3_o016t"]
[ext_resource type="Texture2D" uid="uid://dwskfat6ut10d" path="res://assets/materials/kaleidoscope_mosaic_normal.png" id="4_fulgk"]
[resource]
render_priority = 0
@ -10,6 +11,7 @@ shader = ExtResource("1_is1u6")
shader_parameter/color_modulation = Color(0.96699256, 0.00025182008, 0.84386754, 1)
shader_parameter/color = ExtResource("2_7x4lx")
shader_parameter/triplanar_scale = 0.489
shader_parameter/normal = ExtResource("4_fulgk")
shader_parameter/alpha_min = 0.03600000171
shader_parameter/alpha_max = 1.0
shader_parameter/fresnel_start = 0.2710000128725

View file

@ -10,7 +10,7 @@ albedo_texture = ExtResource("1")
metallic = 1.0
roughness = 0.19
emission_enabled = true
emission_energy_multiplier = 0.03
emission_energy_multiplier = 1.82
emission_texture = ExtResource("5")
normal_enabled = true
normal_texture = ExtResource("3")

BIN
project/assets/ui/switch_buttons_down_outline.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://g8v0vq12w10h"
path="res://.godot/imported/switch_buttons_down_outline.png-4ada50baa5d3e13614ab291c70f34d3f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/switch_buttons_down_outline.png"
dest_files=["res://.godot/imported/switch_buttons_down_outline.png-4ada50baa5d3e13614ab291c70f34d3f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
project/assets/ui/xbox_rt.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsgpjaxd5ty31"
path="res://.godot/imported/xbox_rt.png-4f38fe203015c993532d52c709ae1aa4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/xbox_rt.png"
dest_files=["res://.godot/imported/xbox_rt.png-4f38fe203015c993532d52c709ae1aa4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
project/assets/ui/xbox_stick_top_r.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgronuqonn8qr"
path="res://.godot/imported/xbox_stick_top_r.png-04653a6c319201981af7657cc84f719b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/ui/xbox_stick_top_r.png"
dest_files=["res://.godot/imported/xbox_stick_top_r.png-04653a6c319201981af7657cc84f719b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -27,6 +27,12 @@ tonemap_mode = 2
glow_enabled = true
glow_normalized = true
glow_strength = 2.0
fog_mode = 1
fog_light_color = Color(0, 0, 0, 1)
fog_density = 1.0
fog_sky_affect = 0.0
fog_height = -3.57
fog_height_density = 2.4199
adjustment_enabled = true
adjustment_brightness = 0.9
adjustment_contrast = 1.055

View file

@ -25,6 +25,7 @@
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wqmfy"]
cull_mode = 2
disable_fog = true
albedo_texture = ExtResource("16_xk1ky")
metallic = 1.0
roughness = 0.19
@ -7620,8 +7621,8 @@ transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -43,
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -46, 0, 61)
[node name="CSGBox3D3" type="CSGBox3D" parent="Area" unique_id=1411597639]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.813, -24.664265, 53.5)
size = Vector3(92, 39, 106)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -27.353527, -24.664265, 73)
size = Vector3(103.081055, 39, 145)
material = ExtResource("18_vsqsw")
[node name="Deathbox" type="Deathbox" parent="Area" unique_id=838339085]

File diff suppressed because one or more lines are too long

View file

@ -10,6 +10,8 @@
[ext_resource type="PackedScene" uid="uid://bl7tlfjeo0bq4" path="res://assets/environment/props/metro/escalator.blend" id="6_b5kel"]
[ext_resource type="PackedScene" uid="uid://c8bcv3dfoxl72" path="res://assets/environment/props/warning/warning.blend" id="9_tj0ty"]
[ext_resource type="PackedScene" uid="uid://s0r8hrc5iqkd" path="res://assets/environment/props/warning/warning_torn.blend" id="10_lqnq6"]
[ext_resource type="PackedScene" uid="uid://daenxcayeles4" path="res://objects/walljump_tutorial.tscn" id="11_lqnq6"]
[ext_resource type="PackedScene" uid="uid://tiaaxxcuwor6" path="res://objects/wallrun_tutorial.tscn" id="12_3ypbs"]
[sub_resource type="BoxShape3D" id="BoxShape3D_exgcw"]
size = Vector3(15.281006, 8.420197, 51.017685)
@ -17,6 +19,24 @@ size = Vector3(15.281006, 8.420197, 51.017685)
[sub_resource type="BoxShape3D" id="BoxShape3D_tj0ty"]
size = Vector3(33, 13.337051, 31.7095)
[sub_resource type="GDScript" id="GDScript_rq2s6"]
resource_name = "WalljumpTutorial"
script/source = "extends Area3D
@export var tutorial : PackedScene
func _body_entered(body : Node3D):
if body is PlayerBody:
queue_free()
get_tree().current_scene.add_child(tutorial.instantiate())
func _ready():
body_entered.connect(_body_entered)
"
[sub_resource type="BoxShape3D" id="BoxShape3D_sewij"]
size = Vector3(5.4970703, 4.0565186, 1)
[node name="Station" type="Node3D" unique_id=1757986756]
[node name="WorldEnvironment" parent="." unique_id=1373429783 instance=ExtResource("1_eb8x3")]
@ -470,3 +490,21 @@ shape = SubResource("BoxShape3D_exgcw")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="AreaLoader" unique_id=1153976701]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.2407227, 12.138997, -21.171297)
shape = SubResource("BoxShape3D_tj0ty")
[node name="Area3D" type="Area3D" parent="." unique_id=468770038]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.3858762, 4.1318064, -26.879488)
script = SubResource("GDScript_rq2s6")
tutorial = ExtResource("11_lqnq6")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=928012505]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5282593, 0)
shape = SubResource("BoxShape3D_sewij")
[node name="Area3D2" type="Area3D" parent="." unique_id=617395543]
transform = Transform3D(0.008007874, 0, 0.99996793, 0, 1, 0, -0.99996793, 0, 0.008007874, 9.741101, 8.072539, -30.721243)
script = SubResource("GDScript_rq2s6")
tutorial = ExtResource("12_3ypbs")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D2" unique_id=698084532]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5282593, 0)
shape = SubResource("BoxShape3D_sewij")

View file

@ -10,6 +10,7 @@
[ext_resource type="Texture2D" uid="uid://dwskfat6ut10d" path="res://assets/materials/kaleidoscope_mosaic_normal.png" id="8_re8x6"]
[ext_resource type="PackedScene" uid="uid://dd4jygipdkpbs" path="res://levels/appartments.tscn" id="9_687qm"]
[ext_resource type="PackedScene" uid="uid://dn2b7abjjel6j" path="res://levels/appartments_under_ground.tscn" id="10_lmpr0"]
[ext_resource type="PackedScene" uid="uid://cvbq7ph33goqo" path="res://objects/tutorial.tscn" id="11_re8x6"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wqmfy"]
albedo_texture = ExtResource("5_legw5")
@ -97,3 +98,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 36.84496, 1.9508343, 15.17116
[node name="CollisionShape3D" type="CollisionShape3D" parent="Checkpoint3" unique_id=1155112272]
shape = SubResource("BoxShape3D_lmpr0")
[node name="Control" parent="." unique_id=1821604268 instance=ExtResource("11_re8x6")]

View file

@ -0,0 +1,8 @@
[gd_scene format=3 uid="uid://dsnrexoq3d6o5"]
[ext_resource type="PackedScene" uid="uid://cvbq7ph33goqo" path="res://objects/tutorial.tscn" id="1_5b0u7"]
[node name="Control" unique_id=1821604268 instance=ExtResource("1_5b0u7")]
[node name="RichTextLabel" parent="." index="1" unique_id=1486642354]
text = "Press [img]res://assets/ui/xbox_rt.png[/img] to Dash"

View file

@ -2,6 +2,7 @@
[ext_resource type="PackedScene" uid="uid://c1g1vy67lf550" path="res://assets/character/player/player.tscn" id="1_eqqp1"]
[ext_resource type="Environment" uid="uid://14b3gterja03" path="res://data/world_environment.tres" id="2_ykyjo"]
[ext_resource type="PackedScene" uid="uid://bawuxm5g5jh1e" path="res://assets/effects/dash.blend" id="3_uxov2"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
radius = 0.4
@ -227,20 +228,38 @@ script/source = "extends PlayerAction
var start_direction : Vector3
@export var speed : float
@export var exit_speed : float
@export var max_distance : float
var start_position : Vector3
var reset : bool = false
func _enter() -> int:
if Input.is_action_pressed(\"dash\") and not blackboard.move_input.is_zero_approx():
if not Level.get_singleton().player_has_spark:
return Fail
if body.is_on_floor():
reset = true
if reset and Input.is_action_just_pressed(\"dash\") and not blackboard.move_input.is_zero_approx():
start_direction = blackboard.get_world_move_input()
blackboard.character.set_visible(false)
blackboard.dash_effect.set_visible(true)
start_position = body.global_position
return Running
return Fail
func _execute() -> int:
if status != Running:
return status
if not Input.is_action_pressed(\"dash\") or body.is_on_wall():
if body.is_on_wall() or start_position.distance_to(body.global_position) >= max_distance:
blackboard.character.set_visible(true)
blackboard.dash_effect.set_visible(false)
body.velocity = body.velocity.normalized() * exit_speed
return Success
else:
blackboard.dash_effect.look_at(blackboard.dash_effect.global_position + start_direction)
body.velocity = start_direction * speed
reset = false
return Running
"
@ -515,8 +534,9 @@ fov = 96.8
target_distance = 1.7
origin_height = 0.6
[node name="PlayerBehaviourTree" type="PlayerBehaviourTree" parent="." unique_id=1439326326 node_paths=PackedStringArray("character")]
[node name="PlayerBehaviourTree" type="PlayerBehaviourTree" parent="." unique_id=1439326326 node_paths=PackedStringArray("character", "dash_effect")]
character = NodePath("../PlayerModel")
dash_effect = NodePath("../dash")
[node name="BehaviourRepeater" type="BehaviourRepeater" parent="PlayerBehaviourTree" unique_id=766320099]
@ -525,6 +545,8 @@ character = NodePath("../PlayerModel")
[node name="DashUpgrade" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=2076145534]
script = SubResource("GDScript_exgcw")
speed = 25.0
exit_speed = 10.0
max_distance = 5.0
[node name="LedgeHangSequence" type="BehaviourSequence" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=285489367]
@ -583,3 +605,7 @@ script = SubResource("GDScript_bxedw")
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=647455591]
environment = ExtResource("2_ykyjo")
[node name="dash" parent="." unique_id=1544716002 instance=ExtResource("3_uxov2")]
transform = Transform3D(0.5618518, 0, 0, 0, 0.5618518, 0, 0, 0, 0.5618518, 0, 0, 0)
visible = false

View file

@ -0,0 +1,75 @@
[gd_scene format=3 uid="uid://bnu1873dubfwk"]
[ext_resource type="Material" uid="uid://6ton7xdddycw" path="res://assets/materials/kaleidoscope_mosaic.tres" id="1_xvbr8"]
[sub_resource type="GDScript" id="GDScript_exgcw"]
resource_name = "ShieldDestroyer"
script/source = "extends Area3D
@export var shield : MeshInstance3D
@export var trajectory_height : float
@export var trajectory_speed : float
@export var trajectory_acceleration : float
@export var target_distance : float
var time : float = 0
@onready var start : Vector3 = global_position
@onready var target_position : Vector3 = shield.global_position + (shield.global_position - start).normalized() * target_distance
var fly : bool = false
func eval_trajectory(t : float) -> Vector3:
return lerp(start, target_position, t) + Vector3(0.0, sin(sqrt(t) * PI), 0) * trajectory_height
func _process(delta : float):
if not fly:
return
time += delta * trajectory_speed
var t : float = pow(time, trajectory_acceleration)
look_at_from_position(eval_trajectory(t), eval_trajectory(t+0.1))
if t >= 1.0:
var shield_damage : float = shield.get_instance_shader_parameter(\"damage\") + 0.25
shield.set_instance_shader_parameter(\"damage\", shield_damage)
queue_free()
fly = false
if shield_damage >= 0.99:
shield.get_parent().destroyed()
func _body_entered(body : Node3D):
if body is PlayerBody:
body_entered.disconnect(_body_entered)
fly = true
func _ready():
body_entered.connect(_body_entered)
"
[sub_resource type="BoxMesh" id="BoxMesh_xvbr8"]
material = ExtResource("1_xvbr8")
size = Vector3(0.25, 0.25, 0.25)
[sub_resource type="BoxMesh" id="BoxMesh_i3xuq"]
material = ExtResource("1_xvbr8")
size = Vector3(0.25, 0.25, 0.25)
[sub_resource type="SphereShape3D" id="SphereShape3D_exgcw"]
radius = 0.29481274
[node name="ShieldDestroyer" type="Area3D" unique_id=987592776]
script = SubResource("GDScript_exgcw")
trajectory_height = 5.0
trajectory_speed = 1.0
trajectory_acceleration = 5.0
target_distance = 2.0
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=536025302]
transform = Transform3D(0.90197194, -0.15605302, -0.40260923, -0.355047, 0.2626082, -0.89720595, 0.24574009, 0.9521997, 0.18145907, -0.00020039082, 0.0007646084, -0.00036668777)
mesh = SubResource("BoxMesh_xvbr8")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="." unique_id=1588132297]
transform = Transform3D(0.90472734, -0.33938178, 0.257465, 0.4109857, 0.8543955, -0.3179605, -0.11206702, 0.393482, 0.9124762, -0.00020039082, 0.0007646084, -0.00036668777)
mesh = SubResource("BoxMesh_i3xuq")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1756671502]
shape = SubResource("SphereShape3D_exgcw")

View file

@ -0,0 +1,28 @@
[gd_scene format=3 uid="uid://cvbq7ph33goqo"]
[node name="Control" type="Control" unique_id=1821604268]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Timer" type="Timer" parent="." unique_id=1325727148]
wait_time = 6.0
one_shot = true
autostart = true
[node name="RichTextLabel" type="RichTextLabel" parent="." unique_id=1486642354]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/normal_font_size = 64
bbcode_enabled = true
text = "Move [img]res://assets/ui/xbox_stick_top_r.png[/img] to run
Press [img]res://assets/ui/switch_buttons_down_outline.png[/img] to jump"
[connection signal="timeout" from="Timer" to="." method="queue_free"]

View file

@ -0,0 +1,10 @@
[gd_scene format=3 uid="uid://daenxcayeles4"]
[ext_resource type="PackedScene" uid="uid://cvbq7ph33goqo" path="res://objects/tutorial.tscn" id="1_1pj35"]
[node name="Control" unique_id=1821604268 instance=ExtResource("1_1pj35")]
[node name="RichTextLabel" parent="." index="1" unique_id=1486642354]
text = "Jump against a wall to grip it
Press [img]res://assets/ui/switch_buttons_down_outline.png[/img] while gripping a wall to jump away
Push [img]res://assets/ui/xbox_stick_top_r.png[/img] away from the wall to let go"

View file

@ -0,0 +1,9 @@
[gd_scene format=3 uid="uid://tiaaxxcuwor6"]
[ext_resource type="PackedScene" uid="uid://cvbq7ph33goqo" path="res://objects/tutorial.tscn" id="1_wnurv"]
[node name="Control" unique_id=1821604268 instance=ExtResource("1_wnurv")]
[node name="RichTextLabel" parent="." index="1" unique_id=1486642354]
text = "Jump against walls at an angle and push [img]res://assets/ui/xbox_stick_top_r.png[/img] forward to wallrun
Push [img]res://assets/ui/xbox_stick_top_r.png[/img] into the wall to stop running"