Progress towards the end of the game

This commit is contained in:
Alice Gaudon 2020-08-20 10:35:25 +02:00
parent efc5806d0a
commit a2869c720f
19 changed files with 465 additions and 133 deletions

View File

@ -1,12 +1,12 @@
[
{"name": "Crab", "text": "And voilà! After some pitfalls and a long walk, here I am."},
{"name": "Crab", "text": "I saw your big warm thing so I decided to stop by"},
{"name": "Crab", "text": "Et voilà! After some pitfalls and a long walk, here I am."},
{"name": "Crab", "text": "I saw your big warm thing so I decided to stop by."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "This coast is really nice, is it yours?"},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "Hey-oh, hooman, 're you okay?"},
{"name": "Ely", "text": "W-wait... Did you say it was a recent oil Tanker ?"},
{"name": "Crab", "text": "Hum... Yeah! It must have sank a few days ago or so..."},
{"name": "Ely", "text": "W-wait... Did you just say it was a recent oil tanker sinking?"},
{"name": "Crab", "text": "Hum... Yeah! It must have sank about a few days ago..."},
{"name": "Ely", "text": "..."},
{"name": "Crab", "text": "Are you okay?"}
]

27
dialogues/End_Lie.json Normal file
View File

@ -0,0 +1,27 @@
[
{"name": "Ely", "text": "So... Yeah... Here's the thing"},
{"name": "Ely", "text": "I am a part of a non-profit organisation"},
{"name": "Crab", "text": "A what ?"},
{"name": "Ely", "text": "A bunch of people doing things more or less selflessly"},
{"name": "Crab", "text": "Oh, that's nice !"},
{"name": "Ely", "text": "Yeah, and our goal is to scan ocean in search of potential garbage and wrecks left by other hu-... uh... other [wave amp=20 freq=2]hoomans[wave/]"},
{"name": "Crab", "text": "How neat !"},
{"name": "Ely", "text": "We're mostly pals enjoying scuba diving together and collecting small funds for bigger organisations"},
{"name": "Ely", "text": "And... you see, the oil tanker you found..."},
{"name": "Ely", "text": "We were supposed to go trough it and gather some pieces of information for later dismantelment"},
{"name": "Ely", "text": "But... as you can tell, it didn't go well."},
{"name": "Ely", "text": "The sea was thunderous, angry even..."},
{"name": "Ely", "text": "And we lost our ship. I don't even know were my friends are..."},
{"name": "Ely", "text": "..."},
{"name": "Crab", "text": "..."},
{"name": "Ely", "text": "Crap..."},
{"name": "Ely", "text": "... I don't know why I'm telling you all of that, it's not even really what happened..."},
{"name": "Ely", "text": "..."},
{"name": "Ely", "text": "I-I don't want to tell you the truth..."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "That was a beautiful tale."},
{"name": "Crab", "text": "In a sense, it brings me hope to know you're aware that oil tankers are bad."},
{"name": "Crab", "text": "Lie or not, yout story tells me somethings about hoomans and about you."},
{"name": "Crab", "text": "Something good..."},
{"name": "Crab", "text": "Thank you..."}
]

View File

