Browse Source

addded bedrooms and room entering/leaving mech

fix/wall
as4s4hetic 2 years ago
parent
commit
06d5e0d83d
  1. 164
      Resources/lodge.tres
  2. 48
      Scenes/Player.tscn
  3. 2
      Scripts/CameraFollow.gd
  4. 27
      Scripts/CoverControl.gd
  5. 2
      Sprites/alistair/Alistair-back.tscn
  6. 2
      Sprites/alistair/Alistair.tscn
  7. 4
      Sprites/charlene/Charlene.tscn
  8. 4
      Sprites/jame/James.tscn
  9. 2
      Sprites/richal/Richal.tscn
  10. 2
      Sprites/sak/Sak.tscn
  11. 204
      Story/Ch1S2.tscn
  12. 17
      Story/Covers.gd
  13. BIN
      Tiles/bedroom.png
  14. BIN
      Tiles/black.png
  15. 10
      dialogic/timelines/timeline-1642498159.json
  16. 10
      dialogic/timelines/timeline-1642563748.json

164
Resources/lodge.tres

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
[gd_resource type="TileSet" load_steps=50 format=2]
[gd_resource type="TileSet" load_steps=55 format=2]
[ext_resource path="res://Tiles/bedroom.png" type="Texture" id=1]
[ext_resource path="res://Tiles/living-room.png" type="Texture" id=2]
@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
[ext_resource path="res://Tiles/Furniture/coffee table.png" type="Texture" id=12]
[ext_resource path="res://Tiles/corners.png" type="Texture" id=13]
[ext_resource path="res://Tiles/black.png" type="Texture" id=14]
[ext_resource path="res://Tiles/Furniture/bed.png" type="Texture" id=15]
[sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
@ -46,19 +47,19 @@ points = PoolVector2Array( 120, 60, 0, 60, 0, 0, 120, 0 ) @@ -46,19 +47,19 @@ points = PoolVector2Array( 120, 60, 0, 60, 0, 0, 120, 0 )
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=32]
points = PoolVector2Array( 9, 60, 0, 60, 0, 0, 9, 0 )
points = PoolVector2Array( 12, 60, 0, 60, 0, 0, 12, 0 )
[sub_resource type="ConvexPolygonShape2D" id=33]
points = PoolVector2Array( 60, 60, 51, 60, 51, 0, 60, 0 )
points = PoolVector2Array( 60, 60, 48, 60, 48, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=34]
points = PoolVector2Array( 0, 0, 9, 0, 9, 48, 60, 48, 60, 60, 0, 60 )
points = PoolVector2Array( 0, 0, 12, 0, 12, 48, 60, 48, 60, 60, 0, 60 )
[sub_resource type="ConvexPolygonShape2D" id=35]
points = PoolVector2Array( 120, 60, 0, 60, 0, 48, 120, 48 )
[sub_resource type="ConvexPolygonShape2D" id=36]
points = PoolVector2Array( 51, 0, 60, 0, 60, 60, 0, 60, 0, 48, 51, 48 )
points = PoolVector2Array( 48, 0, 60, 0, 60, 60, 0, 60, 0, 48, 48, 48 )
[sub_resource type="ConvexPolygonShape2D" id=11]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
@ -117,6 +118,18 @@ points = PoolVector2Array( 0, 0, 9, 0, 9, 12, 0, 12 ) @@ -117,6 +118,18 @@ points = PoolVector2Array( 0, 0, 9, 0, 9, 12, 0, 12 )
[sub_resource type="ConvexPolygonShape2D" id=14]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
[sub_resource type="ConvexPolygonShape2D" id=46]
points = PoolVector2Array( 0, 0, 12, 0, 12, 60, 0, 60 )
[sub_resource type="ConvexPolygonShape2D" id=47]
points = PoolVector2Array( 240, 60, 228, 60, 228, 0, 240, 0 )
[sub_resource type="ConvexPolygonShape2D" id=48]
points = PoolVector2Array( 12, 48, 228, 48, 228, 0, 240, 0, 240, 60, 0, 60, 0, 0, 12, 0 )
[sub_resource type="ConvexPolygonShape2D" id=49]
points = PoolVector2Array( 240, 120, 0, 120, 0, 0, 240, 0 )
[sub_resource type="ConvexPolygonShape2D" id=16]
points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
@ -142,20 +155,6 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 ) @@ -142,20 +155,6 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
1/z_index = 0
2/name = "Bedroom"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 0, 0, 240, 240 )
2/tile_mode = 0
2/occluder_offset = Vector2( 120, 120 )
2/navigation_offset = Vector2( 120, 120 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape_one_way = false
2/shape_one_way_margin = 0.0
2/shapes = [ ]
2/z_index = 0
4/name = "corridor.png 4"
4/texture = ExtResource( 3 )
4/tex_offset = Vector2( 0, 0 )
@ -1070,7 +1069,7 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 ) @@ -1070,7 +1069,7 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
60/texture = ExtResource( 14 )
60/tex_offset = Vector2( 0, 0 )
60/modulate = Color( 1, 1, 1, 1 )
60/region = Rect2( 0, 0, 60, 60 )
60/region = Rect2( 0, 0, 120, 240 )
60/tile_mode = 0
60/occluder_offset = Vector2( 0, 0 )
60/navigation_offset = Vector2( 0, 0 )
@ -1080,3 +1079,128 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 ) @@ -1080,3 +1079,128 @@ points = PoolVector2Array( 60, 60, 0, 60, 0, 0, 60, 0 )
60/shape_one_way_margin = 0.0
60/shapes = [ ]
60/z_index = 0
61/name = "black.png 61"
61/texture = ExtResource( 14 )
61/tex_offset = Vector2( 0, 0 )
61/modulate = Color( 1, 1, 1, 1 )
61/region = Rect2( 0, 0, 240, 240 )
61/tile_mode = 0
61/occluder_offset = Vector2( 0, 0 )
61/navigation_offset = Vector2( 0, 0 )
61/shape_offset = Vector2( 0, 0 )
61/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
61/shape_one_way = false
61/shape_one_way_margin = 0.0
61/shapes = [ ]
61/z_index = 0
63/name = "bedroom.png 63"
63/texture = ExtResource( 1 )
63/tex_offset = Vector2( 0, 0 )
63/modulate = Color( 1, 1, 1, 1 )
63/region = Rect2( 0, 120, 240, 60 )
63/tile_mode = 0
63/occluder_offset = Vector2( 0, 0 )
63/navigation_offset = Vector2( 0, 0 )
63/shape_offset = Vector2( 0, 0 )
63/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
63/shape = SubResource( 46 )
63/shape_one_way = false
63/shape_one_way_margin = 1.0
63/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 46 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 47 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
63/z_index = 0
64/name = "bedroom.png 64"
64/texture = ExtResource( 1 )
64/tex_offset = Vector2( 0, 0 )
64/modulate = Color( 1, 1, 1, 1 )
64/region = Rect2( 0, 180, 240, 60 )
64/tile_mode = 0
64/occluder_offset = Vector2( 0, 0 )
64/navigation_offset = Vector2( 0, 0 )
64/shape_offset = Vector2( 0, 0 )
64/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
64/shape = SubResource( 48 )
64/shape_one_way = false
64/shape_one_way_margin = 1.0
64/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 48 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
64/z_index = 0
65/name = "bed.png 65"
65/texture = ExtResource( 15 )
65/tex_offset = Vector2( 0, 0 )
65/modulate = Color( 1, 1, 1, 1 )
65/region = Rect2( 60, 60, 180, 180 )
65/tile_mode = 0
65/occluder_offset = Vector2( 0, 0 )
65/navigation_offset = Vector2( 0, 0 )
65/shape_offset = Vector2( 0, 0 )
65/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
65/shape_one_way = false
65/shape_one_way_margin = 0.0
65/shapes = [ ]
65/z_index = 0
66/name = "bedroom.png 66"
66/texture = ExtResource( 1 )
66/tex_offset = Vector2( 0, 0 )
66/modulate = Color( 1, 1, 1, 1 )
66/region = Rect2( 0, 0, 240, 120 )
66/tile_mode = 0
66/occluder_offset = Vector2( 0, 0 )
66/navigation_offset = Vector2( 0, 0 )
66/shape_offset = Vector2( 0, 0 )
66/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
66/shape = SubResource( 49 )
66/shape_one_way = false
66/shape_one_way_margin = 1.0
66/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 49 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
66/z_index = 0
67/name = "corridor.png 67"
67/texture = ExtResource( 3 )
67/tex_offset = Vector2( 0, 0 )
67/modulate = Color( 1, 1, 1, 1 )
67/region = Rect2( 0, 0, 240, 120 )
67/tile_mode = 0
67/occluder_offset = Vector2( 0, 0 )
67/navigation_offset = Vector2( 0, 0 )
67/shape_offset = Vector2( 0, 0 )
67/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
67/shape_one_way = false
67/shape_one_way_margin = 0.0
67/shapes = [ ]
67/z_index = 0
68/name = "corridor.png 68"
68/texture = ExtResource( 3 )
68/tex_offset = Vector2( 0, 0 )
68/modulate = Color( 1, 1, 1, 1 )
68/region = Rect2( 0, 0, 240, 60 )
68/tile_mode = 0
68/occluder_offset = Vector2( 0, 0 )
68/navigation_offset = Vector2( 0, 0 )
68/shape_offset = Vector2( 0, 0 )
68/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
68/shape_one_way = false
68/shape_one_way_margin = 0.0
68/shapes = [ ]
68/z_index = 0

