stoop kid is afraid to leave his stoop

This commit is contained in:
2024-09-17 00:07:13 -07:00
parent 60f7c92139
commit 9b8884d459
11 changed files with 2655 additions and 38 deletions

View File

@@ -27,31 +27,31 @@ script = ExtResource("1_qqrlr")
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_oj2cm")
use_collision = true
size = Vector3(10, 10, 10)
size = Vector3(4, 4, 4)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
size = Vector3(3.8, 3.8, 3.8)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.05713e-07, -0.0762184, -1.75306)
operation = 2
size = Vector3(2, 4, 1)
size = Vector3(3.5, 3.65234, 0.5)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.75067, -0.0769043, -2.17967e-08)
operation = 2
size = Vector3(2, 4, 1)
size = Vector3(3.5, 3.65381, 0.5)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -1.50397, -0.0749512, -0.0690359)
operation = 2
size = Vector3(2, 4, 1)
size = Vector3(3.5, 3.6499, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.05912e-07, -0.0749512, 1.50077)
operation = 2
size = Vector3(2, 4, 1)
size = Vector3(3.5, 3.6499, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_ldqn2")

View File

@@ -202,6 +202,10 @@ locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialo
3d_physics/layer_8="Dialogue"
3d_physics/layer_9="Teleport"
[navigation]
3d/default_cell_size=0.5
[physics]
3d/run_on_separate_thread=true

View File

@@ -230,7 +230,8 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
var overlappingBodies = LineOfSight.GetOverlappingBodies();
foreach (var overlap in overlappingBodies)
{
Raycast.LookAt(GameRepo.PlayerGlobalPosition.Value, Vector3.Up);
if (Raycast.GlobalPosition != GameRepo.PlayerGlobalPosition.Value)
Raycast.LookAt(GameRepo.PlayerGlobalPosition.Value, Vector3.Up);
Raycast.ForceRaycastUpdate();
if (Raycast.IsColliding())
{

View File

@@ -21,8 +21,9 @@ namespace GameJamDungeon
enemy.Velocity = (targetPosition - enemy.GlobalTransform.Origin).Normalized() * 2f;
var lookAtDir = enemy.GlobalTransform.Origin - enemy.Velocity;
if (enemy.Velocity != Vector3.Zero)
enemy.LookAt(new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z));
var lookAtPosition = new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z);
if (!enemy.Velocity.IsEqualApprox(Vector3.Zero) && !enemy.GlobalPosition.IsEqualApprox(lookAtPosition))
enemy.LookAt(lookAtPosition);
Output(new Output.MovementComputed());
return ToSelf();

View File

@@ -24,7 +24,8 @@ public partial class EnemyLogic
enemy.Velocity = velocity;
var lookAtDir = enemy.GlobalTransform.Origin - enemy.Velocity;
if (enemy.Velocity != Vector3.Zero)
var lookAtPosition = new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z);
if (!enemy.Velocity.IsEqualApprox(Vector3.Zero) && !enemy.GlobalPosition.IsEqualApprox(lookAtPosition))
enemy.LookAt(new Vector3(lookAtDir.X, enemy.GlobalPosition.Y, lookAtDir.Z));
Output(new Output.MovementComputed());

View File

@@ -244,7 +244,7 @@ public partial class Game : Node3D, IGame
{
GameRepo.PlayerData.SetMaximumVT(GameRepo.PlayerData.MaximumVT.Value + amountToRaise);
GameRepo.PlayerData.SetCurrentVT(GameRepo.PlayerData.MaximumVT.Value);
EmitSignal(SignalName.StatRaisedAlert, $"{amountToRaise}MAX VT Up.");
EmitSignal(SignalName.StatRaisedAlert, $"{amountToRaise}MAXVT Up.");
}
}

View File