@ -1,39 +1,39 @@
[
{"name": "Ely", "text": "So... Yeah... Here's the thing"},
{"name": "Ely", "text": "... You see, the oil tanker."},
{"name": "Ely", "text": "So... Yeah... Here's the thing:"},
{"name": "Ely", "text": "... You see, the oil tanker?"},
{"name": "Crab", "text": "Yes."},
{"name": "Ely", "text": "I worked there."},
{"name": "Ely", "text": "I was deck Officer"},
{"name": "Ely", "text": "I was the deck officer."},
{"name": "Ely", "text": "We were on our way back home after 72 days at sea."},
{"name": "Ely", "text": "The captain decided it was a good idea to take a shortcut."},
{"name": "Ely", "text": "They didn't follow the planned route."},
{"name": "Ely", "text": "We hit something... and then we sank."},
{"name": "Ely", "text": "They... didn't follow the planned route."},
{"name": "Ely", "text": "We hit something... and we sank."},
{"name": "Ely", "text": "I lost consciousness and woke up here, alone."},
{"name": "Ely", "text": "To be clear, I wasn't responsible for that accident."},
{"name": "Ely", "text": "I was just trying to do my job and pay my rent..."},
{"name": "Crab", "text": "..."},
{"name": "Ely", "text": "Gosh! Your cute face didn't make this easy."},
{"name": "Ely", "text": "Gosh! Your damn cute face didn't make it easy."},
{"name": "Crab", "text": "Sorry, I have only one animation, the artist is lazy..."},
{"name": "Crab", "text": "...So is that it ?"},
{"name": "Crab", "text": "So... is that it?"},
{"name": "Ely", "text": "Yeah! Pretty much."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "Why are you telling me the truth ?"},
{"name": "Ely", "text": "Sorry, wha-"},
{"name": "Crab", "text": "Why did you tell me the truth?"},
{"name": "Ely", "text": "wha-", "auto": true},
{"name": "Crab", "text": "I thought we were telling tales."},
{"name": "Ely", "text": "Y-yeah. That's true..."},
{"name": "Ely", "text": "I don't know. I find it really hard to lie"},
{"name": "Ely", "text": "Furthermore, I think it's better to tell what really happened."},
{"name": "Ely", "text": "Y-yeah. True."},
{"name": "Ely", "text": "I don't know. I find it really hard to lie."},
{"name": "Ely", "text": "Furthermore, I think it's better to tell the truth."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "Is it really?"},
{"name": "Ely", "text": "What do you mean?"},
{"name": "Crab", "text": "What does it changes ? Is the world a better place now ?"},
{"name": "Crab", "text": "Did you accomplish anything by telling the truth ?"},
{"name": "Crab", "text": "What does it change? Is the world a better place now?"},
{"name": "Crab", "text": "What does it accomplish?"},
{"name": "Ely", "text": "I mean... Now you know it was hum-... hum... hoomans' fault."},
{"name": "Crab", "text": "I already knew that and besides, what can I [wave amp=20 freq=2]do[wave/] with this knowledge ?"},
{"name": "Crab", "text": "I already knew that. And besides, what could I [wave amp=20 freq=2]do[/wave] with this knowledge?"},
{"name": "Ely", "text": "..."},
{"name": "Ely", "text": "Nothing..."},
{"name": "Ely", "text": "You're just..."},
{"name": "Crab", "text": "a cute talking crab ?"},
{"name": "Crab", "text": "A cute talking crab?"},
{"name": "Ely", "text": "Yeah... A cute talking crab."},
{"name": "Ely", "text": "..."},
{"name": "Ely", "text": "I'm sorry."},
@ -42,16 +42,29 @@
{"name": "Crab", "text": "You said you were just trying to do your job and pay you rent."},
{"name": "Ely", "text": "Yes true."},
{"name": "Ely", "text": "But I'm still responsible."},
{"name": "Ely", "text": "I-I shouldn't have pick this job. I know it's bad for the environnement."},
{"name": "Ely", "text": "And I dislike the job, it's not a pleasure to participate in this system."},
{"name": "Ely", "text": "I-I shouldn't have picked this job. I know it's bad for the environment."},
{"name": "Ely", "text": "And participating in this system... ain't a pleasure at all."},
{"name": "Ely", "text": "Uh. Crap."},
{"name": "Ely", "text": "I'm so sorry."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "You had to pick this job."},
{"name": "Crab", "text": "You had no choice but to pick this job."},
{"name": "Ely", "text": "... I suppose..."},
{"name": "Ely", "text": "Yes... That was the only way to pay my bills."},
{"name": "Crab", "text": "..."},
{"name": "Crab", "text": "To be honest..."},
{"name": "Crab", "text": "It's okay. You were in a system that requires you to take that job."},
{"name": "Crab", "text": "If I had someone or something to blame or attack it could be you but "}
{"name": "Crab", "text": "To be honest... It's okay."},
{"name": "Crab", "text": "You are in a system that requires you to take that job."},
{"name": "Crab", "text": "If I needed someone or something to blame it could be you."},
{"name": "Crab", "text": "But it feels like the system you're talking about is what's to blame."},
{"name": "Crab", "text": "What forced you to take the job really is eviler than you."},
{"name": "Ely", "text": "[code]Actually it's \"more evil than\".[/code]"},
{"name": "Crab", "text": "Welp imma take that back."},
{"name": "Ely", "text": "Haha"},
{"name": "Crab", "text": "I'll say one last thing."},
{"name": "Ely", "text": "..."},
{"name": "Crab", "text": "Maybe some of us won't blame the system."},
{"name": "Crab", "text": "Maybe some of us will blame you."},
{"name": "Crab", "text": "And I cannot do anything about that."},
{"name": "Ely", "text": "..."},
{"name": "Ely", "text": "Fair."}
]

