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/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/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..8540ae75 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 about to leave..." 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_": "" -}