Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 3e77722

Browse files
committed
continued
1 parent 4fe40a3 commit 3e77722

9 files changed

Lines changed: 694 additions & 643 deletions

File tree

scenes/levels/BigTree/insideBigTree.tscn

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
[gd_scene load_steps=3 format=4 uid="uid://xy3d46bjniyg"]
1+
[gd_scene load_steps=4 format=4 uid="uid://xy3d46bjniyg"]
22

33
[ext_resource type="TileSet" uid="uid://b57mlmhoqye7c" path="res://assets/hauntedForestVillage/Interior.tres" id="1_wfbfv"]
44
[ext_resource type="PackedScene" uid="uid://d0natjkfu7hhd" path="res://scenes/prefabs/ai_node.tscn" id="2_xymdw"]
5+
[ext_resource type="Texture2D" uid="uid://bd3coeghrdgny" path="res://assets/sprites/Unconscious.png" id="3_7m0hj"]
56

67
[node name="StaticBody2D" type="StaticBody2D"]
78

@@ -13,7 +14,7 @@ tile_set = ExtResource("1_wfbfv")
1314
rendering_quadrant_size = 32
1415

1516
[node name="FloorWalls2" type="TileMapLayer" parent="InsideBigHouse"]
16-
tile_map_data = PackedByteArray("AAD7//7/AAAfAAgAAAD8//7/AAAfAAgAAAAAAP7/AAAfAAgAAAABAP7/AAAfAAgAAAD9////AAAfAAgAAAD+////AAAfAAgAAAD/////AAAfAAgAAAACAP3/AAAfAAgAAAD6//3/AAAfAAgAAAD6//j/AAASAAAAAAD7//f/AAASAAAAAAD8//f/AAASAAAAAAD9//b/AAASAAAAAAD+//b/AAASAAAAAAD///b/AAASAAAAAAAAAPf/AAASAAAAAAABAPf/AAASAAAAAAACAPj/AAASAAAAAAADAPj/AAAhAAAAAAAAAPb/AAAhAAAAAAACAPf/AAAhAAAAAAADAP3/AAAhAAgAAAACAP7/AAAhAAgAAAAAAP//AAAhAAgAAAD8////AAAQAAgAAAD6//7/AAAQAAgAAAD5//3/AAAQAAgAAAD5//j/AAAQAAAAAAD6//f/AAAQAAAAAAD8//b/AAAQAAAAAAA=")
17+
tile_map_data = PackedByteArray("AAD7//7/AAAfAAgAAAD8//7/AAAfAAgAAAAAAP7/AAAfAAgAAAABAP7/AAAfAAgAAAACAP3/AAAfAAgAAAD6//3/AAAfAAgAAAD6//j/AAASAAAAAAD7//f/AAASAAAAAAD8//f/AAASAAAAAAD9//b/AAASAAAAAAD+//b/AAASAAAAAAD///b/AAASAAAAAAAAAPf/AAASAAAAAAABAPf/AAASAAAAAAACAPj/AAASAAAAAAADAPj/AAAhAAAAAAAAAPb/AAAhAAAAAAACAPf/AAAhAAAAAAADAP3/AAAhAAgAAAACAP7/AAAhAAgAAAAAAP//AAAhAAgAAAD8////AAAQAAgAAAD6//7/AAAQAAgAAAD5//3/AAAQAAgAAAD5//j/AAAQAAAAAAD6//f/AAAQAAAAAAD8//b/AAAQAAAAAAD9////AAASAAgAAAD/////AAATAAgAAAA=")
1718
tile_set = ExtResource("1_wfbfv")
1819
rendering_quadrant_size = 32
1920

@@ -33,3 +34,9 @@ ObjectName = "Unconscious man"
3334
ObjectDescription = "An unconscious man that doesn't seem to react to anything and can obviously not wake up. Maybe loot"
3435
RemovedAfter = false
3536
CustomOverrideMessage = "You've found a Chipcard. Seems to work like a key to some door. "
37+
38+
[node name="Sprite2D" type="Sprite2D" parent="Unconscious man"]
39+
position = Vector2(0, -1)
40+
rotation = -1.54128
41+
scale = Vector2(0.53125, 0.53125)
42+
texture = ExtResource("3_7m0hj")

scenes/levels/ExampleScene.tscn

Lines changed: 79 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=136 format=4 uid="uid://dfkwq6qwtxw25"]
1+
[gd_scene load_steps=137 format=4 uid="uid://dfkwq6qwtxw25"]
22