BIN
images/campfire/Choice.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Choice.png-da9b62f2dfce1054bb0be0878760a98e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/campfire/Choice.png"
dest_files=[ "res://.import/Choice.png-da9b62f2dfce1054bb0be0878760a98e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,45 @@
[gd_resource type="SpriteFrames" load_steps=8 format=2]
[ext_resource path="res://images/campfire/Choice.png" type="Texture" id=1]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 384, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 576, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 192, 108 )
[resource]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "default",
"speed": 2.0
}, {
"frames": [ SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "truth",
"speed": 2.0
}, {
"frames": [ SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "lie",
"speed": 2.0
} ]

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/HerbertMustGo.png-eb1b4766bd9a7596a2ea26b5fc498985.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/oil_tanker/HerbertMustGo.png"
dest_files=[ "res://.import/HerbertMustGo.png-eb1b4766bd9a7596a2ea26b5fc498985.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,27 @@
[gd_resource type="SpriteFrames" load_steps=6 format=2]
[ext_resource path="res://images/oil_tanker/HerbertMustGo.png" type="Texture" id=1]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 384, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 576, 0, 192, 108 )
[resource]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "default",
"speed": 3.0
} ]

View File

@ -1,34 +1,17 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://images/campfire/campfire.tres" type="SpriteFrames" id=1]
[ext_resource path="res://images/campfire/ely.tres" type="SpriteFrames" id=2]
[ext_resource path="res://scenes/campfire/Herbert.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/campfire/CampfireBackground.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/dialogue.tscn" type="PackedScene" id=3]
[ext_resource path="res://scripts/scenes/IntroScript.gd" type="Script" id=4]
[ext_resource path="res://images/campfire/herbert_intro.tres" type="SpriteFrames" id=5]
[ext_resource path="res://sounds/BRS_Fire_Campfire_Busy_Crackles_Snaps_1.wav" type="AudioStream" id=6]
[node name="root" type="Node2D"]
[node name="Campfire (background)" type="AnimatedSprite" parent="."]
frames = ExtResource( 1 )
playing = true
centered = false
[node name="CampfireBackground" parent="." instance=ExtResource( 2 )]
frame = 14
[node name="FireCrackles" type="AudioStreamPlayer" parent="Campfire (background)"]
stream = ExtResource( 6 )
autoplay = true
[node name="Ely" type="AnimatedSprite" parent="."]
frames = ExtResource( 2 )
animation = "idle"
playing = true
centered = false
[node name="Herbert" type="AnimatedSprite" parent="."]
[node name="Herbert" parent="." instance=ExtResource( 1 )]
visible = false
frames = ExtResource( 5 )
animation = "idle"
centered = false
[node name="UI" type="Control" parent="."]
margin_right = 192.0
@ -43,6 +26,6 @@ visible = false
[node name="IntroScript" type="Node" parent="."]
script = ExtResource( 4 )
dialogue_box_path = NodePath("../UI/Dialog")
ely_sprite_path = NodePath("../Ely")
ely_sprite_path = NodePath("../CampfireBackground/Ely")
herbert_sprite_path = NodePath("../Herbert")
intro_dialogue = "res://dialogues/intro_1.json"

View File