48
Scenes/Player.tscn

@ -16,19 +16,19 @@ @@ -16,19 +16,19 @@
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 5 ) ],
"frames": [ ExtResource( 2 ), ExtResource( 6 ), ExtResource( 2 ), ExtResource( 7 ) ],
"loop": true,
"name": "IdleUp",
"name": "MoveDown",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ), ExtResource( 10 ), ExtResource( 3 ), ExtResource( 12 ) ],
"frames": [ ExtResource( 4 ), ExtResource( 13 ), ExtResource( 4 ), ExtResource( 8 ) ],
"loop": true,
"name": "MoveRight",
"name": "MoveLeft",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ), ExtResource( 13 ), ExtResource( 4 ), ExtResource( 8 ) ],
"frames": [ ExtResource( 3 ), ExtResource( 10 ), ExtResource( 3 ), ExtResource( 12 ) ],
"loop": true,
"name": "MoveLeft",
"name": "MoveRight",
"speed": 5.0
}, {
"frames": [ ExtResource( 5 ), ExtResource( 14 ), ExtResource( 5 ), ExtResource( 15 ) ],
@ -36,32 +36,32 @@ animations = [ { @@ -36,32 +36,32 @@ animations = [ {
"name": "MoveUp",
"speed": 5.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 6 ), ExtResource( 2 ), ExtResource( 7 ) ],
"frames": [ ExtResource( 2 ) ],
"loop": true,
"name": "MoveDown",
"name": "IdleDown",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ) ],
"frames": [ ExtResource( 5 ) ],
"loop": true,
"name": "IdleRight",
"name": "IdleUp",
"speed": 5.0
}, {
"frames": [ ExtResource( 2 ) ],
"frames": [ ExtResource( 4 ) ],
"loop": true,
"name": "IdleDown",
"name": "IdleLeft",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ) ],
"frames": [ ExtResource( 3 ) ],
"loop": true,
"name": "IdleLeft",
"name": "IdleRight",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 21, 1 )
extents = Vector2( 21, 4.5 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 21, 17.5 )
[sub_resource type="CircleShape2D" id=3]
radius = 30.0
[node name="Player" type="KinematicBody2D"]
position = Vector2( 4, 4 )
@ -74,17 +74,17 @@ animation = "IdleDown" @@ -74,17 +74,17 @@ animation = "IdleDown"
playing = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -4, 31 )
position = Vector2( -4, 27.5 )
shape = SubResource( 1 )
one_way_collision = true
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -4, 11.5 )
shape = SubResource( 3 )
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2( -4, -4 )
enabled = true
cast_to = Vector2( 0, 60 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -4, -4 )
shape = SubResource( 3 )

