Compare commits

...

3 Commits

Author SHA1 Message Date
Martin Felis bdfee0e94b Added saving of inventory. 2024-08-15 20:24:41 +02:00
Martin Felis 616dab80c7 Quest state is now properly saved. 2024-08-02 01:03:40 +02:00
Martin Felis 6c59b551dc Separate startup and gameplay scene. 2024-08-02 00:06:50 +02:00
20 changed files with 427 additions and 243 deletions

File diff suppressed because one or more lines are too long

View File

@ -789,12 +789,10 @@ shape = SubResource("ConvexPolygonShape3D_qwic5")
visible = false
[node name="block-grass-corner-overhang-low" type="MeshInstance3D" parent="block-grass-corner-overhang-low2"]
visible = false
mesh = SubResource("ArrayMesh_pkwal")
skeleton = NodePath("")
[node name="CollisionShape3D" type="CollisionShape3D" parent="block-grass-corner-overhang-low2"]
visible = false
shape = SubResource("ConvexPolygonShape3D_m7hx8")
[node name="block-grass-corner-overhang2" type="StaticBody3D" parent="."]
@ -818,7 +816,6 @@ skeleton = NodePath("")
shape = SubResource("ConvexPolygonShape3D_mg4dt")
[node name="block-grass-curve-half2" type="StaticBody3D" parent="."]
visible = false
[node name="block-grass-curve-half" type="MeshInstance3D" parent="block-grass-curve-half2"]
mesh = SubResource("ArrayMesh_lsy3n")
@ -918,22 +915,28 @@ skeleton = NodePath("")
shape = SubResource("ConvexPolygonShape3D_5oo7n")
[node name="block-grass-low-large" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource("ArrayMesh_cqc4g")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="block-grass-low-large"]
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="block-grass-low-large/StaticBody3D"]
visible = false
shape = SubResource("ConvexPolygonShape3D_6hmfq")
[node name="block-grass-low-huge" type="MeshInstance3D" parent="."]
transform = Transform3D(2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0)
visible = false
mesh = SubResource("ArrayMesh_cqc4g")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="block-grass-low-huge"]
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="block-grass-low-huge/StaticBody3D"]
visible = false
shape = SubResource("ConvexPolygonShape3D_g8y82")
[node name="block-grass-large-tall" type="MeshInstance3D" parent="."]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://cofd468cwkntk"]
[ext_resource type="PackedScene" uid="uid://b8xsr7w5i5mx" path="res://assets/3rdparty/kenney/survival-kit/Models/campfire-pit.glb" id="1_bss5j"]
[node name="campfire-pit2" instance=ExtResource("1_bss5j")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)

View File

@ -1,5 +0,0 @@
class_name SaveGame
extends Resource
@export var player_transform:Transform3D

24
game.gd
View File

@ -1,24 +0,0 @@
class_name Game
extends Node3D
@onready var message_container:Control = %MessagesContainer
@onready var message_textedit:TextEdit = %MessageTextEdit
@onready var player = %Player
@onready var root_ui:RootUI = %RootUI
func save_game():
var save_game:SaveGame = SaveGame.new()
save_game.player_transform = player.global_transform
ResourceSaver.save(save_game, "user://savegame.tres")
root_ui.activate_ui_panel(%GameUI)
func load_game():
var save_game:SaveGame = load("user://savegame.tres") as SaveGame
player.global_transform = save_game.player_transform
root_ui.activate_ui_panel(%GameUI)

View File

@ -2,7 +2,6 @@ extends Control
@onready var tool_slots = %ToolSlots
@onready var game_menu_ui = %GameMenuUI
@onready var world = %World
func _on_message_timer_timeout():
@ -33,8 +32,8 @@ func _on_game_menu_ui_visibility_changed():
if %GameMenuUI.visible:
tool_slots.hide()
%World.process_mode = Node.PROCESS_MODE_DISABLED
%GameScene.process_mode = Node.PROCESS_MODE_DISABLED
else:
tool_slots.show()
%World.process_mode = Node.PROCESS_MODE_INHERIT
%GameScene.process_mode = Node.PROCESS_MODE_INHERIT

View File

@ -14,6 +14,10 @@ func get_items() -> Array[Item]:
return _content
func clear() -> void:
_content.clear()
func has_all(items:Array[Item]) -> bool:
var needed:Array[Item] = items.duplicate()

7
model/save_game.gd Normal file
View File

@ -0,0 +1,7 @@
class_name SaveGame
extends Resource
@export var player_transform:Transform3D
@export var player_name:String
@export var quest_states:Dictionary
@export var inventory:Array[Item]

View File