33
[ext_resource type="Script" path="res://scripts/EnemyManager.cs" id="1_bmkfv"]
44
[ext_resource type="Script" path="res://scripts/Map.cs" id="1_pa1ge"]
@@ -17,7 +17,7 @@
1717
[ext_resource type="Script" path="res://scripts/WalkOverSound.cs" id="16_yq8ar"]
1818
[ext_resource type="Texture2D" uid="uid://desfy4vbdj1ld" path="res://assets/tilemaps/TX Props.png" id="18_mna0q"]
1919
[ext_resource type="Texture2D" uid="uid://dtw1kjrq4qor4" path="res://assets/tilemaps/TX Tileset Grass.png" id="19_jd32h"]
20-
[ext_resource type="PackedScene" uid="uid://cth35h6b6wlx7" path="res://scenes/levels/HauntedForest/insideSmallHouse.tscn" id="19_qd0ov"]
20+
[ext_resource type="PackedScene" path="res://scenes/levels/HauntedForest/insideSmallHouse.tscn" id="19_qd0ov"]
2121
[ext_resource type="Texture2D" uid="uid://cmooytb3c0mki" path="res://assets/sprites/Pasted image.png" id="20_lgqcj"]
2222
[ext_resource type="Script" path="res://scripts/Interaction/ItemAdder.cs" id="21_2au4o"]
2323
[ext_resource type="Script" path="res://scripts/AI/AiNode.cs" id="22_8wkxe"]
@@ -58,7 +58,8 @@
5858
[ext_resource type="Texture2D" uid="uid://b1n85g1blpu64" path="res://assets/tilemaps/Houses.png" id="49_pb6br"]
5959
[ext_resource type="Texture2D" uid="uid://cmy47y4t8sx0w" path="res://assets/sprites/BigTree.ShrubberyAnimation.png" id="58_5gqqc"]
6060
[ext_resource type="PackedScene" uid="uid://xy3d46bjniyg" path="res://scenes/levels/BigTree/insideBigTree.tscn" id="58_llp75"]
61-
[ext_resource type="PackedScene" uid="uid://dkj8strm3dfar" path="res://scenes/prefabs/teleport.tscn" id="59_8fv5o"]
61+
[ext_resource type="PackedScene" path="res://scenes/prefabs/teleport.tscn" id="59_8fv5o"]
62+
[ext_resource type="PackedScene" uid="uid://cb7y0rhixpx4d" path="res://scenes/prefabs/destination.tscn" id="60_mti2g"]
6263

6364
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qwcva"]
6465
bg_color = Color(0.6, 0.6, 0.6, 0.654902)
@@ -14983,35 +14984,35 @@ b = Vector2(-14, 132)
1498314984
a = Vector2(-11, -257)
1498414985
b = Vector2(-11, -7)
1498514986

14986-
[sub_resource type="Animation" id="Animation_kiuqu"]
14987-
resource_name = "TreeAnimation"
14988-
step = 0.1
14987+
[sub_resource type="Animation" id="Animation_j2l0q"]
14988+
length = 0.001
1498914989
tracks/0/type = "value"
1499014990
tracks/0/imported = false
1499114991
tracks/0/enabled = true
1499214992
tracks/0/path = NodePath(".:frame")
1499314993
tracks/0/interp = 1
1499414994
tracks/0/loop_wrap = true
1499514995
tracks/0/keys = {
14996-
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8),
14997-
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
14996+
"times": PackedFloat32Array(0),
14997+
"transitions": PackedFloat32Array(1),
1499814998
"update": 1,
14999-
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8]
14999+
"values": [0]
1500015000
}
1500115001

15002-
[sub_resource type="Animation" id="Animation_j2l0q"]
15003-
length = 0.001
15002+
[sub_resource type="Animation" id="Animation_kiuqu"]
15003+
resource_name = "TreeAnimation"
15004+
step = 0.1
1500415005
tracks/0/type = "value"
1500515006
tracks/0/imported = false
1500615007
tracks/0/enabled = true
1500715008
tracks/0/path = NodePath(".:frame")
1500815009
tracks/0/interp = 1
1500915010
tracks/0/loop_wrap = true
1501015011
tracks/0/keys = {
15011-
"times": PackedFloat32Array(0),
15012-
"transitions": PackedFloat32Array(1),
15012+
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8),
15013+
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
1501315014
"update": 1,
15014-
"values": [0]
15015+
"values": [0, 1, 2, 3, 4, 5, 6, 7, 8]
1501515016
}
1501615017

1501715018
[sub_resource type="Animation" id="Animation_qm3ix"]
@@ -15404,15 +15405,15 @@ scale = Vector2(0.999999, 0.999999)
1540415405

1540515406
[node name="InsideBigHouse" type="Node2D" parent="Abandoned Village/Sprite2D"]
1540615407
z_index = 2
15407-
position = Vector2(-221, -475.001)
15408+
position = Vector2(5807.01, -4040)
1540815409
script = ExtResource("25_0y114")
1540915410
SceneToShow = ExtResource("26_vmw0c")
1541015411
Radius = 500
1541115412
ItemActivationStatus = false
1541215413

1541315414
[node name="InsideBigHouse2" parent="Abandoned Village/Sprite2D" instance=ExtResource("26_vmw0c")]
1541415415
z_index = 30
15415-
position = Vector2(-222, -200.001)
15416+
position = Vector2(5812.01, -3628)
1541615417
scale = Vector2(3.7, 6.5)
1541715418

1541815419
[node name="VisibleForAI" type="Node2D" parent="Abandoned Village/Sprite2D"]
@@ -15452,6 +15453,7 @@ MusicPlayer2 = NodePath("../../AudioManager/creepy_music")
1545215453
[node name="Node2D" type="Node2D" parent="Abandoned Village"]
1545315454