@@ -1,11 +1,12 @@
[gd_scene load_steps=6 format=3 uid="uid://bn4gslp2gk8ds"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_y0rqi"]
[ext_resource type="Texture2D" uid="uid://0idh4qh35cp7" path="res://src/map/dungeon/corridor/CORRIDOR test_FLOOR1.jpg" id="3_3adgk"]
[ext_resource type="Script" path="res://src/map/dungeon/corridor/remove_unused_doors.gd" id="3_8i1ij"]
[ext_resource type="Texture2D" uid="uid://b8dow4tvs1ktr" path="res://src/map/dungeon/models/antechamber_1/ANTECHAMBER_TYPE1_VER2_brick3.png" id="3_j31st"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rok2u"]
albedo_texture = ExtResource("3_3adgk")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_q3ft5"]
albedo_texture = ExtResource("3_j31st")
uv1_triplanar = true
[sub_resource type="PlaneMesh" id="PlaneMesh_xt554"]
size = Vector2(4, 4)
@@ -18,34 +19,51 @@ voxel_scale = Vector3(4, 4, 4)
script = ExtResource("3_8i1ij")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
material_override = SubResource("StandardMaterial3D_rok2u")
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_q3ft5")
use_collision = true
size = Vector3(4.12, 4, 4)
size = Vector3(4, 4, 4)
[node name="CSGBox3D" type="CSGBox3D" parent="CSGBox3D"]
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(3.8, 3.8, 3.8)
[node name="DOOR?" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.98957)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000927324, -0.000897169, -1.94666)
operation = 2
size = Vector3(3.8, 3.8, 0.5)
size = Vector3(3.93805, 3.80299, 0.112793)
[node name="DOOR?2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.95178)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.94941, -0.00280762, -0.0253296)
operation = 2
size = Vector3(3.8, 3.8, 0.5)
size = Vector3(3.81653, 3.802, 0.102539)
[node name="DOOR?3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.81713, 0, -0.0274558)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -1.94806, -0.00247192, -0.00629178)
operation = 2
size = Vector3(3.8, 3.8, 0.5)
size = Vector3(3.78564, 3.79486, 0.111816)
[node name="DOOR?4" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 2.06901, 0, -0.0274558)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00830109, -0.00256348, 1.94825)
operation = 2
size = Vector3(3.8, 3.8, 0.5)
size = Vector3(3.75879, 3.79468, 0.105042)
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.90563, 0)
mesh = SubResource("PlaneMesh_xt554")
[node name="NavigationLink3D" type="NavigationLink3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024736, -1.52475, 1.33622)
end_position = Vector3(0, 0, 1)
[node name="NavigationLink3D2" type="NavigationLink3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024736, -1.52475, -1.97697)
end_position = Vector3(0, 0, 1)
[node name="NavigationLink3D3" type="NavigationLink3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.563159, -1.52475, 0.571144)
end_position = Vector3(1, 0, 0)
[node name="NavigationLink3D4" type="NavigationLink3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.385, -1.52475, 0.167886)
end_position = Vector3(1, 0, 0)

View File

@@ -1,11 +1,15 @@
[gd_scene load_steps=6 format=3 uid="uid://bc1sp6xwe0j65"]
[gd_scene load_steps=7 format=3 uid="uid://bc1sp6xwe0j65"]
[ext_resource type="Script" path="res://src/map/dungeon/floors/DungeonFloor.cs" id="1_0ecnn"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="2_cxmwa"]
[ext_resource type="PackedScene" uid="uid://dpec2lbt83dhe" path="res://src/map/dungeon/scenes/Antechamber.tscn" id="3_tsw3y"]
[ext_resource type="PackedScene" uid="uid://b82dx66mgs2d7" path="res://src/map/dungeon/scenes/BasinRoom.tscn" id="4_b2rkl"]
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="4_gni6i"]
[sub_resource type="NavigationMesh" id="NavigationMesh_gqi8w"]
border_size = 1.0
agent_height = 3.0
agent_radius = 0.1
[node name="Floor1" type="Node3D"]
script = ExtResource("1_0ecnn")
@@ -17,7 +21,7 @@ navigation_mesh = SubResource("NavigationMesh_gqi8w")
[node name="DungeonGenerator" type="Node3D" parent="NavigationRegion3D"]
unique_name_in_owner = true
script = ExtResource("2_cxmwa")
room_scenes = Array[PackedScene]([ExtResource("3_tsw3y")])
room_scenes = Array[PackedScene]([ExtResource("3_tsw3y"), ExtResource("4_b2rkl")])
corridor_room_scene = ExtResource("4_gni6i")
dungeon_size = Vector3i(20, 1, 20)
voxel_scale = Vector3(4, 4, 4)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -9,8 +9,8 @@
[sub_resource type="Resource" id="Resource_btp2w"]
script = ExtResource("2_xq68d")
RotationSpeed = 3.0
MoveSpeed = 4.0
RotationSpeed = 1.8
MoveSpeed = 2.5
Acceleration = 1.0
CurrentHP = 100
MaximumHP = 100