2
Scripts/CameraFollow.gd

@ -12,6 +12,6 @@ func _ready(): @@ -12,6 +12,6 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
onready var target = get_node("/root/Ch1S2/FG/Player")
onready var target = get_node("../FG/Player")
func _process (delta):
position = target.position

27
Scripts/CoverControl.gd

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
extends Node2D
onready var player = get_parent().get_node("Player")
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
var covers = get_node("../Covers")
covers.show()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
for i in range(5):
var room = get_child(i)
var furniture = get_node("../Furniture").get_child(i)
var cover = get_node("../Covers").get_child(i)
if(room.overlaps_body(player)):
furniture.show()
cover.hide()
else:
furniture.hide()
cover.show()

2
Sprites/alistair/Alistair-back.tscn

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
radius = 25.0
height = 0.0
[node name="Alistair" type="StaticBody2D" groups=["Human"]]
[node name="Alistair" type="StaticBody2D"]
[node name="Back" type="Sprite" parent="."]
texture = ExtResource( 1 )

2
Sprites/alistair/Alistair.tscn

@ -8,7 +8,7 @@ load_path = "res://.import/front.png-a756d11d0a8b51bde2f613dfb80275e2.stex" @@ -8,7 +8,7 @@ load_path = "res://.import/front.png-a756d11d0a8b51bde2f613dfb80275e2.stex"
radius = 25.0
height = 0.0
[node name="Alistair" type="StaticBody2D" groups=["Human"]]
[node name="Alistair" type="StaticBody2D"]
[node name="Front" type="Sprite" parent="."]
position = Vector2( -117, -95 )