1545415455
[node name="Sprite2D" type="Sprite2D" parent="Abandoned Village/Node2D"]
15456+
position = Vector2(8097, -5543)
1545515457

1545615458
[node name="InsideSmallHouse" parent="Abandoned Village/Node2D/Sprite2D" instance=ExtResource("19_qd0ov")]
1545715459
z_index = 30
@@ -15514,7 +15516,7 @@ script = ExtResource("6_7bcmx")
1551415516
NameForAi = "Torch"
1551515517

1551615518
[node name="Torch" parent="." instance=ExtResource("13_05imv")]
15517-
position = Vector2(5631, -5569)
15519+
position = Vector2(11335, -9281)
1551815520
ObjectName = "Torch"
1551915521
ObjectDescription = "An unlit Torch, engraved with ceremonial runes. It seems to important to just be burned, maybe it functions differently then a regular torch"
1552015522
ObjectHint = "Tell the commander about the object you just spotted. You may use the command [INTERACT] or [GOTO AND INTERACT]."
@@ -15969,12 +15971,65 @@ scale = Vector2(3.5, 3.5)
1596915971
texture = ExtResource("58_5gqqc")
1597015972
hframes = 17
1597115973

15972-
[node name="Teleport" parent="." instance=ExtResource("59_8fv5o")]
15973-
position = Vector2(5994, -7764)
15974-
X = 9641
15975-
Y = -8454
15976-
Length = 100
15974+
[node name="InsideBigTree" parent="." instance=ExtResource("58_llp75")]
15975+
position = Vector2(9634, -8452)
15976+
scale = Vector2(5.81, 5.81)
15977+
15978+
[node name="TeleportNodes" type="Node" parent="."]
15979+
15980+
[node name="Teleport" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
15981+
position = Vector2(8245, -5525)
15982+
Length = 150
1597715983
Width = 20
15984+
Destination = NodePath("../Destination")
1597815985

15979-
[node name="InsideBigTree" parent="." instance=ExtResource("58_llp75")]
15980-
position = Vector2(9641, -8454)
15986+
[node name="Teleport2" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
15987+
position = Vector2(12094, -6034)
15988+
Length = 150
15989+
Width = 10
15990+
Destination = NodePath("../Destination2")
15991+
15992+
[node name="Teleport3" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
15993+
position = Vector2(8391, -2350)
15994+
scale = Vector2(0.999999, 0.999999)
15995+
Length = 150
15996+
Width = 10
15997+
Destination = NodePath("../Destination3")
15998+
15999+
[node name="Teleport4" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
16000+
position = Vector2(14412, -5950)
16001+
scale = Vector2(0.999999, 0.999999)
16002+
Length = 200
16003+
Width = 10
16004+
Destination = NodePath("../Destination4")
16005+
16006+
[node name="Teleport5" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
16007+
position = Vector2(9147, -401)
16008+
Length = 150
16009+
Width = 10
16010+
Destination = NodePath("../Destination5")
16011+
16012+
[node name="Teleport6" parent="TeleportNodes" node_paths=PackedStringArray("Destination") instance=ExtResource("59_8fv5o")]
16013+
position = Vector2(17248, -6058)
16014+
Length = 200
16015+
Width = 10
16016+
Destination = NodePath("../Destination6")
16017+
16018+
[node name="Destination" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16019+
position = Vector2(12091, -6203)
16020+
16021+
[node name="Destination2" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16022+
position = Vector2(8246, -5413)
16023+
16024+
[node name="Destination3" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16025+
position = Vector2(14412, -6109)
16026+
scale = Vector2(0.999999, 0.999999)
16027+
16028+
[node name="Destination4" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16029+
position = Vector2(8388, -2284)
16030+
16031+
[node name="Destination5" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16032+
position = Vector2(17248, -6144)
16033+
16034+
[node name="Destination6" parent="TeleportNodes" instance=ExtResource("60_mti2g")]
16035+
position = Vector2(9149, -333)

scenes/prefabs/destination.tscn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[gd_scene format=3 uid="uid://cb7y0rhixpx4d"]
2+
3+
[node name="Destination" type="Node2D"]

scripts/AI/GeminiService.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,8 @@ public bool IsBusy()
9393

9494
string? result = null;
9595
int tryCount = 0;
96-
while (result is null && tryCount <= 3) // try to get a response 3 times
96+
while (result is null && tryCount++ <= 3) // try to get a response 3 times
9797
{
98-
tryCount++;
9998
result = await InternalSendMessage(input);
10099
if (result == null)
101100
{
@@ -108,13 +107,7 @@ public bool IsBusy()
108107
{
109108
GD.Print("tried 3 times but didn't get a response. Giving up now.");
110109
}
111-
else
112-
{
113-
int waitingTimeInMs = (int)(1000 * 0.01f * result!.Length);
114-
GD.Print("got response of length: " + result!.Length + ". Waiting for: " +
115-
waitingTimeInMs + " ms.");
116-
await Task.Delay(waitingTimeInMs);
117-
}
110+
118111
return result;
119112
}
120113
finally

0 commit comments

Comments
 (0)