diff --git a/Characters/Meldewesen/Meldewesen.gd b/Characters/Meldewesen/Meldewesen.gd index b5ab9ae..781a8fa 100644 --- a/Characters/Meldewesen/Meldewesen.gd +++ b/Characters/Meldewesen/Meldewesen.gd @@ -29,7 +29,7 @@ var _lastSound = 0 # timestamp of last played message var _countCmds = 0 # count of spoken commands -> after MAX_CMDS Meldewesen gets pissy func _ready(): - Logger.set_logger_level(Logger.LOG_LEVEL_FINE) + #Logger.set_logger_level(Logger.LOG_LEVEL_FINE) _audioPlayer = get_node("AudioStreamPlayer3D") as AudioStreamPlayer3D assert(null != _audioPlayer) @@ -107,17 +107,19 @@ func _load_sound (): func _set_behavior (): if _huntingPlayer == false: var reason = null + var daytime = Daytime.get_time() if _playerRef.IsHunted: # player is already marked by another Meldewesen reason = "player is haunted" elif _playerRef.is_in_illegalzone(): # player is in illegal area reason = "player is haunted in illegal area" elif Pills.get_round_level() == 0: # player has taken no pills in a while reason = "player's pill level is zero" - get_tree().change_scene("res://Level/PathTestWorld.tscn") - # TODO: outside after WORK_TIME - #elif daytime < Daytime.WORK_TIME: - # TODO: at work after SLEEP_TIME - #elif daytime > Daytime.SLEEP_TIME: + elif _playerRef.IsOutside and daytime > Daytime.WORK_TIME and daytime < Daytime.SLEEP_TIME: # outside during WORK_TIME + reason = "player outside during worktime" + #elif _playerRef.IsInFactory and daytime < Daytime.WORK_TIME and daytime > Daytime.SLEEP_TIME: # at work after out of WORK_TIME + # EDIT: too early at work is not an angry reason :p + elif _playerRef.IsInFactory and daytime > Daytime.SLEEP_TIME: # at work after out of WORK_TIME + reason = "player in factory out of worktime" elif _countCmds > MAX_CMDS: # after MAX_CMDS repeats of the same command reason = "player is seemingly not coorperativ" diff --git a/Characters/Meldewesen/Meldewesen.tscn b/Characters/Meldewesen/Meldewesen.tscn index f8cc63c..fdacd30 100644 --- a/Characters/Meldewesen/Meldewesen.tscn +++ b/Characters/Meldewesen/Meldewesen.tscn @@ -2,6 +2,8 @@ [ext_resource path="res://Characters/Meldewesen/Meldewesen.gd" type="Script" id=1] + + [sub_resource type="CylinderMesh" id=1] top_radius = 0.8 diff --git a/Characters/Player/Player.gd b/Characters/Player/Player.gd index d7b0e0e..eb68123 100644 --- a/Characters/Player/Player.gd +++ b/Characters/Player/Player.gd @@ -37,9 +37,10 @@ var _prev_look var _inventory: Control # public properties -#var IsSuspicios # not needed > Meldewesen handles themselves -var IsHunted # player is beeing flagged if one Meldewesen sees an illegal action - +#var IsSuspicios # not needed > Meldewesen handles themselves +var IsHunted # player is beeing flagged if one Meldewesen sees an illegal action +var IsOutside = true # active while player is not in factory +var IsInFactory = false # only active in factory scene func is_in_illegalzone (): return _illegal_areas > 0 @@ -84,6 +85,10 @@ func _ready(): area.connect("area_exited", self, "_on_area_exited") Daytime.connect("respawn", self, "_on_respawn") + + var player = get_node("AudioStreamPlayer3D") + player.stream = load("res://Resources/Audio/cock.wav") + player.play() func _physics_process(delta): @@ -204,6 +209,19 @@ func _on_area_entered (area: Area): elif area.is_in_group("Workwork"): Logger.info("entering work area!") _work_areas += 1 + elif area.is_in_group("FactoryEntry"): + Logger.info("entering factory") + IsInFactory = true + IsOutside = false + # TODO: move not change_scene! + get_tree().change_scene("res://Level/InFactory.tscn") + # TODO: other entries + elif area.is_in_group("OutsideEntry"): + Logger.info("leaving factory") + IsInFactory = false + IsOutside = true + # TODO: move not change_scene! + get_tree().change_scene("res://Level/World.tscn") func _on_area_exited (area: Area): @@ -221,7 +239,7 @@ func _on_area_exited (area: Area): func _on_respawn (): Logger.info("respawning") # fade to black and restart scene - _inventory.hide() + _inventory.hide() # disable hud for the time of respawn animation _animationFadeOut.play("FadeOut") yield(_animationFadeOut, "animation_finished") _animationFadeOut.seek(0, true) @@ -235,4 +253,4 @@ func _on_respawn (): Logger.info("reload scene") get_tree().reload_current_scene() - _inventory.show() + _inventory.show() # enable hud again diff --git a/Characters/Player/Player.tscn b/Characters/Player/Player.tscn index d4c9b20..8992c9b 100644 --- a/Characters/Player/Player.tscn +++ b/Characters/Player/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=2] +[gd_scene load_steps=22 format=2] [ext_resource path="res://Characters/Player/Player.gd" type="Script" id=1] [ext_resource path="res://Characters/Player/PillCameras.gd" type="Script" id=2] @@ -6,12 +6,11 @@ [ext_resource path="res://Shaders/FadeOut.shader" type="Shader" id=4] [ext_resource path="res://Shaders/Masks/from_center.png" type="Texture" id=5] [ext_resource path="res://Resources/Audio/dino-eat.wav" type="AudioStream" id=6] -[ext_resource path="res://Resources/Audio/Stop you violated the law.wav" type="AudioStream" id=7] -[ext_resource path="res://Characters/Player/Footsteps.gd" type="Script" id=8] -[ext_resource path="res://Resources/Audio/Step.wav" type="AudioStream" id=9] -[ext_resource path="res://Characters/Player/UI/UI.tscn" type="PackedScene" id=10] -[ext_resource path="res://Characters/Player/PillTaker.gd" type="Script" id=11] -[ext_resource path="res://Level/Interactables/Pills/Pills.tscn" type="PackedScene" id=12] +[ext_resource path="res://Characters/Player/Footsteps.gd" type="Script" id=7] +[ext_resource path="res://Resources/Audio/Step.wav" type="AudioStream" id=8] +[ext_resource path="res://Characters/Player/UI/UI.tscn" type="PackedScene" id=9] +[ext_resource path="res://Characters/Player/PillTaker.gd" type="Script" id=10] +[ext_resource path="res://Level/Interactables/Pills/Pills.tscn" type="PackedScene" id=11] [sub_resource type="ViewportTexture" id=1] viewport_path = NodePath("Body/PillCameras/MaskedView") @@ -152,7 +151,7 @@ tracks/0/keys = { } [sub_resource type="AudioStreamRandomPitch" id=10] -audio_stream = ExtResource( 9 ) +audio_stream = ExtResource( 8 ) random_pitch = 1.3 [node name="Player" type="KinematicBody" groups=[ @@ -176,7 +175,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0461721, 1.84617, 0 ) script = ExtResource( 2 ) [node name="LookingAt" type="RayCast" parent="Body/PillCameras"] -transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 ) +transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 0, 0, 0 ) enabled = true cast_to = Vector3( 0, 0, 2 ) @@ -226,7 +225,7 @@ remote_path = NodePath("../TrueView/TrueCamera") remote_path = NodePath("../MaskedView/MaskedCamera") [node name="Collider" type="CollisionShape" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) +transform = Transform( 0.8, 0, 0, 0, 1, 0, 0, 0, 0.8, 0, 1, 0 ) shape = SubResource( 5 ) [node name="InteractArea" type="Area" parent="." groups=[ @@ -234,7 +233,7 @@ shape = SubResource( 5 ) ]] [node name="CollisionShape" type="CollisionShape" parent="InteractArea"] -transform = Transform( 1.2, 0, 0, 0, 1, 0, 0, 0, 1.2, 0, 1, 0 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) shape = SubResource( 6 ) [node name="WalkAnimationPlayer" type="AnimationPlayer" parent="."] @@ -251,7 +250,6 @@ playback_speed = 2.0 anims/FadeOut = SubResource( 9 ) [node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."] -stream = ExtResource( 7 ) [node name="Eating" type="Spatial" parent="."] editor/display_folded = true @@ -260,7 +258,7 @@ editor/display_folded = true stream = ExtResource( 6 ) [node name="Footsteps" type="Spatial" parent="."] -script = ExtResource( 8 ) +script = ExtResource( 7 ) [node name="Footstep1" type="AudioStreamPlayer3D" parent="Footsteps"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1 ) @@ -268,14 +266,14 @@ stream = SubResource( 10 ) unit_db = -25.0 pitch_scale = 1.5 -[node name="HUD" parent="." instance=ExtResource( 10 )] +[node name="HUD" parent="." instance=ExtResource( 9 )] [node name="PillTaker" type="Spatial" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) -script = ExtResource( 11 ) +script = ExtResource( 10 ) -[node name="Pills" parent="PillTaker" instance=ExtResource( 12 )] -transform = Transform( 0.1, 0, 0, 0, -4.37114e-09, 0.1, 0, -0.1, -4.37114e-09, 0, 0.7, 0 ) +[node name="Pills" parent="PillTaker" instance=ExtResource( 11 )] +transform = Transform( 0.1, 0, 0, 0, -4.37114e-009, 0.1, 0, -0.1, -4.37114e-009, 0, 0.7, 0 ) visible = false [editable path="HUD"] diff --git a/Characters/Worker/Worker.gd b/Characters/Worker/Worker.gd new file mode 100644 index 0000000..794d857 --- /dev/null +++ b/Characters/Worker/Worker.gd @@ -0,0 +1,23 @@ +extends NPC + + +var _interactArea: Area + +func _ready(): + #Logger.set_logger_level(Logger.LOG_LEVEL_FINE) + + var _interactArea = get_node("InteractArea") as Area + assert(null != _interactArea) + _interactArea.connect("area_entered", self, "_on_area_entered") + +func _process(_delta): + # TODO: movement + #if current_target: # should not be needed -> handled per navigation path + pass + + +func _on_area_entered (area: Area): + if area.is_in_group("FactoryEntry"): + # despawn + queue_free() + pass diff --git a/Characters/Worker/Worker.tscn b/Characters/Worker/Worker.tscn new file mode 100644 index 0000000..add484f --- /dev/null +++ b/Characters/Worker/Worker.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Characters/Worker/Worker.gd" type="Script" id=1] + +[sub_resource type="CylinderMesh" id=1] +top_radius = 0.8 + +[sub_resource type="CylinderMesh" id=2] +top_radius = 0.8 +bottom_radius = 0.001 + +[sub_resource type="PrismMesh" id=3] + +[sub_resource type="CylinderShape" id=4] + +[sub_resource type="CylinderShape" id=5] + +[node name="Worker" type="KinematicBody"] +script = ExtResource( 1 ) + +[node name="Meshes" type="Spatial" parent="."] + +[node name="TrueAppearance" type="MeshInstance" parent="Meshes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) +layers = 2 +mesh = SubResource( 1 ) +material/0 = null + +[node name="MaskedAppearance" type="MeshInstance" parent="Meshes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) +mesh = SubResource( 2 ) +material/0 = null + +[node name="MeshInstance" type="MeshInstance" parent="Meshes"] +transform = Transform( 0.1, 0, 0, 0, -4.37114e-009, 0.1, 0, -0.1, -4.37114e-009, 0, 1.8, -0.9 ) +layers = 3 +mesh = SubResource( 3 ) +material/0 = null + +[node name="Collider" type="CollisionShape" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) +shape = SubResource( 4 ) + +[node name="InteractArea" type="Area" parent="."] + +[node name="CollisionShape" type="CollisionShape" parent="InteractArea"] +transform = Transform( 1.2, 0, 0, 0, 1, 0, 0, 0, 1.2, 0, 1, 0 ) +shape = SubResource( 5 ) diff --git a/Level/Buildings/DoorWall.tscn b/Level/Buildings/DoorWall.tscn new file mode 100644 index 0000000..6d543ac --- /dev/null +++ b/Level/Buildings/DoorWall.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=1] + +[sub_resource type="CubeMesh" id=1] + +[sub_resource type="BoxShape" id=2] + +[node name="DoorWall" type="Spatial"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 ) + +[node name="WallPart1" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, -4, 1.5, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart1"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart1"] +shape = SubResource( 2 ) + +[node name="WallPart2" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 3, 0, 0, 0, 1.5, 0, 0, 0, 0.2, 3, 1.5, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart2"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart2"] +shape = SubResource( 2 ) + +[node name="WallPart3" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 6, 0, 0, 0, 1, 0, 0, 0, 0.2, 0, 4, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart3"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart3"] +shape = SubResource( 2 ) + +[node name="Door" parent="." instance=ExtResource( 1 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 0 ) diff --git a/Level/Buildings/DoubleDoorWall.tscn b/Level/Buildings/DoubleDoorWall.tscn new file mode 100644 index 0000000..7304fb4 --- /dev/null +++ b/Level/Buildings/DoubleDoorWall.tscn @@ -0,0 +1,56 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=1] + +[sub_resource type="CubeMesh" id=1] + +[sub_resource type="BoxShape" id=2] + +[node name="DoubleDoorWall" type="Spatial"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 ) + +[node name="WallPart1" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, -4, 1.5, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart1"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart1"] +shape = SubResource( 2 ) + +[node name="WallPart2" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, 4, 1.5, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart2"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart2"] +shape = SubResource( 2 ) + +[node name="WallPart3" type="StaticBody" parent="."] +editor/display_folded = true +transform = Transform( 6, 0, 0, 0, 1, 0, 0, 0, 0.2, 0, 4, 0 ) +collision_layer = 3 + +[node name="MeshInstance" type="MeshInstance" parent="WallPart3"] +layers = 3 +mesh = SubResource( 1 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="WallPart3"] +shape = SubResource( 2 ) + +[node name="Door" parent="." instance=ExtResource( 1 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 0 ) + +[node name="Door2" parent="." instance=ExtResource( 1 )] +transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 2, 1.5, 0 ) +invert_open = true diff --git a/Level/Buildings/Factory.tscn b/Level/Buildings/Factory.tscn index 907a411..8ed7757 100644 --- a/Level/Buildings/Factory.tscn +++ b/Level/Buildings/Factory.tscn @@ -1,18 +1,28 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=1] [sub_resource type="CylinderMesh" id=1] top_radius = 20.0 bottom_radius = 35.0 height = 100.0 +[sub_resource type="BoxShape" id=2] + [node name="Factory" type="Spatial"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -185, 0, -191 ) [node name="MeshInstance" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 50, 0 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00691223, 50, 0.124863 ) mesh = SubResource( 1 ) material/0 = null +[node name="DoorLeft" parent="MeshInstance" instance=ExtResource( 1 )] +transform = Transform( -2.18557e-007, 0, 1, 0, 5, 0, -5, 0, -4.37114e-008, 35.308, -42, 8.857 ) + +[node name="DoorRight" parent="MeshInstance" instance=ExtResource( 1 )] +transform = Transform( -2.18557e-007, 0, -1, 0, 5, 0, 5, 0, -4.37114e-008, 35.37, -42, -11.118 ) + [node name="MeshInstance2" type="MeshInstance" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, 60 ) mesh = SubResource( 1 ) @@ -22,3 +32,12 @@ material/0 = null transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 50, -60 ) mesh = SubResource( 1 ) material/0 = null + +[node name="FactoryEntry" type="Area" parent="." groups=[ +"FactoryEntry", +]] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 50.9938, 0, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="FactoryEntry"] +transform = Transform( 15.5705, 0, 0, 0, 1, 0, 0, 0, 25.0132, -18.0871, 0, 0 ) +shape = SubResource( 2 ) diff --git a/Level/Buildings/PlayerHouse.tscn b/Level/Buildings/PlayerHouse.tscn index 10383ee..931088d 100644 --- a/Level/Buildings/PlayerHouse.tscn +++ b/Level/Buildings/PlayerHouse.tscn @@ -18,14 +18,17 @@ mid_height = 2.0 [node name="CSGMesh" type="CSGMesh" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 6, 0 ) +layers = 3 mesh = SubResource( 2 ) [node name="CSGMesh2" type="CSGMesh" parent="CSGMesh"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00447488, -1, -0.00174999 ) +layers = 3 operation = 2 mesh = SubResource( 3 ) [node name="CSGMesh3" type="CSGMesh" parent="CSGMesh"] transform = Transform( 1, 0, 0, 0, -0.0161161, -0.99987, 0, 0.99987, -0.0161161, 0, -4.59426, -5.98218 ) +layers = 3 operation = 2 mesh = SubResource( 4 ) diff --git a/Level/InFactory.tscn b/Level/InFactory.tscn index 51d423a..eb56565 100644 --- a/Level/InFactory.tscn +++ b/Level/InFactory.tscn @@ -1,77 +1,47 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=1] -[ext_resource path="res://Characters/Player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://Level/Buildings/DoubleDoorWall.tscn" type="PackedScene" id=1] +[ext_resource path="res://Level/Buildings/DoorWall.tscn" type="PackedScene" id=2] +[ext_resource path="res://Characters/Player/Player.tscn" type="PackedScene" id=3] -[sub_resource type="CubeMesh" id=4] +[sub_resource type="BoxShape" id=1] -[sub_resource type="BoxShape" id=5] +[sub_resource type="CubeMesh" id=2] -[sub_resource type="BoxShape" id=6] - -[sub_resource type="CubeMesh" id=7] +[sub_resource type="BoxShape" id=3] [node name="InFactory" type="Spatial"] [node name="Architecture" type="Spatial" parent="."] [node name="EntryHall" type="Spatial" parent="Architecture"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 ) +editor/display_folded = true -[node name="WallPart1" type="StaticBody" parent="Architecture/EntryHall"] -transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, -4, 1.5, 0 ) -collision_layer = 3 +[node name="DoubleDoorWall" parent="Architecture/EntryHall" instance=ExtResource( 1 )] -[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart1"] -layers = 3 -mesh = SubResource( 4 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart1"] -shape = SubResource( 5 ) - -[node name="WallPart2" type="StaticBody" parent="Architecture/EntryHall"] -transform = Transform( 2, 0, 0, 0, 1.5, 0, 0, 0, 0.2, 4, 1.5, 0 ) -collision_layer = 3 - -[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart2"] -layers = 3 -mesh = SubResource( 4 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart2"] -shape = SubResource( 5 ) - -[node name="WallPart3" type="StaticBody" parent="Architecture/EntryHall"] -transform = Transform( 6, 0, 0, 0, 1, 0, 0, 0, 0.2, 0, 4, 0 ) -collision_layer = 3 - -[node name="MeshInstance" type="MeshInstance" parent="Architecture/EntryHall/WallPart3"] -layers = 3 -mesh = SubResource( 4 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="Architecture/EntryHall/WallPart3"] -shape = SubResource( 5 ) - -[node name="Door" parent="Architecture/EntryHall" instance=ExtResource( 1 )] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, 0 ) - -[node name="Door2" parent="Architecture/EntryHall" instance=ExtResource( 1 )] -transform = Transform( -1, 0, -8.74228e-008, 0, 1, 0, 8.74228e-008, 0, -1, 2, 1.5, 0 ) -invert_open = true +[node name="DoorWall" parent="Architecture/EntryHall" instance=ExtResource( 2 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -12, 0, 2 ) [node name="Floor" type="StaticBody" parent="Architecture"] +editor/display_folded = true transform = Transform( 100, 0, 0, 0, 1, 0, 0, 0, 100, 0, -1, 0 ) collision_layer = 3 [node name="CollisionShape" type="CollisionShape" parent="Architecture/Floor"] -shape = SubResource( 6 ) +shape = SubResource( 1 ) [node name="MeshInstance" type="MeshInstance" parent="Architecture/Floor"] layers = 3 -mesh = SubResource( 7 ) +mesh = SubResource( 2 ) material/0 = null -[node name="Player" parent="." instance=ExtResource( 2 )] +[node name="OutsideEntry" type="Area" parent="Architecture" groups=[ +"OutsideEntry", +]] + +[node name="CollisionShape" type="CollisionShape" parent="Architecture/OutsideEntry"] +transform = Transform( 6.4742, 0, 0, 0, 1, 0, 0, 0, 4.02915, -24.461, 0, 2.21844 ) +shape = SubResource( 3 ) + +[node name="Player" parent="." instance=ExtResource( 3 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0 ) diff --git a/Level/Labyrinth.tscn b/Level/Labyrinth.tscn index bc2ef63..39c14d5 100644 --- a/Level/Labyrinth.tscn +++ b/Level/Labyrinth.tscn @@ -59,28 +59,28 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -105, 0, 30 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -75, 0, -30 ) [node name="LabyrinthCorridorTrue5" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 15 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 0, 0, 15 ) [node name="LabyrinthCorridorTrue6" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -30, 0, -15 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -30, 0, -15 ) [node name="LabyrinthCorridorTrue17" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -90, 0, -15 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -90, 0, -15 ) [node name="LabyrinthCorridorTrue18" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -90, 0, 15 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -90, 0, 15 ) [node name="LabyrinthCorridorTrue8" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -30, 0, -45 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -30, 0, -45 ) [node name="LabyrinthCorridorTrue12" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -60, 0, -45 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -60, 0, -45 ) [node name="LabyrinthCorridorTrue10" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, -45 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 0, 0, -45 ) [node name="LabyrinthCorridorTrue7" parent="." instance=ExtResource( 1 )] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -30, 0, 15 ) +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -30, 0, 15 ) [node name="LabyrinthCrossing" parent="." instance=ExtResource( 2 )] @@ -162,16 +162,16 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -75, 0, -60 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -105, 0, -60 ) [node name="LabyrinthCorridorMasked2" parent="." instance=ExtResource( 3 )] -transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -60, 0, 15 ) +transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -60, 0, 15 ) [node name="LabyrinthCorridorMasked3" parent="." instance=ExtResource( 3 )] -transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -60, 0, -15 ) +transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -60, 0, -15 ) [node name="LabyrinthCorridorMasked13" parent="." instance=ExtResource( 3 )] -transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -90, 0, -45 ) +transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -90, 0, -45 ) [node name="LabyrinthCorridorMasked8" parent="." instance=ExtResource( 3 )] -transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0, -15 ) +transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, 0, 0, -15 ) [node name="Player" parent="." instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0 ) @@ -179,7 +179,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0 ) [node name="OuterWalls" type="Spatial" parent="."] [node name="MeshInstance" type="MeshInstance" parent="OuterWalls"] -transform = Transform( -1, -8.74228e-08, 3.82137e-15, 0, -4.37114e-08, -1, 8.74228e-08, -1, 4.37114e-08, -50, 5, 35 ) +transform = Transform( -1, -8.74228e-008, 3.82137e-015, 0, -4.37114e-008, -1, 8.74228e-008, -1, 4.37114e-008, -50, 5, 35 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -190,7 +190,7 @@ material/0 = null shape = SubResource( 2 ) [node name="MeshInstance2" type="MeshInstance" parent="OuterWalls"] -transform = Transform( 1, 1.74846e-07, -7.64274e-15, 0, -4.37114e-08, -1, -1.74846e-07, 1, -4.37114e-08, -50, 5, -65 ) +transform = Transform( 1, 1.74846e-007, -7.64274e-015, 0, -4.37114e-008, -1, -1.74846e-007, 1, -4.37114e-008, -50, 5, -65 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -201,7 +201,7 @@ material/0 = null shape = SubResource( 3 ) [node name="MeshInstance3" type="MeshInstance" parent="OuterWalls"] -transform = Transform( 1.31134e-07, -1, 4.37114e-08, 0, -4.37114e-08, -1, 1, 1.31134e-07, -5.73206e-15, 4.99999, 5, -70 ) +transform = Transform( 1.31134e-007, -1, 4.37114e-008, 0, -4.37114e-008, -1, 1, 1.31134e-007, -5.73206e-015, 4.99999, 5, -70 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -212,7 +212,7 @@ material/0 = null shape = SubResource( 4 ) [node name="MeshInstance4" type="MeshInstance" parent="OuterWalls"] -transform = Transform( 1.31134e-07, -1, 4.37114e-08, 0, -4.37114e-08, -1, 1, 1.31134e-07, -5.73206e-15, 4.99999, 5, 70 ) +transform = Transform( 1.31134e-007, -1, 4.37114e-008, 0, -4.37114e-008, -1, 1, 1.31134e-007, -5.73206e-015, 4.99999, 5, 70 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -223,7 +223,7 @@ material/0 = null shape = SubResource( 5 ) [node name="MeshInstance5" type="MeshInstance" parent="OuterWalls"] -transform = Transform( 1.31134e-07, -1, 4.37114e-08, 0, -4.37114e-08, -1, 1, 1.31134e-07, -5.73206e-15, 35, 5, -7.62939e-06 ) +transform = Transform( 1.31134e-007, -1, 4.37114e-008, 0, -4.37114e-008, -1, 1, 1.31134e-007, -5.73206e-015, 35, 5, -7.62939e-006 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -234,7 +234,7 @@ material/0 = null shape = SubResource( 6 ) [node name="MeshInstance8" type="MeshInstance" parent="OuterWalls"] -transform = Transform( -7.98311e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -0.49, -1.62921e-07, 7.12149e-15, -95, 5, -15 ) +transform = Transform( -7.98311e-008, 1, -4.37114e-008, 0, -4.37114e-008, -1, -0.49, -1.62921e-007, 7.12149e-015, -95, 5, -15 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -245,7 +245,7 @@ material/0 = null shape = SubResource( 6 ) [node name="MeshInstance6" type="MeshInstance" parent="OuterWalls"] -transform = Transform( -1, -8.74228e-08, 3.82137e-15, 0, -4.37114e-08, -1, 8.74228e-08, -1, 4.37114e-08, 75, 5, 4.99999 ) +transform = Transform( -1, -8.74228e-008, 3.82137e-015, 0, -4.37114e-008, -1, 8.74228e-008, -1, 4.37114e-008, 75, 5, 4.99999 ) layers = 3 mesh = SubResource( 1 ) material/0 = null @@ -256,7 +256,7 @@ material/0 = null shape = SubResource( 7 ) [node name="MeshInstance7" type="MeshInstance" parent="OuterWalls"] -transform = Transform( 1, 1.74846e-07, -7.64274e-15, 0, -4.37114e-08, -1, -1.74846e-07, 1, -4.37114e-08, 75, 5, -5.00001 ) +transform = Transform( 1, 1.74846e-007, -7.64274e-015, 0, -4.37114e-008, -1, -1.74846e-007, 1, -4.37114e-008, 75, 5, -5.00001 ) layers = 3 mesh = SubResource( 1 ) material/0 = null diff --git a/Level/WorkerSpawner.gd b/Level/WorkerSpawner.gd new file mode 100644 index 0000000..a4742f0 --- /dev/null +++ b/Level/WorkerSpawner.gd @@ -0,0 +1,21 @@ +extends Spatial + +const SPAWN_TIME_MIN = 3000 # min spawntime in ms +const SPAWN_TIME_MAX = 7000 # max spawntime in ms + +var _worker +var _lastSpawn = 0 # timestamp of last spawned worker + +func _ready(): + _worker = load("res://Characters/Worker/Worker.tscn") + assert(null != _worker) + +func _process(delta): + # spawns new workers after defined time + var cur_time = OS.get_ticks_msec() + var diff = rand_range(SPAWN_TIME_MIN, SPAWN_TIME_MAX) + if cur_time - _lastSpawn > diff: + #Logger.info(name + " spawning new worker") + var new_worker = _worker.instance() + add_child(new_worker) + _lastSpawn = cur_time diff --git a/Level/World.tscn b/Level/World.tscn index e9f5658..9a533d2 100644 --- a/Level/World.tscn +++ b/Level/World.tscn @@ -1,18 +1,20 @@ -[gd_scene load_steps=21 format=2] +[gd_scene load_steps=23 format=2] [ext_resource path="res://Characters/Player/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://Characters/Meldewesen/Meldewesen.tscn" type="PackedScene" id=2] [ext_resource path="res://Level/Interactables/Keycard/Keycard.tscn" type="PackedScene" id=3] [ext_resource path="res://Level/Interactables/Key/Key.tscn" type="PackedScene" id=4] -[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=5] -[ext_resource path="res://Level/Interactables/Lever/Lever.tscn" type="PackedScene" id=6] -[ext_resource path="res://Level/Buildings/PlayerHouse.tscn" type="PackedScene" id=7] -[ext_resource path="res://Level/Buildings/BuildingBlock.tscn" type="PackedScene" id=8] -[ext_resource path="res://Level/Buildings/MeldewesenHome.tscn" type="PackedScene" id=9] -[ext_resource path="res://Level/Buildings/Factory.tscn" type="PackedScene" id=10] -[ext_resource path="res://Util/NodeGroupNotifier.tscn" type="PackedScene" id=11] -[ext_resource path="res://Characters/Util/PathNavigatorForNPC.tscn" type="PackedScene" id=12] -[ext_resource path="res://Util/AmbiencePlayer.tscn" type="PackedScene" id=13] +[ext_resource path="res://Level/WorkerSpawner.gd" type="Script" id=5] +[ext_resource path="res://Level/Interactables/Door/Door.tscn" type="PackedScene" id=6] +[ext_resource path="res://Level/Interactables/Lever/Lever.tscn" type="PackedScene" id=7] +[ext_resource path="res://Level/Buildings/PlayerHouse.tscn" type="PackedScene" id=8] +[ext_resource path="res://Level/Buildings/BuildingBlock.tscn" type="PackedScene" id=9] +[ext_resource path="res://Level/Buildings/MeldewesenHome.tscn" type="PackedScene" id=10] +[ext_resource path="res://Level/Buildings/Factory.tscn" type="PackedScene" id=11] +[ext_resource path="res://Level/Buildings/DoorWall.tscn" type="PackedScene" id=12] +[ext_resource path="res://Util/NodeGroupNotifier.tscn" type="PackedScene" id=13] +[ext_resource path="res://Characters/Util/PathNavigatorForNPC.tscn" type="PackedScene" id=14] +[ext_resource path="res://Util/AmbiencePlayer.tscn" type="PackedScene" id=15] [sub_resource type="BoxShape" id=1] @@ -45,12 +47,14 @@ _data = { transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 7 ) [node name="Enemies" type="Node" parent="."] +editor/display_folded = true [node name="Meldewesen2" parent="Enemies" instance=ExtResource( 2 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -3.88156, 0, 14.5424 ) _visibility_path = NodePath("../../Enemies/Meldewesen2/Visibility") [node name="Collectibles" type="Spatial" parent="."] +editor/display_folded = true transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 15.0831, 1.63203, 13.0809 ) [node name="Keycard" parent="Collectibles" groups=[ @@ -63,7 +67,7 @@ card_lvl = 1 "Collectibles", ] instance=ExtResource( 4 )] editor/display_folded = true -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -75.0183, 0, -2.86102e-006 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -77.5603, 0, -1.90735e-006 ) key_id = 1 [node name="Area" type="Area" parent="Collectibles/Key" groups=[ @@ -74,181 +78,209 @@ key_id = 1 transform = Transform( 15, 0, 0, 0, 1, 0, 0, 0, 15, 0, 0, 0 ) shape = SubResource( 1 ) +[node name="WorkerSpawner" type="Node" parent="."] +editor/display_folded = true + +[node name="WorkerSpawner" type="Spatial" parent="WorkerSpawner"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3.20278, 0, -43.032 ) +script = ExtResource( 5 ) + +[node name="WorkerSpawner2" type="Spatial" parent="WorkerSpawner"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.36571, 0, -102.743 ) +script = ExtResource( 5 ) + +[node name="WorkerSpawner3" type="Spatial" parent="WorkerSpawner"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.36571, 0, 52.7015 ) +script = ExtResource( 5 ) + +[node name="WorkerSpawner4" type="Spatial" parent="WorkerSpawner"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 69.6766, 0, -136.624 ) +script = ExtResource( 5 ) + +[node name="WorkerSpawner5" type="Spatial" parent="WorkerSpawner"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15.3518, 0, -202.564 ) +script = ExtResource( 5 ) + [node name="Touchables" type="Spatial" parent="."] editor/display_folded = true -[node name="Door" parent="Touchables" instance=ExtResource( 5 )] -transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, 73.152, 2, -191.228 ) +[node name="Door" parent="Touchables" instance=ExtResource( 6 )] +transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, 69.8762, 2, -182.905 ) door_lvl = 1 -[node name="Lever" parent="Touchables" instance=ExtResource( 6 )] +[node name="Lever" parent="Touchables" instance=ExtResource( 7 )] transform = Transform( 1.19249e-008, 0, -1, 0, 1, 0, 1, 0, 1.19249e-008, 5.94476, 2, 11.731 ) [node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="."] navmesh = SubResource( 2 ) -[node name="PlayerHouse" parent="NavigationMeshInstance" instance=ExtResource( 7 )] +[node name="PlayerHouse" parent="NavigationMeshInstance" instance=ExtResource( 8 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, 14 ) -[node name="BuildingBlocks" type="Spatial" parent="NavigationMeshInstance"] -editor/display_folded = true +[node name="MeldewesenHouse" parent="NavigationMeshInstance" instance=ExtResource( 8 )] +transform = Transform( 0.8, 0, 0, 0, 1, 0, 0, 0, 1, 14.9197, 0, 89.983 ) -[node name="BuildingBlock" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlocks" type="Spatial" parent="NavigationMeshInstance"] + +[node name="BuildingBlock" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, -13 ) -[node name="BuildingBlock2" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock2" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, -13 ) -[node name="BuildingBlock11" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock11" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, 41 ) -[node name="BuildingBlock12" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock12" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, 14 ) -[node name="BuildingBlock13" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock13" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, 41 ) -[node name="BuildingBlock14" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock14" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 47 ) -[node name="BuildingBlock15" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock15" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, 41, 0, 95 ) -[node name="BuildingBlock21" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock21" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, 41, 0, 68 ) -[node name="BuildingBlock16" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock16" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -13, 0, 68 ) -[node name="BuildingBlock20" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock20" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -13, 0, 95 ) -[node name="BuildingBlock17" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock17" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -1, 0, 8.74228e-008, 0, 1, 0, -8.74228e-008, 0, -1, 8, 0, 116 ) -[node name="BuildingBlock18" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock18" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -1, 0, 8.74228e-008, 0, 1, 0, -8.74228e-008, 0, -1, 35, 0, 116 ) -[node name="BuildingBlock3" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock3" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, -40 ) -[node name="BuildingBlock4" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock4" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, -40 ) -[node name="BuildingBlock5" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock5" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -34, 0, -88 ) -[node name="BuildingBlock10" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock10" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -34, 0, -46 ) -[node name="BuildingBlock9" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock9" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, -94 ) -[node name="BuildingBlock24" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock24" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -13, 0, -121 ) -[node name="BuildingBlock25" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock25" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0, -127 ) -[node name="BuildingBlock26" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock26" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 35, 0, -127 ) -[node name="BuildingBlock31" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock31" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 35, 0, -169 ) -[node name="BuildingBlock37" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock37" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 100, 0, -169 ) -[node name="BuildingBlock38" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock38" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 127, 0, -169 ) -[node name="BuildingBlock40" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock40" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 127, 0, -211 ) -[node name="BuildingBlock41" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock41" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 100, 0, -211 ) -[node name="BuildingBlock42" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock42" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 73, 0, -211 ) -[node name="BuildingBlock43" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock53" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 79, 0, -201.078 ) + +[node name="BuildingBlock43" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 46, 0, -211 ) -[node name="BuildingBlock44" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock44" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 19, 0, -211 ) -[node name="BuildingBlock45" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock45" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8, 0, -211 ) -[node name="BuildingBlock46" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock46" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -35, 0, -211 ) -[node name="BuildingBlock47" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock47" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -56, 0, -217 ) -[node name="BuildingBlock48" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock48" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -71, 0, -217 ) -[node name="BuildingBlock50" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock50" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, -1, 0, 1, 0, 1, 0, -4.37114e-008, -71, 0, -244 ) -[node name="BuildingBlock51" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock51" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -1, 0, 8.74228e-008, 0, 1, 0, -8.74228e-008, 0, -1, -92, 0, -250 ) -[node name="BuildingBlock52" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock52" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1.31134e-007, 0, 1, 0, 1, 0, -1, 0, 1.31134e-007, -113, 0, -256 ) -[node name="BuildingBlock32" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock32" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0, -169 ) -[node name="BuildingBlock33" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock33" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -19, 0, -169 ) -[node name="BuildingBlock34" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock34" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -46, 0, -169 ) -[node name="BuildingBlock35" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock35" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, -67, 0, -163 ) -[node name="BuildingBlock36" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock36" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -76, 0, -142 ) -[node name="BuildingBlock49" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock49" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -103, 0, -142 ) -[node name="BuildingBlock27" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock27" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 41, 0, -148 ) -[node name="BuildingBlock28" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock28" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 79, 0, -109 ) -[node name="BuildingBlock29" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock29" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 79, 0, -136 ) -[node name="BuildingBlock30" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock30" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 79, 0, -163 ) -[node name="BuildingBlock39" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock39" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 133, 0, -190 ) -[node name="MeldewesenHome" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] +[node name="MeldewesenHome" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 10 )] -[node name="BuildingBlock6" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock6" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 13, 0, -67 ) -[node name="BuildingBlock7" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock7" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 19, 0, -88 ) -[node name="BuildingBlock8" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock8" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 19, 0, -88 ) -[node name="BuildingBlock22" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock22" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 46, 0, -88 ) -[node name="BuildingBlock23" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 8 )] +[node name="BuildingBlock23" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 9 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 73, 0, -88 ) -[node name="Factory" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 10 )] +[node name="Factory" parent="NavigationMeshInstance/BuildingBlocks" instance=ExtResource( 11 )] [node name="Ground" type="MeshInstance" parent="NavigationMeshInstance"] editor/display_folded = true @@ -264,6 +296,9 @@ collision_mask = 7 [node name="CollisionShape" type="CollisionShape" parent="NavigationMeshInstance/Ground/StaticBody"] shape = SubResource( 4 ) +[node name="DoorWall" parent="NavigationMeshInstance/Ground" instance=ExtResource( 12 )] +transform = Transform( -4.37114e-008, 0, 1, 0, 1, 0, -1, 0, -4.37114e-008, 156.062, 0, -76.2607 ) + [node name="Environment" type="Spatial" parent="."] editor/display_folded = true @@ -275,14 +310,14 @@ transform = Transform( 0.642788, -0.262003, -0.719846, 0, -0.939693, 0.34202, -0 layers = 3 shadow_enabled = true -[node name="NodeGroupNotifier" parent="." instance=ExtResource( 11 )] +[node name="NodeGroupNotifier" parent="." instance=ExtResource( 13 )] group_name = "Navigator" node_to_send = NodePath("..") -[node name="PathNavigatorForNPC" parent="." instance=ExtResource( 12 )] +[node name="PathNavigatorForNPC" parent="." instance=ExtResource( 14 )] curve = SubResource( 7 ) body_nodepath = NodePath("Meldewesen") [node name="Meldewesen" parent="PathNavigatorForNPC" instance=ExtResource( 2 )] -[node name="AmbiencePlayer" parent="." instance=ExtResource( 13 )] +[node name="AmbiencePlayer" parent="." instance=ExtResource( 15 )] diff --git a/ReTrace_report.md b/ReTrace_report.md new file mode 100644 index 0000000..41f0d2a --- /dev/null +++ b/ReTrace_report.md @@ -0,0 +1,43 @@ +# ReTrace +brief game description, about 3 sentences + +## Group Members +- Bittner Karl, if17b005 +- Leithner Michael, if17b051 +- Palluch Leon, if17b033 +- Schmidt Nino, if17b037 + +## Controls +- standard fps: walk with WASD, look around with mouse +- take pills with 'R' +- interact with objects 'E' + +## Gameplay Features +- day-night cycle +- feature B +- ... + +## Technical Features (Unity and other) +- Godot :D +- Particles +- Navigation Path +- AudioMixer + +## Time Spent report +- Where and in what areas did you spend your time. How much time did you use for feature A, B, C, how much for gameplay programming, where did you spend more/less time than anticipated, +- How well did you manage to stay within the time budget and why. +- Who did what in the assignment + +## Problems and Challenges +Where did you run into problems and challenges and how did you solve them + +## Resources, Sources, References and Links +Links to all resources, sources you are using. Don't try to reinvent the wheel and be smart about what you build and what you use from others, but never forget to document it accordingly. If you use something and don't document it, its plagiarism! +- http://docs.godotengine.org/ + +## Self Assesment +Game Design: 35 +Technical/Unity Features: 30 +meta: 15 +--------- +total: 80 \ No newline at end of file diff --git a/Resources/Audio/cock.wav b/Resources/Audio/cock.wav new file mode 100644 index 0000000..2933bf3 Binary files /dev/null and b/Resources/Audio/cock.wav differ diff --git a/Resources/Audio/cock.wav.import b/Resources/Audio/cock.wav.import new file mode 100644 index 0000000..cd85c40 --- /dev/null +++ b/Resources/Audio/cock.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/cock.wav-89444e13e9761c20354b7f2c9a7420fe.sample" + +[deps] + +source_file="res://Resources/Audio/cock.wav" +dest_files=[ "res://.import/cock.wav-89444e13e9761c20354b7f2c9a7420fe.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/Resources/Fonts/MainFont.tres b/Resources/Fonts/MainFont.tres index 0c36e03..0afb3e0 100644 --- a/Resources/Fonts/MainFont.tres +++ b/Resources/Fonts/MainFont.tres @@ -3,6 +3,6 @@ [ext_resource path="res://Resources/Fonts/Beon-Regular.otf" type="DynamicFontData" id=1] [resource] -size = 180 +size = 20 use_filter = true font_data = ExtResource( 1 ) diff --git a/UI/MainMenu.tscn b/UI/MainMenu.tscn index f00eed1..3613669 100644 --- a/UI/MainMenu.tscn +++ b/UI/MainMenu.tscn @@ -1,17 +1,20 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://Resources/Fonts/MainFont.tres" type="DynamicFont" id=1] -[ext_resource path="res://Resources/Fonts/Beon-Regular.otf" type="DynamicFontData" id=2] -[ext_resource path="res://UI/PlayButton.gd" type="Script" id=3] -[ext_resource path="res://UI/ExitButton.gd" type="Script" id=4] +[ext_resource path="res://Resources/Fonts/Beon-Regular.otf" type="DynamicFontData" id=1] +[ext_resource path="res://UI/PlayButton.gd" type="Script" id=2] +[ext_resource path="res://UI/ExitButton.gd" type="Script" id=3] + +[sub_resource type="DynamicFont" id=4] +size = 180 +font_data = ExtResource( 1 ) [sub_resource type="DynamicFont" id=1] size = 32 -font_data = ExtResource( 2 ) +font_data = ExtResource( 1 ) [sub_resource type="DynamicFont" id=2] size = 32 -font_data = ExtResource( 2 ) +font_data = ExtResource( 1 ) [sub_resource type="Animation" id=3] resource_name = "Text" @@ -80,9 +83,10 @@ margin_bottom = 400.0 [node name="GameTitle" type="Label" parent="."] margin_left = 1.0 +margin_top = -1.16635 margin_right = 1025.0 -margin_bottom = 400.0 -custom_fonts/font = ExtResource( 1 ) +margin_bottom = 398.834 +custom_fonts/font = SubResource( 4 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) custom_colors/font_color_shadow = Color( 1, 0, 0, 1 ) custom_constants/shadow_offset_x = 4 @@ -112,7 +116,7 @@ custom_colors/font_color = Color( 1, 1, 1, 1 ) custom_colors/font_color_hover = Color( 0.980392, 0.839216, 0.619608, 1 ) text = "Embark" flat = true -script = ExtResource( 3 ) +script = ExtResource( 2 ) [node name="ExitButton" type="Button" parent="."] margin_left = 380.0 @@ -123,7 +127,7 @@ custom_fonts/font = SubResource( 2 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) text = "Disembark" flat = true -script = ExtResource( 4 ) +script = ExtResource( 3 ) [node name="AnimateForeground" type="AnimationPlayer" parent="."] autoplay = "Text"