diff --git a/CHANGELOG.md b/CHANGELOG.md index 90f32f27..07db20c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +## [4.0.0-alpha.94](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.94) (2022-02-15) + + +### Features + +* Debug set state animations ([#495](https://github.com/godot-escoria/escoria-demo-game/issues/495)) ([5e0e83f](https://github.com/godot-escoria/escoria-demo-game/commit/5e0e83f23edf4ef782f1a7773f2e5d1d2594faf3)) + + + +## [4.0.0-alpha.93](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.93) (2022-02-15) + + +### Bug Fixes + +* use Escoria plugin version from plugin.cfg in savegames ([#489](https://github.com/godot-escoria/escoria-demo-game/issues/489)) ([2384127](https://github.com/godot-escoria/escoria-demo-game/commit/2384127ca4aa7c262d2944885af615c492cab002)) + + + +## [4.0.0-alpha.92](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.92) (2022-02-12) + + +### Features + +* Updated room 1 graphics ([#491](https://github.com/godot-escoria/escoria-demo-game/issues/491)) ([5005267](https://github.com/godot-escoria/escoria-demo-game/commit/5005267e0dba684b6e4036023bd344a60e3ccccd)) + + + +## [4.0.0-alpha.91](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.91) (2022-02-06) + + +### Bug Fixes + +* set a proper guard in case of no speaking animations ([#488](https://github.com/godot-escoria/escoria-demo-game/issues/488)) ([326618d](https://github.com/godot-escoria/escoria-demo-game/commit/326618df180a72f700f9917e1139f246abae918e)) + + + ## [4.0.0-alpha.90](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.90) (2022-02-04) diff --git a/README.md b/README.md index e8ae1820..fd3d3e60 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ This is the demo game that acts as a testing ground for future Escoria developme ### Items * Generic items by Kenney +* Animal pack redux by Kenney Licence: CC0 Licence https://www.kenney.nl/assets/generic-items diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd index 9d6eee0b..43c48213 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd @@ -45,9 +45,25 @@ func set_state(p_state: String, immediate: bool = false): var actual_animator if animation_node.has_animation(p_state): if immediate: + escoria.logger.debug( + "State \"%s\" set. Matching immediate animation executing." % [ + p_state + ] + ) animation_node.seek_end(p_state) else: + escoria.logger.debug( + "State \"%s\" set. Matching non-immediate animation executing." % [ + p_state + ] + ) animation_node.play(p_state) + else: + escoria.logger.debug( + "State \"%s\" set. No matching animation found." % [ + p_state + ] + ) # Set the active value, thus hiding or showing the object diff --git a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd index bbadab85..23790d21 100644 --- a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd +++ b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd @@ -164,7 +164,11 @@ func save_game_crash(): # - p_savename: name of the savegame func _do_save_game(p_savename: String) -> ESCSaveGame: var save_game = ESCSaveGame.new() - save_game.escoria_version = escoria.ESCORIA_VERSION + + var plugin_config = ConfigFile.new() + plugin_config.load("res://addons/escoria-core/plugin.cfg") + save_game.escoria_version = plugin_config.get_value("plugin", "version") + save_game.game_version = escoria.project_settings_manager.get_setting( escoria.project_settings_manager.GAME_VERSION ) @@ -383,7 +387,10 @@ func load_game(id: int): # Save the game settings in the settings file. func save_settings(): var settings_res := ESCSaveSettings.new() - settings_res.escoria_version = escoria.ESCORIA_VERSION + var plugin_config = ConfigFile.new() + plugin_config.load("res://addons/escoria-core/plugin.cfg") + + settings_res.escoria_version = plugin_config.get_value("plugin", "version") settings_res.text_lang = escoria.settings.text_lang settings_res.voice_lang = escoria.settings.voice_lang settings_res.speech_enabled = escoria.settings.speech_enabled diff --git a/addons/escoria-core/game/escoria.gd b/addons/escoria-core/game/escoria.gd index 7a1625c7..d936abf3 100644 --- a/addons/escoria-core/game/escoria.gd +++ b/addons/escoria-core/game/escoria.gd @@ -24,9 +24,6 @@ enum GAME_STATE { } -# Escoria version number -const ESCORIA_VERSION = "0.1.0" - # Audio bus indices. const BUS_MASTER = "Master" const BUS_SFX = "SFX" diff --git a/addons/escoria-core/ui_library/menus/load_save/load/load_game.gd b/addons/escoria-core/ui_library/menus/load_save/load/load_game.gd index 42a8d0ef..ae07bb36 100644 --- a/addons/escoria-core/ui_library/menus/load_save/load/load_game.gd +++ b/addons/escoria-core/ui_library/menus/load_save/load/load_game.gd @@ -34,11 +34,12 @@ func refresh_savegames(): $VBoxContainer/ScrollContainer/slots.remove_child(slot) var saves_list = escoria.save_manager.get_saves_list() - for i in saves_list.size(): - var save_data = saves_list[i+1] - var new_slot = slot_ui_scene.instance() - $VBoxContainer/ScrollContainer/slots.add_child( - new_slot - ) - new_slot.set_slot_name_date(save_data["name"], save_data["date"]) - new_slot.connect("pressed", self, "_on_slot_pressed", [i+1]) + for i in range(saves_list.keys().max() + 1): + if saves_list.has(i): + var save_data = saves_list[i] + var new_slot = slot_ui_scene.instance() + $VBoxContainer/ScrollContainer/slots.add_child( + new_slot + ) + new_slot.set_slot_name_date(save_data["name"], save_data["date"]) + new_slot.connect("pressed", self, "_on_slot_pressed", [i]) diff --git a/addons/escoria-core/ui_library/menus/load_save/save/save_game.gd b/addons/escoria-core/ui_library/menus/load_save/save/save_game.gd index ce9c66d5..97644154 100644 --- a/addons/escoria-core/ui_library/menus/load_save/save/save_game.gd +++ b/addons/escoria-core/ui_library/menus/load_save/save/save_game.gd @@ -34,12 +34,13 @@ func refresh_savegames(): _slots.remove_child(slot) var saves_list = escoria.save_manager.get_saves_list() - for i in saves_list.size(): - var save_data = saves_list[i+1] - var new_slot = slot_ui_scene.instance() - _slots.add_child(new_slot) - new_slot.set_slot_name_date(save_data["name"], save_data["date"]) - new_slot.connect("pressed", self, "_on_slot_pressed", [i+1]) + for i in range(saves_list.keys().max() + 1): + if saves_list.has(i): + var save_data = saves_list[i] + var new_slot = slot_ui_scene.instance() + _slots.add_child(new_slot) + new_slot.set_slot_name_date(save_data["name"], save_data["date"]) + new_slot.connect("pressed", self, "_on_slot_pressed", [i]) var datetime = OS.get_datetime() var datetime_string = "%02d/%02d/%02d %02d:%02d" % [ diff --git a/game/assets_sources/worker/worker.png b/game/assets_sources/worker/worker.png index bb83fd86..dce2539e 100644 Binary files a/game/assets_sources/worker/worker.png and b/game/assets_sources/worker/worker.png differ diff --git a/game/items/escitems/button.tscn b/game/items/escitems/button.tscn index 2f891748..2805d274 100644 --- a/game/items/escitems/button.tscn +++ b/game/items/escitems/button.tscn @@ -7,13 +7,13 @@ offsets = PoolRealArray( 0, 0.830189 ) colors = PoolColorArray( 1, 1, 1, 1, 0.353516, 0.353516, 0.353516, 1 ) -[sub_resource type="GradientTexture" id=2] +[sub_resource type="GradientTexture" id=8] gradient = SubResource( 1 ) [sub_resource type="Curve" id=3] _data = [ Vector2( 0, 0.0886364 ), 0.0, 0.0, 0, 0, Vector2( 0.612766, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.770213, 0.95 ), -1.55372, -1.55372, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] -[sub_resource type="CurveTexture" id=4] +[sub_resource type="CurveTexture" id=9] curve = SubResource( 3 ) [sub_resource type="ParticlesMaterial" id=5] @@ -31,8 +31,8 @@ angle = 160.0 angle_random = 1.0 scale = 0.5 scale_random = 0.45 -scale_curve = SubResource( 4 ) -color_ramp = SubResource( 2 ) +scale_curve = SubResource( 9 ) +color_ramp = SubResource( 8 ) [sub_resource type="Animation" id=6] resource_name = "button_broken" @@ -82,7 +82,6 @@ polygon = PoolVector2Array( 343.993, 396.767, 323.298, 415.689, 344.585, 438.158 [node name="Particles2D" type="Particles2D" parent="."] position = Vector2( 344.768, 142.144 ) -emitting = false amount = 16 lifetime = 4.0 preprocess = 1.99 diff --git a/game/rooms/room01/art1.png b/game/rooms/room01/art1.png new file mode 100644 index 00000000..21ad184a Binary files /dev/null and b/game/rooms/room01/art1.png differ diff --git a/game/rooms/room01/art2.png b/game/rooms/room01/art2.png new file mode 100644 index 00000000..a0045ee5 Binary files /dev/null and b/game/rooms/room01/art2.png differ diff --git a/game/rooms/room01/background.tscn b/game/rooms/room01/background.tscn deleted file mode 100644 index 993665d2..00000000 --- a/game/rooms/room01/background.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1] - -[node name="background" type="TextureRect"] -margin_right = 1289.0 -margin_bottom = 555.0 -mouse_filter = 2 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="l_platform" type="Line2D" parent="."] -position = Vector2( 2, -266 ) -points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 1167.5, 612.894, 1281.5, 668.894, 1281.5, 812.894, -4.3772, 811.004, -2.96295, 713.424 ) - -[node name="r_door" type="Line2D" parent="."] -position = Vector2( 0, -267.828 ) -points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1188.64, 624.843 ) diff --git a/game/rooms/room01/esc/trigger.esc b/game/rooms/room01/esc/trigger.esc index 5ed0e1de..0555b052 100644 --- a/game/rooms/room01/esc/trigger.esc +++ b/game/rooms/room01/esc/trigger.esc @@ -2,4 +2,4 @@ :trigger_out -say player "About to leave..." +say player "I'm near the door." diff --git a/game/rooms/room01/item.tscn b/game/rooms/room01/item.tscn deleted file mode 100644 index 6ec39df1..00000000 --- a/game/rooms/room01/item.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1] -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2] - -[node name="item" type="Area2D"] -pause_mode = 1 -script = ExtResource( 1 ) -tooltip_name = "Item on the wall" -default_action = "look" -dialog_color = Color( 1, 1, 1, 1 ) -animations = null - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] -position = Vector2( -652.737, -162.85 ) -polygon = PoolVector2Array( 635.586, 253.345, 568.928, 60.1716, 709.047, 120.028, 699.524, 247.903 ) - -[node name="Line2D" type="Line2D" parent="."] -position = Vector2( -655.406, -430.678 ) -points = PoolVector2Array( 634.097, 516.751, 578.861, 335.008, 701.805, 386.68, 696.459, 509.624, 634.097, 516.751 ) -__meta__ = { -"_editor_description_": "" -} - -[node name="ESCLocation" type="Position2D" parent="."] -position = Vector2( 0, 236.681 ) -script = ExtResource( 2 ) diff --git a/game/rooms/room01/r_door.tscn b/game/rooms/room01/r_door.tscn deleted file mode 100644 index 5fb1e616..00000000 --- a/game/rooms/room01/r_door.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1] -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2] - -[node name="r_door" type="Area2D"] -pause_mode = 1 -script = ExtResource( 1 ) -__meta__ = { -"_editor_description_": "" -} -global_id = "r1_r_exit" -esc_script = "res://game/rooms/room01/esc/right_exit.esc" -is_exit = true -tooltip_name = "Exit" -default_action = "walk" -dialog_color = Color( 1, 1, 1, 1 ) -animations = null - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] -position = Vector2( -1229.68, -223.006 ) -polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 ) - -[node name="Position2D" type="Position2D" parent="."] -position = Vector2( -0.432617, 124.685 ) -script = ExtResource( 2 ) diff --git a/game/rooms/room01/room01.tscn b/game/rooms/room01/room01.tscn index 6ce91917..bd600029 100644 --- a/game/rooms/room01/room01.tscn +++ b/game/rooms/room01/room01.tscn @@ -1,14 +1,20 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=12 format=2] -[ext_resource path="res://game/rooms/room01/walkable_area.tscn" type="PackedScene" id=1] -[ext_resource path="res://game/rooms/room01/background.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=2] [ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3] [ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=7] -[ext_resource path="res://game/rooms/room01/r_door.tscn" type="PackedScene" id=8] -[ext_resource path="res://game/rooms/room01/item.tscn" type="PackedScene" id=9] +[ext_resource path="res://game/rooms/room01/room1background.png" type="Texture" id=8] +[ext_resource path="res://game/rooms/room01/art2.png" type="Texture" id=9] +[ext_resource path="res://game/rooms/room01/art1.png" type="Texture" id=10] + +[sub_resource type="NavigationPolygon" id=1] +vertices = PoolVector2Array( 125, 357, 1170, 355, 1277, 417, 1279, 550, -1, 548, 0, 449 ) +polygons = [ PoolIntArray( 0, 1, 2, 3, 4, 5 ) ] +outlines = [ PoolVector2Array( 125, 357, 1170, 355, 1277, 417, 1279, 550, -1, 548, 0, 449 ) ] [node name="room1" type="Node2D"] script = ExtResource( 6 ) @@ -21,15 +27,48 @@ player_scene = ExtResource( 4 ) camera_limits = [ Rect2( 0, 0, 1285, 550 ) ] editor_debug_mode = 1 -[node name="background" parent="." instance=ExtResource( 2 )] +[node name="ESCBackground" type="TextureRect" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +mouse_filter = 2 +texture = ExtResource( 8 ) +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} -[node name="advice" type="Label" parent="background"] +[node name="advice2" type="Label" parent="ESCBackground"] +anchor_right = 0.023274 +anchor_bottom = 0.018018 +margin_left = 90.2752 +margin_top = 170.824 +margin_right = 298.275 +margin_bottom = 215.824 +custom_fonts/font = ExtResource( 3 ) +text = "Move : left click +Fast move : double left click" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="room_label" type="Label" parent="ESCBackground"] +margin_left = 7.0 +margin_top = 3.0 +margin_right = 89.0 +margin_bottom = 24.0 +custom_fonts/font = ExtResource( 3 ) +text = "ROOM 1" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="advice" type="Label" parent="ESCBackground"] anchor_right = 0.023274 anchor_bottom = 0.018018 margin_left = 90.0 margin_top = 59.0 -margin_right = 338.0 -margin_bottom = 118.0 +margin_right = 368.0 +margin_bottom = 128.0 custom_fonts/font = ExtResource( 3 ) text = "Don't click immediately! Player will walk around the room, @@ -38,70 +77,99 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="advice2" type="Label" parent="background"] -anchor_right = 0.023274 -anchor_bottom = 0.018018 -margin_left = 90.2752 -margin_top = 170.824 -margin_right = 270.275 -margin_bottom = 205.824 -custom_fonts/font = ExtResource( 3 ) -text = "Move : left click -Fast move : double left click" -__meta__ = { -"_edit_use_anchors_": false -} +[node name="walkable_area" type="Navigation2D" parent="."] +script = ExtResource( 1 ) -[node name="room_label" type="Label" parent="background"] -margin_right = 40.0 -margin_bottom = 14.0 -custom_fonts/font = ExtResource( 3 ) -text = "ROOM 1" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="walkable_area" parent="." instance=ExtResource( 1 )] -position = Vector2( 3.5636, 0 ) +[node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="walkable_area"] +navpoly = SubResource( 1 ) [node name="Hotspots" type="Node" parent="."] -[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )] -position = Vector2( 1225.9, 217.966 ) +[node name="r_door" type="Area2D" parent="Hotspots"] +pause_mode = 1 +script = ExtResource( 5 ) +global_id = "r1_r_exit" +esc_script = "res://game/rooms/room01/esc/right_exit.esc" +is_exit = true +tooltip_name = "Exit to room 2" +default_action = "walk" +dialog_color = Color( 1, 1, 1, 1 ) +animations = null + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/r_door"] +polygon = PoolVector2Array( 1173, 63, 1278, 106, 1278, 420, 1172, 356 ) [node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"] -position = Vector2( 1.35498, 136.453 ) +position = Vector2( 1221, 400 ) script = ExtResource( 7 ) -[node name="item" parent="Hotspots" instance=ExtResource( 9 )] -position = Vector2( 480.542, 146.832 ) +[node name="artwork1" type="Area2D" parent="Hotspots"] +pause_mode = 1 +script = ExtResource( 5 ) global_id = "r1_wall_item1" esc_script = "res://game/rooms/room01/esc/wall_item.esc" +tooltip_name = "Artwork" +default_action = "look" +inventory_texture = ExtResource( 10 ) +dialog_color = Color( 1, 1, 1, 1 ) +animations = null -[node name="Label" type="Label" parent="Hotspots/item"] -margin_left = -105.12 -margin_top = 121.762 -margin_right = 122.88 -margin_bottom = 142.762 +[node name="Art1" type="Sprite" parent="Hotspots/artwork1"] +position = Vector2( 470, 140 ) +texture = ExtResource( 10 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/artwork1"] +position = Vector2( -84, 11.1 ) +polygon = PoolVector2Array( 487, 62, 627, 62, 627, 198, 487, 199 ) + +[node name="ESCLocation" type="Position2D" parent="Hotspots/artwork1"] +position = Vector2( 476, 385 ) +script = ExtResource( 7 ) + +[node name="Label" type="Label" parent="Hotspots/artwork1"] +margin_left = 375.422 +margin_top = 268.594 +margin_right = 657.422 +margin_bottom = 313.594 custom_fonts/font = ExtResource( 3 ) -text = "Character talks with text above" +text = "If you look at this object, the character's +speech will appear above his head" __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" } -[node name="item2" parent="Hotspots" instance=ExtResource( 9 )] -position = Vector2( 839.614, 147.455 ) +[node name="artwork2" type="Area2D" parent="Hotspots"] +pause_mode = 1 +script = ExtResource( 5 ) global_id = "r1_wall_item2" esc_script = "res://game/rooms/room01/esc/wall_item_popupdialog.esc" +tooltip_name = "Artwork 2" +default_action = "look" +inventory_texture = ExtResource( 9 ) +dialog_color = Color( 1, 1, 1, 1 ) +animations = null -[node name="Label" type="Label" parent="Hotspots/item2"] -margin_left = -105.12 -margin_top = 121.762 -margin_right = 122.88 -margin_bottom = 142.762 +[node name="Art12" type="Sprite" parent="Hotspots/artwork2"] +position = Vector2( 830, 140 ) +texture = ExtResource( 9 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/artwork2"] +position = Vector2( 273, 11 ) +polygon = PoolVector2Array( 487, 62, 627, 62, 627, 198, 487, 199 ) + +[node name="ESCLocation" type="Position2D" parent="Hotspots/artwork2"] +position = Vector2( 829, 379 ) +script = ExtResource( 7 ) + +[node name="Label2" type="Label" parent="Hotspots/artwork2"] +margin_left = 734.0 +margin_top = 269.0 +margin_right = 1020.0 +margin_bottom = 314.0 custom_fonts/font = ExtResource( 3 ) -text = "Character talks with popup" +text = "If you look at this object, the character +will talk via a popup" __meta__ = { "_edit_use_anchors_": false, "_editor_description_": "" @@ -118,7 +186,7 @@ dialog_color = Color( 1, 1, 1, 1 ) animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/trigger_talk"] -polygon = PoolVector2Array( 1020.6, 348.369, 1155.87, 515.233, 1249.67, 445.131, 1114.4, 347.382 ) +polygon = PoolVector2Array( 1027, 352, 1187, 502, 1249.67, 445.131, 1123, 351 ) [node name="player_start" type="Position2D" parent="."] position = Vector2( 172.471, 434.487 ) @@ -143,5 +211,3 @@ position = Vector2( 660.468, 381.489 ) script = ExtResource( 7 ) global_id = "r1_destination_point3" player_orients_on_arrival = false - -[editable path="Hotspots/item"] diff --git a/game/rooms/room01/room1background.png b/game/rooms/room01/room1background.png new file mode 100644 index 00000000..a2d5cd86 Binary files /dev/null and b/game/rooms/room01/room1background.png differ diff --git a/game/rooms/room01/walkable_area.tscn b/game/rooms/room01/walkable_area.tscn deleted file mode 100644 index 872bfd15..00000000 --- a/game/rooms/room01/walkable_area.tscn +++ /dev/null @@ -1,18 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1] - -[sub_resource type="NavigationPolygon" id=1] -vertices = PoolVector2Array( 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, 129.634, 615.792, 1143.08, 613.35, -9.16094, 803.802, -6.44019, 711.297 ) -polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 0, 3, 6, 7 ) ] -outlines = [ PoolVector2Array( -6.44019, 711.297, 129.634, 615.792, 1143.08, 613.35, 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, -9.16094, 803.802 ) ] - -[node name="walkable_area" type="Navigation2D"] -script = ExtResource( 1 ) - -[node name="platform" type="NavigationPolygonInstance" parent="."] -position = Vector2( 6.73163, -264.779 ) -navpoly = SubResource( 1 ) -__meta__ = { -"_editor_description_": "" -} diff --git a/game/rooms/room02/background.tscn b/game/rooms/room02/background.tscn deleted file mode 100644 index 4376999d..00000000 --- a/game/rooms/room02/background.tscn +++ /dev/null @@ -1,36 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1] -[ext_resource path="res://game/rooms/room02/bridge.tscn" type="PackedScene" id=2] - -[node name="background" type="TextureRect"] -margin_right = 1298.0 -margin_bottom = 559.0 -mouse_filter = 2 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="l_platform" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 499.081, 611.601, 456.654, 806.761, -4.3772, 811.004, -2.96295, 713.424 ) - -[node name="l_door" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( -2.96298, 712.01, 1.85498, 387.294, 87.755, 339.775, 87.5463, 649.784 ) - -[node name="r_platform" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( 859.704, 802.519, 815.717, 612.674, 1172.24, 617.258, 1288.21, 675.24, 1293.86, 815.247, 861.118, 808.176 ) - -[node name="r_door" type="Line2D" parent="."] -position = Vector2( 0, -267.828 ) -points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1184.97, 628.571 ) - -[node name="bridge" parent="." instance=ExtResource( 2 )] -interact_positions = { -"default": Vector2( 0, 0 ) -} - -[editable path="bridge"] diff --git a/game/rooms/room02/bridge.tscn b/game/rooms/room02/bridge.tscn deleted file mode 100644 index 4f62dd50..00000000 --- a/game/rooms/room02/bridge.tscn +++ /dev/null @@ -1,54 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1] - -[sub_resource type="Animation" id=1] -resource_name = "bridge_close" -tracks/0/type = "value" -tracks/0/path = NodePath(".:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 1 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Vector2( 0, 0 ), Vector2( 1.41716, -160.142 ) ] -} - -[sub_resource type="Animation" id=2] -resource_name = "bridge_open" -tracks/0/type = "value" -tracks/0/path = NodePath(".:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 1 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Vector2( 1.417, -160.142 ), Vector2( 0, 0 ) ] -} - -[node name="bridge" type="Area2D"] -script = ExtResource( 1 ) -global_id = "r2_bridge" -is_interactive = false -player_orients_on_arrival = false -dialog_color = Color( 1, 1, 1, 1 ) -interact_positions = { -"default": Vector2( 0, 0 ) -} - -[node name="bridge_lines" type="Line2D" parent="."] -position = Vector2( -2.36194, -105.8 ) -points = PoolVector2Array( 496.624, 640.806, 823.362, 644.635, 856.546, 776.097, 468.544, 773.544, 493.688, 640.283 ) - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/bridge_close = SubResource( 1 ) -anims/bridge_open = SubResource( 2 ) - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] -polygon = PoolVector2Array( 493.501, 532.894, 463.501, 670.894, 861.501, 670.894, 823.501, 530.894 ) diff --git a/game/rooms/room02/floor1.png b/game/rooms/room02/floor1.png new file mode 100644 index 00000000..8362db51 Binary files /dev/null and b/game/rooms/room02/floor1.png differ diff --git a/game/rooms/room02/floor2.png b/game/rooms/room02/floor2.png new file mode 100644 index 00000000..deb16674 Binary files /dev/null and b/game/rooms/room02/floor2.png differ diff --git a/game/rooms/room02/floor3.png b/game/rooms/room02/floor3.png new file mode 100644 index 00000000..3f53f22a Binary files /dev/null and b/game/rooms/room02/floor3.png differ diff --git a/game/rooms/room02/floor4.png b/game/rooms/room02/floor4.png new file mode 100644 index 00000000..e0f6ca8e Binary files /dev/null and b/game/rooms/room02/floor4.png differ diff --git a/game/rooms/room02/room02.tscn b/game/rooms/room02/room02.tscn index 037840f4..79895fc8 100644 --- a/game/rooms/room02/room02.tscn +++ b/game/rooms/room02/room02.tscn @@ -1,34 +1,199 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=21 format=2] -[ext_resource path="res://game/rooms/room02/walkable_area.tscn" type="PackedScene" id=1] -[ext_resource path="res://game/rooms/room02/background.tscn" type="PackedScene" id=2] [ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3] [ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4] -[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=8] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=9] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=10] +[ext_resource path="res://game/rooms/room02/room2background.png" type="Texture" id=11] +[ext_resource path="res://game/rooms/room02/floor3.png" type="Texture" id=12] +[ext_resource path="res://game/rooms/room02/floor1.png" type="Texture" id=13] +[ext_resource path="res://game/rooms/room02/floor4.png" type="Texture" id=14] +[ext_resource path="res://game/rooms/room02/floor2.png" type="Texture" id=15] + +[sub_resource type="NavigationPolygon" id=4] +vertices = PoolVector2Array( 10, 378, 86, 337, 88, 374, 8, 545, 121, 355, 488, 354, 409, 546, 1184, 373, 1185, 343, 1272, 393, 1272, 548, 875, 546, 802, 357, 1161, 358 ) +polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 3, 2 ), PoolIntArray( 7, 8, 9, 10 ), PoolIntArray( 10, 11, 12, 13, 7 ) ] +outlines = [ PoolVector2Array( 121, 355, 488, 354, 409, 546, 8, 545, 10, 378, 86, 337, 88, 374 ), PoolVector2Array( 802, 357, 875, 546, 1272, 548, 1272, 393, 1185, 343, 1184, 373, 1161, 358 ) ] + +[sub_resource type="NavigationPolygon" id=5] +vertices = PoolVector2Array( 10, 378, 88, 335, 86, 373, 8, 542, 1185, 374, 1185, 343, 1270, 395, 1272, 545, 114, 355, 1161, 357 ) +polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6 ), PoolIntArray( 6, 7, 3, 4 ), PoolIntArray( 8, 9, 4, 3, 2 ) ] +outlines = [ PoolVector2Array( 88, 335, 86, 373, 114, 355, 1161, 357, 1185, 374, 1185, 343, 1270, 395, 1272, 545, 8, 542, 10, 378 ) ] + +[sub_resource type="RectangleShape2D" id=6] +extents = Vector2( 39, 39.5 ) + +[sub_resource type="RectangleShape2D" id=7] +extents = Vector2( 39, 39.5 ) + +[sub_resource type="Animation" id=1] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("ESCBackground/Floor1:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 495, 650 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("ESCBackground/Floor2:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 585, 650 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("ESCBackground/Floor3:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 696, 650 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("ESCBackground/Floor4:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 786, 650 ) ] +} + +[sub_resource type="Animation" id=3] +resource_name = "bridge_close" +length = 1.6 +tracks/0/type = "value" +tracks/0/path = NodePath("ESCBackground/Floor1:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 0.5, 1 ), +"update": 0, +"values": [ Vector2( 495, 650 ), Vector2( 495, 450 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("ESCBackground/Floor2:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.2, 1.2 ), +"transitions": PoolRealArray( 1, 0.5, 1 ), +"update": 0, +"values": [ Vector2( 585, 650 ), Vector2( 585, 650 ), Vector2( 585, 450 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("ESCBackground/Floor4:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.6, 1.6 ), +"transitions": PoolRealArray( 1, 0.5, 1 ), +"update": 0, +"values": [ Vector2( 786, 650 ), Vector2( 786, 650 ), Vector2( 786, 450 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("ESCBackground/Floor3:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 0.4, 1.4 ), +"transitions": PoolRealArray( 1, 0.5, 1 ), +"update": 0, +"values": [ Vector2( 696, 650 ), Vector2( 696, 650 ), Vector2( 696, 450 ) ] +} + +[sub_resource type="Animation" id=2] +resource_name = "bridge_open" +length = 1.6 +tracks/0/type = "value" +tracks/0/path = NodePath("ESCBackground/Floor1:position") +tracks/0/interp = 2 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.6, 1.6 ), +"transitions": PoolRealArray( 1.94482e-05, 2.05675, 2 ), +"update": 0, +"values": [ Vector2( 495, 450 ), Vector2( 495, 450 ), Vector2( 495, 650 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("ESCBackground/Floor2:position") +tracks/1/interp = 2 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.4, 1.4 ), +"transitions": PoolRealArray( 1e-05, 2, 2 ), +"update": 0, +"values": [ Vector2( 585, 450 ), Vector2( 585, 450 ), Vector2( 585, 650 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("ESCBackground/Floor3:position") +tracks/2/interp = 2 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.2, 1.2 ), +"transitions": PoolRealArray( 1e-05, 2, 2 ), +"update": 0, +"values": [ Vector2( 696, 450 ), Vector2( 696, 450 ), Vector2( 696, 650 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("ESCBackground/Floor4:position") +tracks/3/interp = 2 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 2.05675, 2 ), +"update": 0, +"values": [ Vector2( 786, 450 ), Vector2( 786, 650 ) ] +} + +[sub_resource type="CapsuleShape2D" id=8] [node name="room2" type="Node2D"] +position = Vector2( -2, 0 ) script = ExtResource( 6 ) global_id = "room2" esc_script = "res://game/rooms/room02/esc/room02_bridge.esc" player_scene = ExtResource( 4 ) camera_limits = [ Rect2( 0, 0, 1289, 555 ) ] - -[node name="walkable_area" parent="." instance=ExtResource( 1 )] -debug_mode = 1 - -[node name="background" parent="." instance=ExtResource( 2 )] - -[node name="room_label" type="Label" parent="background"] -margin_right = 40.0 -margin_bottom = 14.0 -custom_fonts/font = ExtResource( 3 ) -text = "ROOM 2" -__meta__ = { -"_edit_use_anchors_": false -} +editor_debug_mode = 1 [node name="r_platform" type="Area2D" parent="."] pause_mode = 1 @@ -45,7 +210,7 @@ animations = null polygon = PoolVector2Array( 870.974, 538.342, 827.536, 353.995, 1181.4, 357.174, 1287.34, 413.325, 1289.46, 545.758 ) [node name="action_pos" type="Position2D" parent="r_platform"] -position = Vector2( 430.893, 451.052 ) +position = Vector2( 394, 460 ) script = ExtResource( 8 ) [node name="r_door" type="Area2D" parent="."] @@ -63,7 +228,7 @@ animations = null polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 ) [node name="Position2D" type="Position2D" parent="r_door"] -position = Vector2( 1225.47, 353.99 ) +position = Vector2( 1227, 387 ) script = ExtResource( 8 ) [node name="l_door" type="Area2D" parent="."] @@ -84,38 +249,131 @@ polygon = PoolVector2Array( -1.37926, 443.158, 7.96461, 122.796, 84.0504, 77.411 position = Vector2( 52.1462, 384.691 ) script = ExtResource( 8 ) -[node name="button_right" parent="." instance=ExtResource( 5 )] -pause_mode = 1 -position = Vector2( 958.107, 176.401 ) -global_id = "r2_button_right" -esc_script = "res://game/rooms/room02/esc/button.esc" -dialog_color = Color( 0, 1, 0.109804, 1 ) -animations = null - -[node name="Position2D" type="Position2D" parent="button_right"] -position = Vector2( 29.4302, 195.411 ) -script = ExtResource( 8 ) -__meta__ = { -"_editor_description_": "" -} - -[node name="button_left" parent="." instance=ExtResource( 5 )] -pause_mode = 1 -position = Vector2( 288.82, 171.439 ) -global_id = "r2_button" -esc_script = "res://game/rooms/room02/esc/button.esc" -dialog_color = Color( 0, 1, 0.109804, 1 ) -animations = null - -[node name="Position2D" type="Position2D" parent="button_left"] -position = Vector2( 24.6681, 196.998 ) -script = ExtResource( 8 ) -__meta__ = { -"_editor_description_": "" -} - [node name="player_start" type="Position2D" parent="."] position = Vector2( 76.7617, 437.649 ) script = ExtResource( 8 ) global_id = "r2_player_start" is_start_location = true + +[node name="ESCBackground" type="TextureRect" parent="."] +margin_right = 1280.0 +margin_bottom = 550.0 +mouse_filter = 2 +texture = ExtResource( 11 ) +script = ExtResource( 9 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="room_label" type="Label" parent="ESCBackground"] +margin_left = 18.0 +margin_top = 12.0 +margin_right = 100.0 +margin_bottom = 33.0 +custom_fonts/font = ExtResource( 3 ) +text = "ROOM 2" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Floor1" type="Sprite" parent="ESCBackground"] +position = Vector2( 495, 650 ) +texture = ExtResource( 13 ) + +[node name="Floor2" type="Sprite" parent="ESCBackground"] +position = Vector2( 585, 650 ) +texture = ExtResource( 15 ) + +[node name="Floor4" type="Sprite" parent="ESCBackground"] +position = Vector2( 786, 650 ) +texture = ExtResource( 14 ) + +[node name="Floor3" type="Sprite" parent="ESCBackground"] +position = Vector2( 696, 650 ) +scale = Vector2( 1.01351, 1 ) +texture = ExtResource( 12 ) + +[node name="Polygon2D" type="Polygon2D" parent="ESCBackground"] +color = Color( 0, 0, 0, 1 ) +polygon = PoolVector2Array( 0, 550, 1280, 550, 1280, 800, 0, 800 ) + +[node name="room_label2" type="Label" parent="ESCBackground"] +margin_left = 17.0 +margin_top = 558.0 +margin_right = 99.0 +margin_bottom = 579.0 +custom_fonts/font = ExtResource( 3 ) +text = "Room 2 demonstrates modifying the walkable area of a room. Performing \"use\" on the button will cause the original navmesh (which has a gap +in the middle) with one that covers the whole room (platforms + bridge) - allowing the player to walk from one side to the other. +Setting the state of the r2_bridge variable to \"bridge_open\" or \"bridge_closed\" (see button.esc) automatically runs the animation with the same name." +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="walkable_area" type="Navigation2D" parent="."] +script = ExtResource( 10 ) +debug_mode = 1 + +[node name="bridge_open" type="NavigationPolygonInstance" parent="walkable_area"] +navpoly = SubResource( 4 ) + +[node name="bridge_closed" type="NavigationPolygonInstance" parent="walkable_area"] +visible = false +navpoly = SubResource( 5 ) +enabled = false + +[node name="button_left" type="Area2D" parent="."] +pause_mode = 1 +script = ExtResource( 7 ) +global_id = "r2_button" +esc_script = "res://game/rooms/room02/esc/button.esc" +tooltip_name = "button" +default_action = "use" +dialog_color = Color( 0.196078, 1, 0, 1 ) +animations = null + +[node name="Position2D" type="Position2D" parent="button_left"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="button_left"] +position = Vector2( 370, 190.5 ) +shape = SubResource( 6 ) + +[node name="ESCLocation" type="Position2D" parent="button_left"] +position = Vector2( 369, 375 ) +script = ExtResource( 8 ) + +[node name="button_right2" type="Area2D" parent="."] +pause_mode = 1 +script = ExtResource( 7 ) +global_id = "r2_button_right" +esc_script = "res://game/rooms/room02/esc/button.esc" +tooltip_name = "button" +default_action = "use" +dialog_color = Color( 0.196078, 1, 0, 1 ) +animations = null + +[node name="Position2D" type="Position2D" parent="button_right2"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="button_right2"] +position = Vector2( 911, 190.5 ) +shape = SubResource( 7 ) + +[node name="ESCLocation" type="Position2D" parent="button_right2"] +position = Vector2( 914, 378 ) +script = ExtResource( 8 ) + +[node name="bridge" type="Area2D" parent="."] +pause_mode = 1 +script = ExtResource( 7 ) +global_id = "r2_bridge" +dialog_color = Color( 1, 1, 1, 1 ) +animations = null + +[node name="AnimationPlayer" type="AnimationPlayer" parent="bridge"] +root_node = NodePath("../..") +anims/RESET = SubResource( 1 ) +anims/bridge_close = SubResource( 3 ) +anims/bridge_open = SubResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="bridge"] +shape = SubResource( 8 ) diff --git a/game/rooms/room02/room2background.png b/game/rooms/room02/room2background.png new file mode 100644 index 00000000..6d38366f Binary files /dev/null and b/game/rooms/room02/room2background.png differ diff --git a/game/rooms/room02/walkable_area.tscn b/game/rooms/room02/walkable_area.tscn deleted file mode 100644 index 86eedaa8..00000000 --- a/game/rooms/room02/walkable_area.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1] - -[sub_resource type="NavigationPolygon" id=1] -vertices = PoolVector2Array( 129.634, 615.792, 488.56, 617.98, 454.637, 800.726, 2.69714, 805.103, 75.8943, 663.384, 3.79144, 707.712, 5.9538, 653.476, 63.1848, 626.267, 1284.99, 804.433, 868.119, 803.394, 828.615, 621.468, 1152.31, 619.946, 1181.97, 640.075, 1260.04, 615.231, 1282.91, 680.724, 1190.39, 590.281 ) -polygons = [ PoolIntArray( 0, 1, 2, 3, 4 ), PoolIntArray( 4, 3, 5, 6, 7 ), PoolIntArray( 8, 9, 10, 11, 12 ), PoolIntArray( 13, 14, 8, 12, 15 ) ] -outlines = [ PoolVector2Array( 3.79144, 707.712, 5.9538, 653.476, 63.1848, 626.267, 75.8943, 663.384, 129.634, 615.792, 488.56, 617.98, 454.637, 800.726, 2.69714, 805.103 ), PoolVector2Array( 828.615, 621.468, 868.119, 803.394, 1284.99, 804.433, 1282.91, 680.724, 1260.04, 615.231, 1190.39, 590.281, 1181.97, 640.075, 1152.31, 619.946 ) ] - -[sub_resource type="NavigationPolygon" id=2] -vertices = PoolVector2Array( 837.638, 649.714, 832.166, 621.263, 1171.4, 624.546, 863.901, 768.992, 129.634, 615.792, 488.56, 617.98, 484.183, 645.337, 462.297, 766.803, 454.637, 800.726, 85.8629, 647.526, 1265.5, 615.792, 1281.92, 680.354, 1290.67, 816.046, 877.032, 800.726, 2.69714, 805.103, 3.79144, 707.712, 13.64, 663.94, 55.2229, 643.149, 1199.85, 607.037 ) -polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 7, 8, 9 ), PoolIntArray( 10, 11, 12, 13, 3, 2 ), PoolIntArray( 8, 14, 15, 16, 17, 9 ), PoolIntArray( 3, 7, 6, 0 ), PoolIntArray( 10, 2, 18 ) ] -outlines = [ PoolVector2Array( 3.79144, 707.712, 13.64, 663.94, 55.2229, 643.149, 85.8629, 647.526, 129.634, 615.792, 488.56, 617.98, 484.183, 645.337, 837.638, 649.714, 832.166, 621.263, 1171.4, 624.546, 1199.85, 607.037, 1265.5, 615.792, 1281.92, 680.354, 1290.67, 816.046, 877.032, 800.726, 863.901, 768.992, 462.297, 766.803, 454.637, 800.726, 2.69714, 805.103 ) ] - -[node name="walkable_area" type="Navigation2D"] -script = ExtResource( 1 ) - -[node name="bridge_open" type="NavigationPolygonInstance" parent="."] -position = Vector2( 6.73163, -264.779 ) -navpoly = SubResource( 1 ) - -[node name="bridge_closed" type="NavigationPolygonInstance" parent="."] -visible = false -position = Vector2( 0, -269.266 ) -navpoly = SubResource( 2 ) -enabled = false diff --git a/game/rooms/room03/background.tscn b/game/rooms/room03/background.tscn deleted file mode 100644 index e1cbdb3a..00000000 --- a/game/rooms/room03/background.tscn +++ /dev/null @@ -1,35 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1] -[ext_resource path="res://game/rooms/room02/bridge.tscn" type="PackedScene" id=2] - -[node name="background" type="TextureRect"] -margin_right = 1300.0 -margin_bottom = 561.0 -mouse_filter = 2 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="l_platform" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 499.081, 611.601, 456.654, 806.761, -4.3772, 811.004, -2.96295, 713.424 ) - -[node name="l_door" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( -2.96298, 712.01, 1.85498, 387.294, 87.755, 339.775, 87.5463, 649.784 ) - -[node name="r_platform" type="Line2D" parent="."] -position = Vector2( 0, -266 ) -points = PoolVector2Array( 859.704, 802.519, 815.717, 612.674, 1172.24, 617.258, 1288.21, 675.24, 1293.86, 815.247, 861.118, 808.176 ) - -[node name="r_door" type="Line2D" parent="."] -position = Vector2( 0, -267.828 ) -points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1184.97, 628.571 ) - -[node name="bridge" parent="." instance=ExtResource( 2 )] -global_id = "r3_bridge" -interact_positions = { -"default": Vector2( 0, 0 ) -} diff --git a/game/rooms/room03/esc/button.esc b/game/rooms/room03/esc/button.esc index b2e4300b..676e7d67 100755 --- a/game/rooms/room03/esc/button.esc +++ b/game/rooms/room03/esc/button.esc @@ -15,7 +15,14 @@ say player "I must USE this." enable_terrain bridge_closed set_global r3_bridge_closed true set_interactive r3_right_platform false - set_interactive r3_bridge false + set_interactive r3_r_exit true + # We start with the collision polygon on the right door disabled + # This lets it act as part of the right platform, which responds + # with "I can't reach it" when the player clicks it with the bridge + # open. + # We use a custom function to enable the collision polygon on the door + # to enable it to work as a door once the bridge is closed. + custom r3_r_exit door_enabler enable_door stop > [!button_broken, r3_bridge_closed] @@ -23,6 +30,9 @@ say player "I must USE this." enable_terrain bridge_open set_global r3_bridge_closed false set_interactive r3_right_platform true + # Disable the door collision so it acts like part of the right + # platform again. + custom r3_r_exit door_enabler disable_door stop > [button_broken] @@ -32,14 +42,14 @@ say player "I must USE this." :talk > [button_broken] say player "Please, will you repair yourself?" - wait 2 + wait 1 set_state r3_button button_repaired set_global button_broken false - wait 2 + wait 1 say player "Oh, it worked!" stop > [!button_broken] - say player "I should not talk to it again. It could break itself back." + say player "I better not talk to it any more, it might break again." :arrived diff --git a/game/rooms/room03/esc/right_platform.esc b/game/rooms/room03/esc/right_platform.esc index 6cc515a8..564997ec 100755 --- a/game/rooms/room03/esc/right_platform.esc +++ b/game/rooms/room03/esc/right_platform.esc @@ -1,5 +1,7 @@ :look +set_angle player 90 say player "That's the other side." :arrived +set_angle player 90 say player "I can't reach it." diff --git a/game/rooms/room03/esc/room03_bridge.esc b/game/rooms/room03/esc/room03_bridge.esc index 47f40318..0f26dca7 100644 --- a/game/rooms/room03/esc/room03_bridge.esc +++ b/game/rooms/room03/esc/room03_bridge.esc @@ -14,10 +14,14 @@ set_state r3_bridge bridge_close true enable_terrain bridge_closed set_interactive r3_right_platform false + set_interactive r3_r_exit true + # We use a custom function to enable the collision polygon on the door + # to enable it to work as a door once the bridge is closed. + custom r3_r_exit door_enabler enable_door > [eq ESC_LAST_SCENE room2] teleport player r3_l_exit - # Set player look right + # Set player look down set_angle player 180 stop > [eq ESC_LAST_SCENE room4] diff --git a/game/rooms/room03/room03.tscn b/game/rooms/room03/room03.tscn index c055b457..613a0e2b 100644 --- a/game/rooms/room03/room03.tscn +++ b/game/rooms/room03/room03.tscn @@ -1,13 +1,146 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=25 format=2] -[ext_resource path="res://game/rooms/room03/walkable_area.tscn" type="PackedScene" id=1] -[ext_resource path="res://game/rooms/room03/background.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1] [ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3] [ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] -[ext_resource path="res://game/items/escitems/button.tscn" type="PackedScene" id=7] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=8] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=9] +[ext_resource path="res://game/rooms/room03/room3chasm.png" type="Texture" id=10] +[ext_resource path="res://game/rooms/room03/room3bridge.png" type="Texture" id=11] +[ext_resource path="res://game/rooms/room03/room3background.png" type="Texture" id=12] +[ext_resource path="res://game/rooms/room03/smoke.png" type="Texture" id=13] + +[sub_resource type="GDScript" id=15] +script/source = "extends Node2D + +# Currently an empty array is passed as a parameter to the function. No parameters are required. +func enable_door(_notused): + # Enable the collision polygon on the door so it is recognised as an ESCItem + $\"../CollisionPolygon2D\".disabled = false + +# Currently an empty array is passed as a parameter to the function. No parameters are required. +func disable_door(_notused): + # Enable the collision polygon on the door so it is recognised as an ESCItem + $\"../CollisionPolygon2D\".disabled = true +" + +[sub_resource type="Animation" id=10] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("r3_bridge/Room3Bridge:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 640, 249 ) ] +} + +[sub_resource type="Animation" id=11] +resource_name = "bridge_close" +tracks/0/type = "value" +tracks/0/path = NodePath("r3_bridge/Room3Bridge:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 0.318641, 1 ), +"update": 0, +"values": [ Vector2( 640, 249 ), Vector2( 640, 450 ) ] +} + +[sub_resource type="Animation" id=12] +resource_name = "bridge_open" +tracks/0/type = "value" +tracks/0/path = NodePath("r3_bridge/Room3Bridge:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 2.54912, 1 ), +"update": 0, +"values": [ Vector2( 640, 450 ), Vector2( 640, 249 ) ] +} + +[sub_resource type="Gradient" id=5] +offsets = PoolRealArray( 0, 0.830189 ) +colors = PoolColorArray( 1, 1, 1, 1, 0.353516, 0.353516, 0.353516, 1 ) + +[sub_resource type="GradientTexture" id=2] +gradient = SubResource( 5 ) + +[sub_resource type="Curve" id=6] +_data = [ Vector2( 0, 0.0886364 ), 0.0, 0.0, 0, 0, Vector2( 0.612766, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.770213, 0.95 ), -1.55372, -1.55372, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="CurveTexture" id=4] +curve = SubResource( 6 ) + +[sub_resource type="ParticlesMaterial" id=7] +lifetime_randomness = 0.2 +emission_shape = 1 +emission_sphere_radius = 1.0 +flag_disable_z = true +gravity = Vector3( 0, -9.81, 0 ) +angular_velocity = 14.47 +orbit_velocity = 0.0 +orbit_velocity_random = 1.0 +radial_accel = 3.97 +radial_accel_random = 0.63 +angle = 160.0 +angle_random = 1.0 +scale = 0.5 +scale_random = 0.45 +scale_curve = SubResource( 4 ) +color_ramp = SubResource( 2 ) + +[sub_resource type="Animation" id=8] +resource_name = "button_broken" +tracks/0/type = "value" +tracks/0/path = NodePath("Particles2D:emitting") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} + +[sub_resource type="Animation" id=9] +resource_name = "button_repaired" +tracks/0/type = "value" +tracks/0/path = NodePath("Particles2D:emitting") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} + +[sub_resource type="NavigationPolygon" id=13] +vertices = PoolVector2Array( 1182, 379, 1184, 338, 1268, 391, 12, 385, 91, 344, 92, 383, 10, 542, 1270, 542, 116, 354, 1157, 357 ) +polygons = [ PoolIntArray( 0, 1, 2 ), PoolIntArray( 3, 4, 5, 6 ), PoolIntArray( 2, 7, 6, 0 ), PoolIntArray( 8, 9, 0, 6, 5 ) ] +outlines = [ PoolVector2Array( 91, 344, 92, 383, 116, 354, 1157, 357, 1182, 379, 1184, 338, 1268, 391, 1270, 542, 10, 542, 12, 385 ) ] + +[sub_resource type="NavigationPolygon" id=14] +vertices = PoolVector2Array( 12, 387, 91, 340, 91, 383, 12, 541, 115, 354, 484, 356, 402, 541 ) +polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 3, 2 ) ] +outlines = [ PoolVector2Array( 91, 340, 91, 383, 115, 354, 484, 356, 402, 541, 12, 541, 12, 387 ) ] [node name="room3" type="Node2D"] script = ExtResource( 6 ) @@ -16,19 +149,6 @@ esc_script = "res://game/rooms/room03/esc/room03_bridge.esc" player_scene = ExtResource( 4 ) camera_limits = [ Rect2( 0, 0, 1289, 555 ) ] -[node name="background" parent="." instance=ExtResource( 2 )] - -[node name="room_label" type="Label" parent="background"] -margin_right = 40.0 -margin_bottom = 14.0 -custom_fonts/font = ExtResource( 3 ) -text = "ROOM 3" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="walkable_area" parent="." instance=ExtResource( 1 )] - [node name="Hotspots" type="Node2D" parent="."] [node name="r_platform" type="Area2D" parent="Hotspots"] @@ -43,7 +163,8 @@ dialog_color = Color( 1, 1, 1, 1 ) animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/r_platform"] -polygon = PoolVector2Array( 870.974, 538.342, 827.536, 353.995, 1181.4, 357.174, 1287.34, 413.325, 1289.46, 545.758 ) +position = Vector2( -21, -3 ) +polygon = PoolVector2Array( 890, 546, 818, 359, 1181.4, 357.174, 1194, 368, 1195, 67, 1300, 112, 1298, 428, 1301, 547 ) __meta__ = { "_editor_description_": "" } @@ -64,17 +185,22 @@ __meta__ = { global_id = "r3_r_exit" esc_script = "res://game/rooms/room03/esc/right_exit.esc" is_exit = true +is_interactive = false tooltip_name = "Exit" dialog_color = Color( 1, 1, 1, 1 ) animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/r_door"] -polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 ) +polygon = PoolVector2Array( 1174, 356, 1177, 68, 1278, 110, 1279, 419 ) +disabled = true [node name="Position2D" type="Position2D" parent="Hotspots/r_door"] -position = Vector2( 1225.47, 353.99 ) +position = Vector2( 1223, 376 ) script = ExtResource( 8 ) +[node name="door_enabler" type="Node2D" parent="Hotspots/r_door"] +script = SubResource( 15 ) + [node name="l_door" type="Area2D" parent="Hotspots"] pause_mode = 1 script = ExtResource( 5 ) @@ -89,39 +215,137 @@ dialog_color = Color( 1, 1, 1, 1 ) animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/l_door"] -polygon = PoolVector2Array( -2.71457, 437.818, 6.6293, 121.462, 89.3893, 74.7422, 88.0545, 376.416 ) +polygon = PoolVector2Array( 3, 422, 6, 108, 102, 70, 103, 357 ) [node name="Position2D" type="Position2D" parent="Hotspots/l_door"] position = Vector2( 44.1375, 384.691 ) script = ExtResource( 8 ) -[node name="button" parent="Hotspots" instance=ExtResource( 7 )] -pause_mode = 1 -global_id = "r3_button" -esc_script = "res://game/rooms/room03/esc/button.esc" -animations = null - -[node name="Position2D" type="Position2D" parent="Hotspots/button"] -position = Vector2( 347.767, 378.011 ) -script = ExtResource( 8 ) -__meta__ = { -"_editor_description_": "" -} - -[node name="button_label" type="Label" parent="Hotspots/button"] -margin_left = 398.135 -margin_top = 132.292 -margin_right = 642.135 -margin_bottom = 167.292 -custom_fonts/font = ExtResource( 3 ) -text = "I know, this doesn't sound logical -but you should try talking with this button..." -__meta__ = { -"_edit_use_anchors_": false -} - [node name="player_start" type="Position2D" parent="."] position = Vector2( 63.3074, 444.653 ) script = ExtResource( 8 ) global_id = "r3_player_start" is_start_location = true + +[node name="r3_bridge" type="Area2D" parent="."] +pause_mode = 1 +script = ExtResource( 5 ) +global_id = "r3_bridge" +esc_script = "res://game/rooms/room03/esc/room03_bridge.esc" +inventory_texture = ExtResource( 10 ) +dialog_color = Color( 1, 1, 1, 1 ) +animations = null + +[node name="AnimationPlayer" type="AnimationPlayer" parent="r3_bridge"] +root_node = NodePath("../..") +anims/RESET = SubResource( 10 ) +anims/bridge_close = SubResource( 11 ) +anims/bridge_open = SubResource( 12 ) + +[node name="Room3Chasm" type="Sprite" parent="r3_bridge"] +position = Vector2( 640, 450 ) +texture = ExtResource( 10 ) + +[node name="Room3Bridge" type="Sprite" parent="r3_bridge"] +position = Vector2( 640, 249 ) +texture = ExtResource( 11 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="r3_bridge"] +polygon = PoolVector2Array( 501, 349, 780, 351, 859, 548, 419, 551 ) + +[node name="ESCLocation" type="Position2D" parent="r3_bridge"] +position = Vector2( 434, 441 ) +script = ExtResource( 8 ) + +[node name="ESCBackground" type="TextureRect" parent="."] +margin_right = 1280.0 +margin_bottom = 550.0 +mouse_filter = 2 +texture = ExtResource( 12 ) +script = ExtResource( 9 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Polygon2D" type="Polygon2D" parent="ESCBackground"] +color = Color( 0, 0, 0, 1 ) +polygon = PoolVector2Array( 0, 550, 1280, 550, 1280, 800, 0, 800 ) + +[node name="room_label2" type="Label" parent="ESCBackground"] +margin_left = 17.0 +margin_top = 558.0 +margin_right = 1224.0 +margin_bottom = 627.0 +custom_fonts/font = ExtResource( 3 ) +text = "Room 3 demonstrates a chain of steps to complete a game task. It demonstrates different talk responses based on the state of the button (which sets the + \"broken_button\" variable to true or false respectively). Setting the \"button_repaired\" state automatically plays the button_repaired animation, which turns off +the particle emitter for the button. The custom command shows how to execute functions written in gdscript." +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="room_label" type="Label" parent="ESCBackground"] +margin_right = 82.0 +margin_bottom = 21.0 +custom_fonts/font = ExtResource( 3 ) +text = "ROOM 3" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="r3_button" type="Area2D" parent="."] +pause_mode = 1 +script = ExtResource( 5 ) +global_id = "r3_button" +esc_script = "res://game/rooms/room03/esc/button.esc" +tooltip_name = "Button" +default_action = "use" +dialog_color = Color( 1, 1, 1, 1 ) +animations = null + +[node name="Particles2D" type="Particles2D" parent="r3_button"] +position = Vector2( 374, 154 ) +amount = 16 +lifetime = 4.0 +preprocess = 1.99 +speed_scale = 1.39 +process_material = SubResource( 7 ) +texture = ExtResource( 13 ) +__meta__ = { +"_editor_description_": "" +} + +[node name="AnimationPlayer" type="AnimationPlayer" parent="r3_button"] +anims/button_broken = SubResource( 8 ) +anims/button_repaired = SubResource( 9 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="r3_button"] +position = Vector2( 24, 41 ) +polygon = PoolVector2Array( 317, 120, 317, 181, 379, 181, 380, 119 ) + +[node name="ESCLocation" type="Position2D" parent="r3_button"] +position = Vector2( 349, 380 ) +script = ExtResource( 8 ) + +[node name="button_label" type="Label" parent="r3_button"] +margin_left = 420.0 +margin_top = 158.0 +margin_right = 745.0 +margin_bottom = 203.0 +custom_colors/font_color = Color( 0, 0, 0, 1 ) +custom_fonts/font = ExtResource( 3 ) +text = "I know, this isn't logical - but you +should try talking to this button..." +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ESCTerrain" type="Navigation2D" parent="."] +script = ExtResource( 1 ) + +[node name="bridge_closed" type="NavigationPolygonInstance" parent="ESCTerrain"] +navpoly = SubResource( 13 ) +enabled = false + +[node name="bridge_open" type="NavigationPolygonInstance" parent="ESCTerrain"] +navpoly = SubResource( 14 ) diff --git a/game/rooms/room03/room3background.png b/game/rooms/room03/room3background.png new file mode 100644 index 00000000..d31a9c1a Binary files /dev/null and b/game/rooms/room03/room3background.png differ diff --git a/game/rooms/room03/room3bridge.png b/game/rooms/room03/room3bridge.png new file mode 100644 index 00000000..ade6be13 Binary files /dev/null and b/game/rooms/room03/room3bridge.png differ diff --git a/game/rooms/room03/room3chasm.png b/game/rooms/room03/room3chasm.png new file mode 100644 index 00000000..4391115a Binary files /dev/null and b/game/rooms/room03/room3chasm.png differ diff --git a/game/rooms/room02/button/button.tscn b/game/rooms/room09/button/button.tscn similarity index 92% rename from game/rooms/room02/button/button.tscn rename to game/rooms/room09/button/button.tscn index 743e7ec8..21000960 100644 --- a/game/rooms/room02/button/button.tscn +++ b/game/rooms/room09/button/button.tscn @@ -6,13 +6,12 @@ extents = Vector2( 28.6442, 29.8513 ) [node name="button_right" type="Area2D"] +pause_mode = 1 script = ExtResource( 1 ) tooltip_name = "Button" default_action = "use" dialog_color = Color( 1, 1, 1, 1 ) -interact_positions = { -"default": Vector2( 971.212, 150.721 ) -} +animations = null [node name="Line2D" type="Line2D" parent="."] points = PoolVector2Array( 2.86993, 4.8189, 2.86993, 53.646, 50.8979, 53.9476, 50.5746, 3.69644, -1.72314, 4.51215 ) diff --git a/game/rooms/room09/room09.tscn b/game/rooms/room09/room09.tscn index db4ae1a4..5cc7149d 100644 --- a/game/rooms/room09/room09.tscn +++ b/game/rooms/room09/room09.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://game/rooms/room09/closet/magical_closet.tscn" type="PackedScene" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7] -[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=8] +[ext_resource path="res://game/rooms/room09/button/button.tscn" type="PackedScene" id=8] [ext_resource path="res://game/rooms/room09/r_door.tscn" type="PackedScene" id=9] [ext_resource path="res://game/items/textures/genericItem_color_127.png" type="Texture" id=10] [ext_resource path="res://game/items/inventory/r9_bottle.tscn" type="PackedScene" id=11] diff --git a/game/rooms/room10/room10.tscn b/game/rooms/room10/room10.tscn index 63647f19..ae618b77 100644 --- a/game/rooms/room10/room10.tscn +++ b/game/rooms/room10/room10.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7] -[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=8] +[ext_resource path="res://game/rooms/room09/button/button.tscn" type="PackedScene" id=8] [ext_resource path="res://game/rooms/room10/r_door.tscn" type="PackedScene" id=9] [sub_resource type="NavigationPolygon" id=1] diff --git a/saves/save_001.tres b/saves/save_001.tres deleted file mode 100644 index 5dbb50cc..00000000 --- a/saves/save_001.tres +++ /dev/null @@ -1,91 +0,0 @@ -[gd_resource type="Resource" load_steps=2 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/save_data/esc_savegame.gd" type="Script" id=1] - -[resource] -script = ExtResource( 1 ) -escoria_version = "0.1.0" -game_version = "0.1.0" -name = "test" -date = "28/11/2021 16:50" -main = { -"current_scene_filename": "res://game/rooms/room01/room01.tscn", -"last_scene_global_id": "" -} -globals = { -"ESC_LAST_SCENE": "", -"FORCE_LAST_SCENE_NULL": false, -"dialog_advance": 0, -"dialog_popup_advance": 0, -"room1_visited": true -} -objects = { -"_camera": { -"active": true, -"interactive": true, -"state": "default" -}, -"_music": { -"active": true, -"interactive": true, -"state": "res://game/sfx/contemplation.ogg" -}, -"_sound": { -"active": true, -"interactive": true, -"state": "default" -}, -"_speech": { -"active": true, -"interactive": true, -"state": "default" -}, -"player": { -"active": true, -"global_transform": Transform2D( 1, 0, 0, 1, 870, 461 ), -"interactive": true, -"last_deg": 71, -"last_dir": 2, -"state": "default" -}, -"r1_destination_point": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_destination_point2": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_destination_point3": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_r_exit": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_start": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_wall_item1": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_wall_item2": { -"active": true, -"interactive": true, -"state": "default" -}, -"trigger_talk": { -"active": true, -"interactive": true, -"state": "default" -} -} diff --git a/saves/save_002.tres b/saves/save_002.tres deleted file mode 100644 index 7b3015c0..00000000 --- a/saves/save_002.tres +++ /dev/null @@ -1,86 +0,0 @@ -[gd_resource type="Resource" load_steps=2 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/save_data/esc_savegame.gd" type="Script" id=1] - -[resource] -script = ExtResource( 1 ) -escoria_version = "0.1.0" -game_version = "0.1.0" -name = "test2" -date = "28/11/2021 16:50" -main = { -"current_scene_filename": "res://game/rooms/room02/room02.tscn", -"last_scene_global_id": "" -} -globals = { -"ESC_LAST_SCENE": "room1", -"FORCE_LAST_SCENE_NULL": false, -"dialog_advance": 0, -"dialog_popup_advance": 0, -"room1_visited": true -} -objects = { -"_camera": { -"active": true, -"interactive": true, -"state": "default" -}, -"_music": { -"active": true, -"interactive": true, -"state": "res://game/sfx/contemplation.ogg" -}, -"_sound": { -"active": true, -"interactive": true, -"state": "default" -}, -"_speech": { -"active": true, -"interactive": true, -"state": "default" -}, -"player": { -"active": true, -"global_transform": Transform2D( 1, 0, 0, 1, 52.1462, 384.691 ), -"interactive": true, -"last_deg": 161, -"last_dir": 4, -"state": "default" -}, -"r2_bridge": { -"active": true, -"interactive": false, -"state": "default" -}, -"r2_button": { -"active": true, -"interactive": true, -"state": "default" -}, -"r2_button_right": { -"active": true, -"interactive": true, -"state": "default" -}, -"r2_l_exit": { -"active": true, -"interactive": true, -"state": "default" -}, -"r2_player_start": { -"active": true, -"interactive": true, -"state": "default" -}, -"r2_r_exit": { -"active": true, -"interactive": true, -"state": "default" -}, -"r2_right_platform": { -"active": true, -"interactive": true, -"state": "default" -} -} diff --git a/saves/save_003.tres b/saves/save_003.tres deleted file mode 100644 index 6c2a0e20..00000000 --- a/saves/save_003.tres +++ /dev/null @@ -1,97 +0,0 @@ -[gd_resource type="Resource" load_steps=2 format=2] - -[ext_resource path="res://addons/escoria-core/game/core-scripts/save_data/esc_savegame.gd" type="Script" id=1] - -[resource] -script = ExtResource( 1 ) -escoria_version = "0.1.0" -game_version = "0.1.0" -name = "custom data" -date = "13/01/2022 08:09" -main = { -"current_scene_filename": "res://game/rooms/room01/room01.tscn", -"last_scene_global_id": "" -} -globals = { -"ANIMATION_RESOURCES": { -}, -"ESC_CURRENT_SCENE": "room1", -"ESC_LAST_SCENE": "", -"FORCE_LAST_SCENE_NULL": false, -"dialog_advance": 0, -"dialog_popup_advance": 0, -"room1_visited": true -} -objects = { -"_camera": { -"active": true, -"interactive": true, -"state": "default" -}, -"_music": { -"active": true, -"interactive": true, -"state": "res://game/sfx/contemplation.ogg" -}, -"_sound": { -"active": true, -"interactive": true, -"state": "default" -}, -"_speech": { -"active": true, -"interactive": true, -"state": "default" -}, -"player": { -"active": true, -"global_transform": Transform2D( 1, 0, 0, 1, 490, 488 ), -"interactive": true, -"last_deg": 111, -"last_dir": 3, -"state": "default" -}, -"r1_destination_point": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_destination_point2": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_destination_point3": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_r_exit": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_start": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_wall_item1": { -"active": true, -"interactive": true, -"state": "default" -}, -"r1_wall_item2": { -"active": true, -"interactive": true, -"state": "default" -}, -"trigger_talk": { -"active": true, -"interactive": true, -"state": "default" -} -} -custom_data = { -"ui_type": "9verbs" -}