@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://images/campfire/campfire.tres" type="SpriteFrames" id=1]
[ext_resource path="res://images/campfire/ely.tres" type="SpriteFrames" id=2]
[ext_resource path="res://sounds/BRS_Fire_Campfire_Busy_Crackles_Snaps_1.wav" type="AudioStream" id=3]
[node name="CampfireBackground" type="AnimatedSprite"]
frames = ExtResource( 1 )
frame = 10
playing = true
centered = false
[node name="FireCrackles" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
autoplay = true
[node name="Ely" type="AnimatedSprite" parent="."]
frames = ExtResource( 2 )
animation = "idle"
frame = 74
playing = true
centered = false

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://images/campfire/herbert_intro.tres" type="SpriteFrames" id=1]
[node name="Herbert" type="AnimatedSprite"]
frames = ExtResource( 1 )
animation = "idle"
centered = false

36
scenes/campfire2.tscn Normal file
View File

@ -0,0 +1,36 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://scripts/campfire2.gd" type="Script" id=1]
[ext_resource path="res://scenes/campfire/Herbert.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/campfire/CampfireBackground.tscn" type="PackedScene" id=3]
[ext_resource path="res://scenes/dialogue.tscn" type="PackedScene" id=4]
[ext_resource path="res://images/campfire/thechoice.tres" type="SpriteFrames" id=5]
[node name="Node2D" type="Node2D"]
script = ExtResource( 1 )
end_1_dialogue = "res://dialogues/End_1.json"
end_truth_dialogue = "res://dialogues/End_Truth.json"
end_lie_dialogue = "res://dialogues/End_Lie.json"
[node name="CampfireBackground" parent="." instance=ExtResource( 3 )]
frame = 7
[node name="Herbert" parent="." instance=ExtResource( 2 )]
visible = false
[node name="UI" type="Control" parent="."]
margin_right = 192.0
margin_bottom = 108.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue" parent="UI" instance=ExtResource( 4 )]
name_label_path = NodePath("../Dialogue/MarginContainer/VBoxContainer/MarginContainer/MarginContainer/CharacterName")
text_label_path = NodePath("../Dialogue/MarginContainer/VBoxContainer/MarginContainer2/MarginContainer/DialogText")
[node name="TheChoice" type="AnimatedSprite" parent="."]
visible = false
frames = ExtResource( 5 )
animation = "lie"
centered = false

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=35 format=2]
[gd_scene load_steps=37 format=2]
[ext_resource path="res://scripts/oil_tanker.gd" type="Script" id=1]
[ext_resource path="res://images/oil_tanker/OilTanker.tres" type="SpriteFrames" id=2]
@ -6,6 +6,7 @@
[ext_resource path="res://scenes/SidePlayer.tscn" type="PackedScene" id=4]
[ext_resource path="res://images/oil_tanker/oilTankerInside_Foreground.png" type="Texture" id=5]
[ext_resource path="res://scripts/GooEmitter.gd" type="Script" id=6]
[ext_resource path="res://images/oil_tanker/HerbertMustGo.tres" type="SpriteFrames" id=7]
[ext_resource path="res://images/goo/BigGoo1.tres" type="Resource" id=8]
[ext_resource path="res://images/goo/BigGoo2.tres" type="Resource" id=11]
[ext_resource path="res://images/goo/goo5.tres" type="Resource" id=12]
@ -21,51 +22,58 @@
[ext_resource path="res://images/oil_tanker/OilTankerLeak_Midground.png" type="Texture" id=22]
[ext_resource path="res://images/oil_tanker/OilTankerLeak_Midground_GooMask.png" type="Texture" id=23]
[sub_resource type="RectangleShape2D" id=1]
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 10, 34.563 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 10, 34.563 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 276.861, 9.9101 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 276.861, 9.9101 )
[sub_resource type="RectangleShape2D" id=15]
extents = Vector2( 175.74, 9.07445 )
[sub_resource type="CircleShape2D" id=16]
radius = 31.4057
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 10, 27.9493 )
extents = Vector2( 10, 34.563 )
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 10, 27.9493 )
extents = Vector2( 276.861, 9.9101 )
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 20.5315, 7.16187 )
extents = Vector2( 276.861, 9.9101 )
[sub_resource type="RectangleShape2D" id=10]
extents = Vector2( 85.2849, 7.16187 )
extents = Vector2( 175.74, 9.07445 )
[sub_resource type="SegmentShape2D" id=11]
b = Vector2( 70.2283, 33.9024 )
[sub_resource type="CircleShape2D" id=11]
radius = 31.4057
[sub_resource type="SegmentShape2D" id=12]
b = Vector2( 122.205, -7.65517 )
[sub_resource type="RectangleShape2D" id=20]
extents = Vector2( 10, 22.4756 )
[sub_resource type="SegmentShape2D" id=13]
b = Vector2( 107.673, 44.0238 )
[sub_resource type="RectangleShape2D" id=12]
extents = Vector2( 10, 27.9493 )
[sub_resource type="RectangleShape2D" id=13]
extents = Vector2( 10, 27.9493 )
[sub_resource type="RectangleShape2D" id=14]
extents = Vector2( 20.5315, 7.16187 )
[sub_resource type="RectangleShape2D" id=15]
extents = Vector2( 85.2849, 7.16187 )
[sub_resource type="SegmentShape2D" id=16]
b = Vector2( 70.2283, 33.9024 )
[sub_resource type="SegmentShape2D" id=17]
b = Vector2( 122.205, -7.65517 )
[sub_resource type="SegmentShape2D" id=18]
b = Vector2( 107.673, 44.0238 )
[sub_resource type="RectangleShape2D" id=19]
extents = Vector2( 4.85875, 16.0913 )
[node name="Node2D" type="Node2D"]
script = ExtResource( 1 )
[node name="HerbertMustGo" type="AnimatedSprite" parent="."]
frames = ExtResource( 7 )
centered = false
[node name="InsideOilTanker2" type="Sprite" parent="."]
texture = ExtResource( 20 )
centered = false
@ -108,7 +116,7 @@ collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall"]
position = Vector2( -23.7448, 88.1799 )
shape = SubResource( 1 )
shape = SubResource( 6 )
[node name="Wall4" type="StaticBody2D" parent="InsideOilTanker2/walls"]
collision_layer = 2147483652
@ -119,7 +127,7 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall4"]
position = Vector2( 520.202, 91.1098 )
shape = SubResource( 2 )
shape = SubResource( 7 )
[node name="Wall2" type="StaticBody2D" parent="InsideOilTanker2/walls"]
collision_layer = 2147483652
@ -130,7 +138,7 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall2"]
position = Vector2( 249.14, 122.296 )
shape = SubResource( 3 )
shape = SubResource( 8 )
[node name="Wall3" type="StaticBody2D" parent="InsideOilTanker2/walls"]
collision_layer = 2147483652
@ -141,7 +149,7 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall3"]
position = Vector2( 244.468, 58.9552 )
shape = SubResource( 4 )
shape = SubResource( 9 )
[node name="Wall5" type="StaticBody2D" parent="InsideOilTanker2/walls"]
collision_layer = 2147483652
@ -153,7 +161,7 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall5"]
position = Vector2( 342.076, 75.064 )
rotation = 0.0123712
shape = SubResource( 15 )
shape = SubResource( 10 )
[node name="Wall6" type="StaticBody2D" parent="InsideOilTanker2/walls"]
collision_layer = 2147483652
@ -165,7 +173,15 @@ __meta__ = {
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/walls/Wall6"]
position = Vector2( 168.01, 51.7275 )
rotation = 0.0123712
shape = SubResource( 16 )
shape = SubResource( 11 )
[node name="NextTrigger" type="Area2D" parent="InsideOilTanker2"]
collision_layer = 4
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker2/NextTrigger"]
position = Vector2( 330.844, 100.227 )
shape = SubResource( 20 )
[node name="InsideOilTanker" type="Sprite" parent="."]
texture = ExtResource( 3 )
@ -191,49 +207,49 @@ centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall"]
position = Vector2( 208.261, 91.1098 )
shape = SubResource( 7 )
shape = SubResource( 12 )
[node name="Wall2" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall2"]
position = Vector2( -23.7448, 81.6604 )
shape = SubResource( 8 )
shape = SubResource( 13 )
[node name="Wall5" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall5"]
position = Vector2( 6.44882, 51.7275 )
shape = SubResource( 9 )
shape = SubResource( 14 )
[node name="Wall6" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall6"]
position = Vector2( 127.185, 119.399 )
shape = SubResource( 10 )
shape = SubResource( 15 )
[node name="Wall7" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall7"]
position = Vector2( 10.2871, 55.1923 )
shape = SubResource( 11 )
shape = SubResource( 16 )
[node name="Wall9" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall9"]
position = Vector2( 79.5423, 88.1799 )
shape = SubResource( 12 )
shape = SubResource( 17 )
[node name="Wall10" type="StaticBody2D" parent="InsideOilTanker/walls"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/walls/Wall10"]
position = Vector2( -15.3507, 75.064 )
shape = SubResource( 13 )
shape = SubResource( 18 )
[node name="NextTrigger" type="Area2D" parent="InsideOilTanker"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="InsideOilTanker/NextTrigger"]
position = Vector2( 197.689, 97.7763 )
shape = SubResource( 14 )
shape = SubResource( 19 )
[node name="OilTanker" type="AnimatedSprite" parent="."]
frames = ExtResource( 2 )

View File

@ -29,6 +29,13 @@ func _ready():
assert(text_label != null)
assert(music_player != null)
func start_dialogue(dialog_path : String) -> DialogueAction:
var dialogue = DialogueAction.new()
dialogue.dialogue_file_path = dialog_path
dialogue.dialogue_box = self
dialogue.start()
return dialogue
func start(_dialogue : Array):
dialogue = _dialogue
index = 0

View File

@ -18,7 +18,6 @@ func _ready():
func emit():
var particle = goo_particles[rand_range(0, goo_particles.size())] as GooParticle
print(particle.name)
var instance = Particle.new()
instance.particle = particle

63
scripts/campfire2.gd Normal file
View File

@ -0,0 +1,63 @@
extends Node2D
onready var ely = $CampfireBackground
onready var herbert = $Herbert
onready var dialogue_box = $UI/Dialogue
onready var the_choice = $TheChoice
export (String, FILE, '*.json') var end_1_dialogue
export (String, FILE, '*.json') var end_truth_dialogue
export (String, FILE, '*.json') var end_lie_dialogue
func _ready():
assert(end_1_dialogue != null)
assert(end_truth_dialogue != null)
assert(end_lie_dialogue != null)
dialogue_box.connect('update', self, 'update_camera')
yield(dialogue_box.start_dialogue(end_1_dialogue), 'end')
the_choice.show()
the_choice.play('default')
var choice = -1
func make_choice(choice : int):
the_choice.hide()
yield(dialogue_box.start_dialogue(end_truth_dialogue if choice == 0 else end_lie_dialogue), 'end')
func _input(event):
if the_choice.visible:
if event.is_action_pressed("right"):
the_choice.play('lie')
choice = 1
if event.is_action_pressed("left"):
the_choice.play('truth')
choice = 0
if event.is_action_pressed("ui_accept"):
if choice >= 0:
make_choice(choice)
func update_camera():
var animation = dialogue_box.expression
if animation == "":
animation = "idle"
var sprite : AnimatedSprite
if dialogue_box.character_name == 'Crab' || dialogue_box.character_name == 'Herbert':
herbert.show()
sprite = herbert
else:
herbert.hide()
sprite = ely
var is_old_animation_loop = sprite.get_sprite_frames().get_animation_loop(sprite.get_animation())
var is_new_animation_loop = sprite.get_sprite_frames().get_animation_loop(animation)
if !is_old_animation_loop || !is_new_animation_loop:
sprite.frame = 0
sprite.play(animation)
if !is_new_animation_loop:
yield(sprite, 'animation_finished')
dialogue_box.stop_waiting()

View File

@ -1,48 +1,73 @@
extends Node2D
#0
onready var oil_tanker = $OilTanker
#1
onready var oil_tanker_inside_1 = $InsideOilTanker
onready var player_1 = $InsideOilTanker/Player
onready var next_trigger_1 = $InsideOilTanker/NextTrigger
#2
onready var oil_tanker_inside_2 = $InsideOilTanker2
onready var camera = $InsideOilTanker2/Camera2D
onready var player = $InsideOilTanker2/Player
onready var camera_2 = $InsideOilTanker2/Camera2D
onready var player_2 = $InsideOilTanker2/Player
onready var prop1 = $InsideOilTanker2/Parallax/Prop1
onready var prop2 = $InsideOilTanker2/Parallax/Prop2
onready var next_trigger_2 = $InsideOilTanker2/NextTrigger
#3
onready var herbert_must_go_3 = $HerbertMustGo
func _ready():
$OilTanker.connect('animation_finished', self, 'end_oil_tanker')
$InsideOilTanker/NextTrigger.connect("body_entered", self, 'end_inside_oil_tanker')
oil_tanker.connect('animation_finished', self, 'end_step_0')
next_trigger_1.connect("body_entered", self, 'end_step_1')
next_trigger_2.connect("body_entered", self, 'end_step_2')
# $OilTanker.frame = 12
# end_oil_tanker()
# end_inside_oil_tanker($InsideOilTanker/Player)
# oil_tanker.frame = 12
# end_step_0()
# end_step_1(player_1)
func end_oil_tanker():
print('end_oil_tanker')
if $OilTanker.frame > 1:
$OilTanker.queue_free()
$InsideOilTanker/Player.sleep = false
func end_step_0():
print('end_step_0')
if oil_tanker.frame > 1:
oil_tanker.queue_free()
player_1.sleep = false
func end_inside_oil_tanker(body : Node):
print('end_inside_oil_tanker')
func end_step_1(body : Node):
print('end_step_1')
if body.name == "Player":
$InsideOilTanker.queue_free()
$InsideOilTanker2/Player.sleep = false
$InsideOilTanker2/Camera2D.current = true
oil_tanker_inside_1.queue_free()
player_2.sleep = false
camera_2.current = true
func end_step_2(body : Node):
print('end_step_2')
if body.name == "Player":
oil_tanker_inside_2.queue_free()
herbert_must_go_3.play('default')
yield(get_tree().create_timer(5), "timeout")
get_tree().change_scene("res://scenes/campfire2.tscn")
func _input(event):
if $OilTanker != null:
if oil_tanker != null:
if event.is_action_pressed('right'):
if !$OilTanker.is_playing():
$OilTanker.play('default')
if !oil_tanker.is_playing():
oil_tanker.play('default')
if event.is_action_released('right'):
$OilTanker.stop()
oil_tanker.stop()
if event.is_action_pressed('left'):
if !$OilTanker.is_playing() && $OilTanker.frame > 0:
$OilTanker.play('default', true)
if !oil_tanker.is_playing() && oil_tanker.frame > 0:
oil_tanker.play('default', true)
if event.is_action_released('left'):
$OilTanker.stop()
oil_tanker.stop()
func _process(delta):
if !$InsideOilTanker2/Player.sleep:
if player_2 != null && !player_2.sleep:
var screen_width = ProjectSettings.get_setting("display/window/size/width")
camera.position.x = floor(clamp(player.position.x - screen_width / 2.0, 0, oil_tanker_inside_2.texture.get_width() - screen_width))
$InsideOilTanker2/Parallax/Prop2.position.x = floor((260 - camera.position.x) * 0.5)
$InsideOilTanker2/Parallax/Prop1.position.x = floor((300 - camera.position.x) * 0.75)
camera_2.position.x = floor(clamp(player_2.position.x - screen_width / 2.0, 0, oil_tanker_inside_2.texture.get_width() - screen_width))
prop2.position.x = floor((260 - camera_2.position.x) * 0.5)
prop1.position.x = floor((300 - camera_2.position.x) * 0.75)

View File

@ -19,7 +19,7 @@ func _ready():
dialogue_box.connect('update', self, 'update_camera')
yield(get_tree().create_timer(2.0), 'timeout')
yield(start_dialogue(intro_dialogue), 'end')
yield(dialogue_box.start_dialogue(intro_dialogue), 'end')
get_tree().change_scene("res://scenes/game1.tscn")
func update_camera():
@ -46,13 +46,6 @@ func update_camera():
yield(sprite, 'animation_finished')
dialogue_box.stop_waiting()
func start_dialogue(dialog_path : String) -> DialogueAction:
var dialogue = DialogueAction.new()
dialogue.dialogue_file_path = dialog_path
dialogue.dialogue_box = dialogue_box
dialogue.start()
return dialogue
var crab_finished = false
var crab_step = 0
func do_crab_step():