4
Sprites/charlene/Charlene.tscn

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
radius = 25.0
height = 0.0
[node name="Charlene" type="StaticBody2D" groups=["Human"]]
[node name="Charlene" type="StaticBody2D"]
[node name="Sprite" type="Sprite" parent="." groups=["Human"]]
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

4
Sprites/jame/James.tscn

@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
radius = 25.0
height = 0.0
[node name="James" type="StaticBody2D" groups=["Humans"]]
[node name="James" type="StaticBody2D"]
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="." groups=["Human"]]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, 35 )
shape = SubResource( 1 )

2
Sprites/richal/Richal.tscn

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
radius = 25.0
height = 0.0
[node name="Richal" type="StaticBody2D" groups=["Human"]]
[node name="Richal" type="StaticBody2D"]
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )

2
Sprites/sak/Sak.tscn

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
radius = 25.0
height = 0.0
[node name="Sak" type="StaticBody2D" groups=["Human"]]
[node name="Sak" type="StaticBody2D"]
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )

204
Story/Ch1S2.tscn

File diff suppressed because one or more lines are too long

17
Story/Covers.gd

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

BIN
Tiles/bedroom.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
Tiles/black.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 1.0 KiB

10
dialogic/timelines/timeline-1642498159.json

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
"character": "character-1642498039.json",
"event_id": "dialogic_001",
"portrait": "Default",
"text": "Being out here should make me feel happy...\nSo why do I still feel dead inside?"
"text": "Being out here should make me feel happy...\nSo why do I still feel empty inside?"
},
{
"character": "character-1642498039.json",
@ -54,13 +54,13 @@ @@ -54,13 +54,13 @@
"character": "character-1642568285.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "I'm sure you'll settle in soon, we've only just arrived."
"text": "Hey, it'll get better!"
},
{
"character": "character-1642498039.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "I hope so, thanks."
"text": "Yeah, I guess."
},
{
"choice": "Chin up, buttercup",
@ -73,13 +73,13 @@ @@ -73,13 +73,13 @@
"character": "character-1642568285.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "Hey! turn that frown upside down, buddy!"
"text": "Chin up, buttercup!"
},
{
"character": "character-1642498039.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "Sorry I'm like this, you'd better leave me to myself."
"text": "Sorry. I suck."
},
{
"event_id": "dialogic_013"

10
dialogic/timelines/timeline-1642563748.json

@ -58,13 +58,19 @@ @@ -58,13 +58,19 @@
"character": "character-1642550408.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "hmm..\nI'd also like to cook.... plus, should't we discuss this with the others?"
"text": "hmm..\nI'd also like to cook.... plus, shouldn't we discuss this with the others?"
},
{
"character": "character-1642567013.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "Yeah, let's make a roster then."
"text": "Yeah, how about we make a roster?"
},
{
"character": "character-1642550408.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "Sounds good."
},
{
"event_id": "dialogic_022",

Loading…
Cancel
Save