@ -7,7 +7,7 @@
height = 0.2
radius = 0.15682
[node name="Item" type="Node3D"]
[node name="Item" type="Node3D" groups=["pickup_item"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00393829, 0)
script = ExtResource("1_1i8k2")
item = ExtResource("2_dph0g")

View File

@ -6,7 +6,7 @@ const JUMP_VELOCITY = 2.5
@onready var geometry = %Geometry
@onready var actionable_detector = %ActionableDetector
@onready var quest_state = %QuestState
@onready var quest_state = %BuilderMissingTool
@onready var bridge = %Bridge
# Get the gravity from the project settings to be synced with RigidBody nodes.

View File

@ -10,8 +10,8 @@ config_version=5
[application]
config/name="UIAndInteractionTests"
run/main_scene="res://game.tscn"
config/name="TinyBuildAdventure"
run/main_scene="res://scenes/game.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.svg"

View File

@ -18,11 +18,7 @@ func _ready():
var recipe:Recipe = load(resource_file) as Recipe
_all_recipes.append(recipe)
if _root_ui_state == ROOT_UI_STATE.MENU:
activate_ui_panel(%MainMenuUI)
else:
activate_ui_panel(%GameUI)
set_root_ui_state(ROOT_UI_STATE.GAME)
func activate_ui_panel(ui_panel:Control):
for control in ui_panels:
@ -35,11 +31,15 @@ func activate_ui_panel(ui_panel:Control):
func set_root_ui_state(state:ROOT_UI_STATE):
if state == ROOT_UI_STATE.GAME:
%World.process_mode = Node.PROCESS_MODE_INHERIT
%GameScene.show()
%StartupScene.hide()
%GameScene.process_mode = Node.PROCESS_MODE_INHERIT
activate_ui_panel(%GameUI)
else:
%StartupScene.show()
%GameScene.hide()
%GameMenuUI.hide()
%World.process_mode = Node.PROCESS_MODE_DISABLED
%GameScene.process_mode = Node.PROCESS_MODE_DISABLED
activate_ui_panel(%MainMenuUI)
_root_ui_state = state

45
scenes/game.gd Normal file
View File

@ -0,0 +1,45 @@
class_name Game
extends Node3D
@onready var message_container:Control = %MessagesContainer
@onready var message_textedit:TextEdit = %MessageTextEdit
@onready var player = %Player
@onready var builder_missing_tool = %BuilderMissingTool
@onready var root_ui:RootUI = %RootUI
func save_game():
var save_game:SaveGame = SaveGame.new()
save_game.player_transform = player.global_transform
for node:Node in get_tree().get_nodes_in_group("quest_state"):
save_game.quest_states[node.name] = {}
for property in node.get_property_list():
if (property.usage & PROPERTY_USAGE_STORAGE != 0) and (property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) != 0:
save_game.quest_states[node.name][property.name] = node.get(property.name)
for item in player.inventory.get_items():
save_game.inventory.append(item)
ResourceSaver.save(save_game, "user://savegame.tres")
root_ui.activate_ui_panel(%GameUI)
func load_game():
var save_game:SaveGame = load("user://savegame.tres") as SaveGame
player.global_transform = save_game.player_transform
for node:Node in get_tree().get_nodes_in_group("quest_state"):
for property in node.get_property_list():
if (property.usage & PROPERTY_USAGE_STORAGE != 0) and (property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) != 0:
node.set(property.name, save_game.quest_states[node.name][property.name])
player.inventory.clear()
for item in save_game.inventory:
player.inventory.add_item(item)
root_ui.activate_ui_panel(%GameUI)

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=37 format=3 uid="uid://bugqatylloxkl"]
[ext_resource type="Script" path="res://game.gd" id="1_uwyoo"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_uwyoo"]
[ext_resource type="Texture2D" uid="uid://bq3b1hxl5ojh6" path="res://assets/icons/npc_emotes/attention.tres" id="2_4dxur"]
[ext_resource type="PackedScene" uid="uid://2q8dhf61a7os" path="res://assets/characters/engineer.tscn" id="3_gf736"]
[ext_resource type="Script" path="res://scenes/game_scene.gd" id="3_j7rx1"]
[ext_resource type="PackedScene" uid="uid://dhpc2xvlfln7o" path="res://objects/actionable.tscn" id="4_pths5"]
[ext_resource type="Resource" uid="uid://b1gd54koq1h7o" path="res://dialogue/testdialogue.dialogue" id="5_i1opu"]
[ext_resource type="PackedScene" uid="uid://dmagdl5pi6jdj" path="res://world/level.tscn" id="6_svjo8"]
@ -11,12 +12,13 @@
[ext_resource type="PackedScene" uid="uid://cgde10y3e7w86" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/rocks.glb" id="9_0hvyx"]
[ext_resource type="PackedScene" uid="uid://dg1rtct0vrk3p" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/poles.glb" id="10_8fhnl"]
[ext_resource type="PackedScene" uid="uid://cej0a41nm3eh7" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/mushrooms.glb" id="11_ytfwt"]
[ext_resource type="PackedScene" uid="uid://kpyvcyklt68g" path="res://assets/scene_props/bridge.tscn" id="12_ybrl7"]
[ext_resource type="Script" path="res://player.gd" id="13_2wo8v"]
[ext_resource type="Script" path="res://model/quest_state.gd" id="14_g3xjj"]
[ext_resource type="Script" path="res://quests/builder_missing_tool_quest.gd" id="14_g3xjj"]
[ext_resource type="PackedScene" uid="uid://dy8vjf760prhq" path="res://assets/characters/rogue.tscn" id="15_2476h"]
[ext_resource type="PackedScene" uid="uid://bo788o53t4rbq" path="res://scenes/startup_scene.tscn" id="16_7jwuc"]
[ext_resource type="Script" path="res://root_ui.gd" id="16_winq7"]
[ext_resource type="Theme" uid="uid://dmk7hc81l8gbw" path="res://ui/ui_theme.tres" id="17_1odts"]
[ext_resource type="Script" path="res://quests/scared_to_walk_in_the_dark.gd" id="18_7v3bk"]
[ext_resource type="Script" path="res://game_ui.gd" id="18_i4pxl"]
[ext_resource type="Script" path="res://ui/game_menu_ui.gd" id="18_lr26g"]
[ext_resource type="Texture2D" uid="uid://c7fu3paj3b4e8" path="res://assets/3rdparty/kenney/ui-pack-rpg-expansion/PNG/cursorSword_silver.png" id="19_mn7wc"]
@ -37,15 +39,6 @@ sky = SubResource("Sky_wbut8")
ambient_light_source = 3
ambient_light_color = Color(0.662452, 0.662452, 0.662452, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ikb15"]
vertex_color_is_srgb = true
albedo_color = Color(1, 1, 0.172549, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_w3ek8"]
material = SubResource("StandardMaterial3D_ikb15")
radius = 0.12
height = 0.6
[sub_resource type="CylinderShape3D" id="CylinderShape3D_vq44x"]
height = 0.6
radius = 0.158352
@ -70,107 +63,119 @@ radius = 0.194932
[node name="Game" type="Node3D"]
script = ExtResource("1_uwyoo")
[node name="World" type="Node3D" parent="."]
[node name="StartupScene" parent="." instance=ExtResource("16_7jwuc")]
unique_name_in_owner = true
visible = false
[node name="WorldEnvironment" type="WorldEnvironment" parent="World"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="StartupScene"]
environment = SubResource("Environment_v85yo")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="World"]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="StartupScene"]
transform = Transform3D(0.836133, 0.124138, 0.534295, -0.548527, 0.189226, 0.81444, 0, -0.974055, 0.226311, 5.06819, 4.51394, 0)
shadow_enabled = true
[node name="Merchant" type="CharacterBody3D" parent="World"]
[node name="GameScene" type="Node3D" parent="."]
unique_name_in_owner = true
visible = false
script = ExtResource("3_j7rx1")
[node name="WorldEnvironment" type="WorldEnvironment" parent="GameScene"]
environment = SubResource("Environment_v85yo")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="GameScene"]
transform = Transform3D(0.836133, 0.124138, 0.534295, -0.548527, 0.189226, 0.81444, 0, -0.974055, 0.226311, 5.06819, 4.51394, 0)
shadow_enabled = true
[node name="Merchant" type="CharacterBody3D" parent="GameScene"]
unique_name_in_owner = true
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 3.64783, 0, -1.58598)
[node name="MeshInstance3D" type="MeshInstance3D" parent="World/Merchant"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3, 0)
mesh = SubResource("CapsuleMesh_w3ek8")
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Merchant"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GameScene/Merchant"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.310637, 0)
shape = SubResource("CylinderShape3D_vq44x")
[node name="StateMarker" type="Sprite3D" parent="World/Merchant"]
[node name="StateMarker" type="Sprite3D" parent="GameScene/Merchant"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0272007, 0.901301, 0.168392)
centered = false
billboard = 1
texture_filter = 0
texture = ExtResource("2_4dxur")
[node name="Geometry" type="Node3D" parent="World/Merchant"]
[node name="Geometry" type="Node3D" parent="GameScene/Merchant"]
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0)
[node name="Engineer" parent="World/Merchant/Geometry" instance=ExtResource("3_gf736")]
[node name="Engineer" parent="GameScene/Merchant/Geometry" instance=ExtResource("3_gf736")]
[node name="Actionable" parent="World/Merchant" instance=ExtResource("4_pths5")]
[node name="Actionable" parent="GameScene/Merchant" instance=ExtResource("4_pths5")]
dialogue_resource = ExtResource("5_i1opu")
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Merchant/Actionable"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GameScene/Merchant/Actionable"]
shape = SubResource("SphereShape3D_6nrvr")
[node name="Level" parent="World" instance=ExtResource("6_svjo8")]
[node name="Level" parent="GameScene" instance=ExtResource("6_svjo8")]
[node name="Decorations" type="Node3D" parent="World"]
[node name="Decorations" type="Node3D" parent="GameScene"]
[node name="tree-pine2" parent="World/Decorations" instance=ExtResource("7_0tqw3")]
[node name="tree-pine2" parent="GameScene/Decorations" instance=ExtResource("7_0tqw3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.754677, 0, 0.0391712)
[node name="tree2" parent="World/Decorations" instance=ExtResource("8_ivm2f")]
[node name="tree2" parent="GameScene/Decorations" instance=ExtResource("8_ivm2f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.80764, 0, -3.13532)
[node name="rocks2" parent="World/Decorations" instance=ExtResource("9_0hvyx")]
[node name="rocks2" parent="GameScene/Decorations" instance=ExtResource("9_0hvyx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.3817, -4.76837e-07, -3.3938)
[node name="poles2" parent="World/Decorations" instance=ExtResource("10_8fhnl")]
[node name="poles2" parent="GameScene/Decorations" instance=ExtResource("10_8fhnl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.56186, 0, -3.13331)
[node name="mushrooms2" parent="World/Decorations" instance=ExtResource("11_ytfwt")]
[node name="mushrooms2" parent="GameScene/Decorations" instance=ExtResource("11_ytfwt")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.851, 0, 0.798104)
[node name="Bridge" type="Node3D" parent="World"]
[node name="Bridge" type="Node3D" parent="GameScene"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.375699, -0.115042, 0)
[node name="BridgePart2" parent="World/Bridge" instance=ExtResource("12_ybrl7")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5.723, 0, -1.439)
[node name="Player" type="CharacterBody3D" parent="World" groups=["savable_nodes"]]
[node name="Player" type="CharacterBody3D" parent="GameScene"]
unique_name_in_owner = true
script = ExtResource("13_2wo8v")
[node name="QuestState" type="Node" parent="World/Player"]
unique_name_in_owner = true
script = ExtResource("14_g3xjj")
[node name="MeshInstance3D" type="MeshInstance3D" parent="World/Player"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="GameScene/Player"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3, 0)
visible = false
mesh = SubResource("CapsuleMesh_dwrtd")
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Player"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GameScene/Player"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.470516, 0)
shape = SubResource("CapsuleShape3D_7kfad")
[node name="Camera3D" type="Camera3D" parent="World/Player"]
transform = Transform3D(1, 0, 0, 0, 0.460138, 0.887848, 0, -0.887848, 0.460138, 0, 2.91421, 1.186)
current = true
[node name="Geometry" type="Node3D" parent="World/Player"]
[node name="Geometry" type="Node3D" parent="GameScene/Player"]
unique_name_in_owner = true
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0)
[node name="Rogue" parent="World/Player/Geometry" instance=ExtResource("15_2476h")]
[node name="Rogue" parent="GameScene/Player/Geometry" instance=ExtResource("15_2476h")]
[node name="ActionableDetector" type="Area3D" parent="World/Player"]
[node name="ActionableDetector" type="Area3D" parent="GameScene/Player"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.325311)
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="World/Player/ActionableDetector"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GameScene/Player/ActionableDetector"]
shape = SubResource("SphereShape3D_wrkyq")
[node name="Camera3D" type="Camera3D" parent="GameScene/Player"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 0.460138, 0.887848, 0, -0.887848, 0.460138, 0, 2.91421, 1.186)
[node name="Quests" type="Node" parent="GameScene"]
[node name="BuilderMissingTool" type="Node" parent="GameScene/Quests" groups=["quest_state"]]
unique_name_in_owner = true
script = ExtResource("14_g3xjj")
[node name="ScaredToWalkInTheDark" type="Node" parent="GameScene/Quests" groups=["quest_state"]]
script = ExtResource("18_7v3bk")
[node name="RootUI" type="CanvasLayer" parent="."]
unique_name_in_owner = true
script = ExtResource("16_winq7")
@ -659,6 +664,7 @@ icon = ExtResource("20_3b2hv")
layout_mode = 2
icon = ExtResource("21_act8d")
[connection signal="visibility_changed" from="GameScene" to="GameScene" method="_on_visibility_changed"]
[connection signal="pressed" from="RootUI/MainMenuUI/MarginContainer/VBoxContainer/MarginContainer/NewGameButton" to="RootUI" method="_on_new_game_button_pressed"]
[connection signal="pressed" from="RootUI/MainMenuUI/MarginContainer/VBoxContainer/MarginContainer3/QuitButton" to="RootUI" method="_on_quit_button_pressed"]
[connection signal="pressed" from="RootUI/NewGameUI/MarginContainer/VBoxContainer/MarginContainer3/HBoxContainer/BackButton" to="RootUI" method="_to_main_menu_button_pressed"]

6
scenes/game_scene.gd Normal file
View File

@ -0,0 +1,6 @@
extends Node3D
@onready var camera_3d = %Camera3D
func _on_visibility_changed():
camera_3d.current = visible

6
scenes/startup_scene.gd Normal file
View File

@ -0,0 +1,6 @@
extends Node3D
@onready var camera_3d = %Camera3D
func _on_visibility_changed():
camera_3d.current = visible

131
scenes/startup_scene.tscn Normal file
View File

@ -0,0 +1,131 @@
[gd_scene load_steps=13 format=3 uid="uid://bo788o53t4rbq"]
[ext_resource type="MeshLibrary" uid="uid://dcpuitbu16j1a" path="res://assets/mesh_library.tres" id="1_23vus"]
[ext_resource type="Script" path="res://scenes/startup_scene.gd" id="1_w7rl3"]
[ext_resource type="PackedScene" uid="uid://cofd468cwkntk" path="res://assets/scene_props/campfire_pit.tscn" id="2_m2sxe"]
[ext_resource type="PackedScene" uid="uid://dtlvapvk6brjn" path="res://assets/3rdparty/kenney/survival-kit/Models/tree-tall.glb" id="3_2dy0f"]
[ext_resource type="PackedScene" uid="uid://838tgcaf8b2v" path="res://assets/3rdparty/kenney/survival-kit/Models/tree.glb" id="4_osvg3"]
[ext_resource type="PackedScene" uid="uid://malxjajkyimm" path="res://assets/3rdparty/kenney/survival-kit/Models/treeLarge.glb" id="5_shbpk"]
[ext_resource type="PackedScene" uid="uid://cxknc8dvwjsnw" path="res://assets/3rdparty/kenney/survival-kit/Models/tree-autumn.glb" id="6_b2byk"]
[ext_resource type="PackedScene" uid="uid://dnobr4inhiskv" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/tree-pine.glb" id="7_oe6kd"]
[ext_resource type="PackedScene" uid="uid://cgde10y3e7w86" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/rocks.glb" id="8_os8uw"]
[ext_resource type="PackedScene" uid="uid://cej0a41nm3eh7" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/mushrooms.glb" id="9_s4xoa"]
[ext_resource type="PackedScene" uid="uid://c5fd67ak8kwtk" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/chest.glb" id="10_8gpnl"]
[ext_resource type="PackedScene" uid="uid://dy8vjf760prhq" path="res://assets/characters/rogue.tscn" id="11_4cmvr"]
[node name="StartupScene" type="Node3D"]
script = ExtResource("1_w7rl3")
[node name="GridMap" type="GridMap" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
rotation_order = 1
mesh_library = ExtResource("1_23vus")
cell_size = Vector3(0.5, 0.5, 0.5)
cell_center_y = false
data = {
"cells": PackedInt32Array(1, 65534, 655374, 65534, 65534, 655374, 65534, 65531, 655374, 1, 65531, 655374, 4, 65534, 655374, 4, 65531, 655374, 65534, 1, 655374, 1, 1, 655374, 4, 1, 655374, 7, 1, 655374, 7, 65534, 655374, 7, 65531, 655374, 7, 65528, 655374, 4, 65528, 655374, 1, 65528, 655374, 65534, 65528, 655374, 13, 1, 1048590, 13, 65534, 1048590, 13, 65531, 1048590, 13, 65528, 1048590, 65531, 65528, 1048590, 65531, 65531, 1048590, 65531, 65534, 1048590, 65531, 1, 1048590, 65531, 65525, 1048590, 65534, 65525, 1048590, 1, 65525, 1048590, 4, 65525, 1048590, 7, 65525, 1048590, 13, 65525, 1048590, 7, 65522, 1048590, 4, 65522, 1048590, 1, 65522, 1048590, 65534, 65522, 1048590, 65531, 65522, 1048590, 65531, 4, 1048590, 65534, 4, 1048590, 1, 4, 1048590, 4, 4, 1048590, 7, 4, 1048590, 65543, 65527, 9, 65541, 65527, 9, 65538, 65527, 9, 131067, 65527, 9, 131066, 65529, 1441801, 131066, 65532, 1441801, 131066, 65535, 1441801, 131066, 1, 1441801, 131066, 4, 1441801, 131068, 5, 655369, 131071, 5, 655369, 65538, 5, 655369, 65541, 5, 655369, 65543, 5, 9, 65544, 4, 1441801, 65544, 1, 1441801)
}
metadata/_editor_floor_ = Vector3(0, 1, 0)
[node name="campfire-pit2" parent="." instance=ExtResource("2_m2sxe")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0.025619, 0, 0.191859)
[node name="tree-tall2" parent="." instance=ExtResource("3_2dy0f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.846552, 0, -0.900399)
[node name="tree" parent="." instance=ExtResource("4_osvg3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.336614, 0, -1.71376)
[node name="treeLarge" parent="." instance=ExtResource("5_shbpk")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.561918, 0, -0.963351)
[node name="tree-autumn2" parent="." instance=ExtResource("6_b2byk")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.43078, 2.38419e-07, -0.436819)
[node name="tree-pine2" parent="." instance=ExtResource("7_oe6kd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.23662, -2.38419e-07, -0.132854)
[node name="rocks2" parent="." instance=ExtResource("8_os8uw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.103751, 0, -2.67859)
[node name="rocks3" parent="." instance=ExtResource("8_os8uw")]
transform = Transform3D(0.651781, 0, -0.758407, 0, 1, 0, 0.758407, 0, 0.651781, 0.35716, 0, -1.99625)
[node name="mushrooms2" parent="." instance=ExtResource("9_s4xoa")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.290565, 0, -1.01561)
[node name="chest2" parent="." instance=ExtResource("10_8gpnl")]
transform = Transform3D(0.839762, 0, 0.542955, 0, 1, 0, -0.542955, 0, 0.839762, -0.783749, 1.19209e-07, -0.497856)
[node name="Rogue" parent="." instance=ExtResource("11_4cmvr")]
transform = Transform3D(0.288245, 0, -0.408552, 0, 0.5, 0, 0.408552, 0, 0.288245, 0.770785, 0, -0.103924)
[node name="Skeleton3D" parent="Rogue/Rig" index="0"]
bones/1/position = Vector3(-2.84837e-08, 0.0833394, 0.119469)
bones/1/rotation = Quaternion(-0.175269, -1.17364e-07, -2.08937e-08, 0.984521)
bones/2/rotation = Quaternion(-7.55703e-09, 0.167251, -6.91603e-09, 0.985914)
bones/3/rotation = Quaternion(0.0880089, -0.144759, -0.0256382, 0.985212)
bones/4/position = Vector3(0.21746, 0.0758712, -0.0790641)
bones/4/rotation = Quaternion(-0.50947, 0.104276, -0.643679, 0.561467)
bones/5/rotation = Quaternion(-4.50514e-08, -2.70422e-08, -0.586852, 0.809695)
bones/7/rotation = Quaternion(0.484512, -0.207236, 0.521791, 0.670847)
bones/8/rotation = Quaternion(1.60975e-09, 1.60975e-09, -0.707107, 0.707107)
bones/10/position = Vector3(-0.255796, 0.0363052, -0.0434782)
bones/10/rotation = Quaternion(-0.62846, 0.0929782, 0.672582, 0.379508)
bones/11/rotation = Quaternion(-1.47479e-08, 5.90916e-08, 0.47487, 0.880056)
bones/13/rotation = Quaternion(-0.251916, 0.144353, -0.329644, 0.898352)
bones/14/rotation = Quaternion(0.478104, -0.344156, 0.495796, 0.638091)
bones/19/rotation = Quaternion(0.0785513, -0.0203664, 0.0468292, 0.995601)
bones/21/position = Vector3(0.129825, 0.0937154, 0.113309)
bones/21/rotation = Quaternion(0.643386, 0.23148, -0.140509, 0.716051)
bones/22/rotation = Quaternion(0.834207, 8.24215e-09, -5.46128e-07, 0.551451)
bones/23/rotation = Quaternion(-0.375958, 0.0247004, -0.0361405, 0.925602)
bones/25/position = Vector3(-0.152764, 0.0962428, 0.105014)
bones/25/rotation = Quaternion(0.688971, -0.0853366, 0.195185, 0.692777)
bones/26/rotation = Quaternion(0.596211, -4.50314e-08, 3.98116e-07, 0.802828)
bones/27/rotation = Quaternion(-0.673783, -0.132482, 0.048611, 0.725329)
bones/29/position = Vector3(0.47237, 0.29231, 0.748253)
bones/29/rotation = Quaternion(0.695266, 0.12886, -0.12886, 0.695266)
bones/30/position = Vector3(0.281208, 0.0259903, 0.591192)
bones/30/rotation = Quaternion(-0.60678, 0.143396, 0.11246, 0.773698)
bones/31/position = Vector3(0.0185372, 0.302979, -0.06597)
bones/31/rotation = Quaternion(0.00811112, 0.138139, 0.987181, -0.0795382)
bones/36/position = Vector3(-0.385815, 0.29231, 0.793429)
bones/36/rotation = Quaternion(0.695266, -0.12886, 0.12886, 0.695266)
bones/37/position = Vector3(-0.28153, 0.0259903, 0.59293)
bones/37/rotation = Quaternion(-0.60678, -0.143396, -0.11246, 0.773698)
bones/38/position = Vector3(-1.03442e-08, 0.0355176, 2.42861e-15)
bones/38/rotation = Quaternion(-6.43687e-09, 0.707107, 0.707107, -3.64558e-09)
bones/41/rotation = Quaternion(1, 1.69223e-08, 1.98681e-07, -7.45058e-09)
bones/43/position = Vector3(0.453507, 0.516276, -0.541885)
bones/44/position = Vector3(0.424984, 0.307011, -0.211567)
bones/44/rotation = Quaternion(0.635111, 0.31086, 0.31086, -0.635111)
bones/45/position = Vector3(-0.453507, 0.516276, -0.541885)
bones/46/position = Vector3(-0.537515, 0.355068, 0.0136795)
bones/46/rotation = Quaternion(-0.703979, 0.0664364, 0.703979, 0.0664366)
[node name="Knife_Offhand" parent="Rogue/Rig/Skeleton3D" index="0"]
transform = Transform3D(-0.789721, 0.613466, -5.00991e-08, 9.10955e-07, 1.63913e-06, 0.999999, 0.613465, 0.789721, -1.55019e-06, 0.522692, 0.185527, -0.240803)
[node name="1H_Crossbow" parent="Rogue/Rig/Skeleton3D" index="1"]
transform = Transform3D(0.122557, -0.273717, -0.95397, -0.991848, 1.2327e-06, -0.127424, 0.034879, 0.96181, -0.271486, -0.431347, 0.220589, 0.081206)
[node name="2H_Crossbow" parent="Rogue/Rig/Skeleton3D" index="2"]
transform = Transform3D(0.122557, -0.273717, -0.95397, -0.991848, 1.2327e-06, -0.127424, 0.034879, 0.96181, -0.271486, -0.431347, 0.220589, 0.081206)
[node name="Knife" parent="Rogue/Rig/Skeleton3D" index="3"]
transform = Transform3D(0.95397, -0.273716, 0.122557, 0.127424, 9.55173e-07, -0.991848, 0.271485, 0.96181, 0.0348787, -0.533994, 0.207257, 0.0627638)
[node name="Throwable" parent="Rogue/Rig/Skeleton3D" index="4"]
transform = Transform3D(0.95397, -0.273716, 0.122557, 0.127424, 1.07529e-06, -0.991848, 0.271485, 0.96181, 0.0348788, -0.58333, 0.207257, 0.236126)
[node name="Rogue_Cape" parent="Rogue/Rig/Skeleton3D" index="5"]
transform = Transform3D(0.995827, 0.0832756, 0.0373211, -0.088763, 0.978856, 0.184287, -0.0211854, -0.18683, 0.982164, 0.0202564, 0.853573, -0.121643)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="Camera3D" type="Camera3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 0.874755, 0.484565, 0, -0.484565, 0.874755, -0.324179, 0.800866, 0.927808)
[editable path="Rogue"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://dmagdl5pi6jdj"]
[gd_scene load_steps=15 format=3 uid="uid://dmagdl5pi6jdj"]
[ext_resource type="MeshLibrary" uid="uid://dcpuitbu16j1a" path="res://assets/mesh_library.tres" id="1_q0eym"]
[ext_resource type="PackedScene" uid="uid://da5r82nvypfk4" path="res://objects/pickup_item.tscn" id="2_qurr0"]
@ -7,9 +7,13 @@
[ext_resource type="Resource" uid="uid://egkatj1ci0ga" path="res://data/items/wrench.tres" id="5_tmrcc"]
[ext_resource type="Resource" uid="uid://coser1y1y5unl" path="res://data/items/door.tres" id="5_twsf3"]
[ext_resource type="PackedScene" uid="uid://ca2l61b2j3y5b" path="res://assets/tools/Pickaxe.tscn" id="6_fq3ct"]
[ext_resource type="PackedScene" uid="uid://ysfnsrvgemi6" path="res://assets/resources/wood_planks.tscn" id="8_4vlpe"]
[ext_resource type="Resource" uid="uid://c1ll2snhgv3m1" path="res://data/items/treelog.tres" id="8_pafka"]
[ext_resource type="PackedScene" uid="uid://bbmt7xom1j84b" path="res://assets/resources/tree_log.tscn" id="9_51v1q"]
[ext_resource type="PackedScene" uid="uid://dnobr4inhiskv" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/tree-pine.glb" id="11_ldjca"]
[ext_resource type="PackedScene" uid="uid://m4tk7vhjy310" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/tree.glb" id="12_l5e57"]
[ext_resource type="PackedScene" uid="uid://cgde10y3e7w86" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/rocks.glb" id="13_dbop6"]
[ext_resource type="PackedScene" uid="uid://dg1rtct0vrk3p" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/poles.glb" id="14_8e8cl"]
[ext_resource type="PackedScene" uid="uid://cej0a41nm3eh7" path="res://assets/3rdparty/kenney/platformer-kit/Models/GLB format/mushrooms.glb" id="15_y1ifw"]
[node name="Level" type="Node3D"]
@ -18,11 +22,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
rotation_order = 1
mesh_library = ExtResource("1_q0eym")
cell_size = Vector3(0.5, 0.5, 0.5)
cell_center_x = false
cell_center_y = false
cell_center_z = false
data = {
"cells": PackedInt32Array(0, 0, 14, 3, 0, 14, 6, 0, 14, 0, 65533, 14, 3, 65533, 14, 0, 3, 14, 3, 3, 14, 6, 3, 14, 6, 65533, 14, 6, 65530, 14, 3, 65530, 14, 0, 65530, 14, 65533, 65530, 14, 65533, 65533, 14, 65533, 0, 14, 65533, 3, 14, 65545, 1, 1441801, 65545, 4, 1441801, 65545, 65530, 1441801, 65543, 65528, 9, 65540, 65528, 9, 131067, 65529, 1441801, 131067, 65532, 1441801, 131067, 65535, 1441801, 131067, 2, 1441801, 131068, 65528, 9, 65544, 5, 9, 65538, 5, 9, 131071, 5, 9, 131068, 5, 9, 131067, 3, 1441801, 15, 65530, 14, 15, 65527, 14, 15, 65524, 14, 18, 65524, 14, 21, 65524, 14, 21, 65527, 14, 21, 65530, 14, 24, 65530, 14, 24, 65533, 14, 27, 65533, 14, 30, 65533, 14, 33, 65533, 14, 33, 65530, 14, 36, 65530, 14, 36, 65533, 14, 36, 65527, 14, 39, 65527, 14, 39, 65530, 14, 39, 65524, 14, 42, 65524, 14, 39, 65533, 14, 42, 65533, 14, 42, 65530, 14, 8, 65532, 14, 8, 65534, 14, 15, 65533, 14, 15, 65535, 14, 15, 1, 14)
"cells": PackedInt32Array(1, 65534, 655374, 65534, 65534, 655374, 65534, 65531, 655374, 1, 65531, 655374, 4, 65534, 655374, 4, 65531, 655374, 65534, 1, 655374, 1, 1, 655374, 4, 1, 655374, 7, 1, 655374, 7, 65534, 655374, 7, 65531, 655374, 7, 65528, 655374, 4, 65528, 655374, 1, 65528, 655374, 65534, 65528, 655374, 13, 1, 1048590, 13, 65534, 1048590, 13, 65531, 1048590, 13, 65528, 1048590, 65531, 65528, 1048590, 65531, 65531, 1048590, 65531, 65534, 1048590, 65531, 1, 1048590, 65531, 65525, 1048590, 65534, 65525, 1048590, 1, 65525, 1048590, 4, 65525, 1048590, 7, 65525, 1048590, 13, 65525, 1048590, 7, 65522, 1048590, 4, 65522, 1048590, 1, 65522, 1048590, 65534, 65522, 1048590, 65531, 65522, 1048590, 65531, 4, 1048590, 65534, 4, 1048590, 1, 4, 1048590, 4, 4, 1048590, 7, 4, 1048590, 65543, 65527, 9, 65541, 65527, 9, 65538, 65527, 9, 131067, 65527, 9, 131066, 65529, 1441801, 131066, 65532, 1441801, 131066, 65535, 1441801, 131066, 1, 1441801, 131066, 4, 1441801, 131068, 5, 655369, 131071, 5, 655369, 65538, 5, 655369, 65541, 5, 655369, 65543, 5, 9, 65544, 4, 1441801, 65544, 1, 1441801, 15, 65521, 13, 15, 65522, 13, 15, 65523, 13, 15, 65524, 13, 15, 65525, 13, 15, 65526, 13, 16, 65527, 13, 16, 65528, 13, 15, 65528, 13, 15, 65529, 13, 15, 65530, 13)
}
metadata/_editor_floor_ = Vector3(0, 0, 0)
@ -44,13 +46,25 @@ item = ExtResource("5_twsf3")
[node name="_Node3D_153924" parent="Objects/Item4" instance=ExtResource("6_fq3ct")]
[node name="Item2" parent="Objects" instance=ExtResource("2_qurr0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.978853, -2.38419e-07, -1.39068)
[node name="_Node3D_153925" parent="Objects/Item2" instance=ExtResource("8_4vlpe")]
[node name="Item3" parent="Objects" instance=ExtResource("2_qurr0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.28455, 0, -0.204204)
item = ExtResource("8_pafka")
[node name="_Node3D_153926" parent="Objects/Item3" instance=ExtResource("9_51v1q")]
[node name="Decorations" type="Node3D" parent="."]
[node name="tree-pine2" parent="Decorations" instance=ExtResource("11_ldjca")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.754677, 0, 0.0391712)
[node name="tree2" parent="Decorations" instance=ExtResource("12_l5e57")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.80764, 0, -3.13532)
[node name="rocks2" parent="Decorations" instance=ExtResource("13_dbop6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.3817, -4.76837e-07, -3.3938)
[node name="poles2" parent="Decorations" instance=ExtResource("14_8e8cl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.56186, 0, -3.13331)
[node name="mushrooms2" parent="Decorations" instance=ExtResource("15_y1ifw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.851, 0, 0.798104)