game1: add opening text, mask, dialogue
This commit is contained in:
parent
f612d17301
commit
e76e3b73b9
@ -1,5 +1,4 @@
|
|||||||
[
|
[
|
||||||
{"name": "Herbert", "text": "As I was on my daily morning walk, I saw something strange."},
|
{"name": "Herbert", "text": "There was some sort of weird goo floating around.", "upside_down": true, "timer": 6, "auto": true},
|
||||||
{"name": "Herbert", "text": "There was some sort of weird goo floating around."},
|
{"name": "Herbert", "text": "So I decided to look for the source.", "upside_down": true, "timer": 6, "auto": true}
|
||||||
{"name": "Herbert", "text": "So I decided to look for the source."}
|
|
||||||
]
|
]
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 18 KiB |
95
images/game1/Herbert-01.tres
Normal file
95
images/game1/Herbert-01.tres
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
[gd_resource type="SpriteFrames" load_steps=23 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://images/game1/Herbert-01.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 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=5]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 768, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=6]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 960, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=7]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1152, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=8]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1344, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=9]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1536, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=10]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1728, 0, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=11]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 0, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=12]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 192, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=13]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 384, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=14]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 576, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=15]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 768, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=16]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 960, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=17]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1152, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=18]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1344, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=19]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1536, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=20]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 1728, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=21]
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 0, 216, 192, 108 )
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "default",
|
||||||
|
"speed": 10.0
|
||||||
|
} ]
|
BIN
images/game1/Herbert-01_mask.png
Normal file
BIN
images/game1/Herbert-01_mask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
34
images/game1/Herbert-01_mask.png.import
Normal file
34
images/game1/Herbert-01_mask.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Herbert-01_mask.png-0350b46a5177ed2c8ad886792aa1ec05.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/game1/Herbert-01_mask.png"
|
||||||
|
dest_files=[ "res://.import/Herbert-01_mask.png-0350b46a5177ed2c8ad886792aa1ec05.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
|
@ -1,6 +1,6 @@
|
|||||||
[gd_resource type="SpriteFrames" load_steps=22 format=2]
|
[gd_resource type="SpriteFrames" load_steps=23 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://images/game1/Herbert-01.png" type="Texture" id=1]
|
[ext_resource path="res://images/game1/Herbert-01_mask.png" type="Texture" id=1]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id=1]
|
[sub_resource type="AtlasTexture" id=1]
|
||||||
flags = 4
|
flags = 4
|
||||||
@ -102,9 +102,14 @@ flags = 4
|
|||||||
atlas = ExtResource( 1 )
|
atlas = ExtResource( 1 )
|
||||||
region = Rect2( 1728, 108, 192, 108 )
|
region = Rect2( 1728, 108, 192, 108 )
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id=21]
|
||||||
|
flags = 4
|
||||||
|
atlas = ExtResource( 1 )
|
||||||
|
region = Rect2( 0, 216, 192, 108 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
animations = [ {
|
animations = [ {
|
||||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ],
|
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"speed": 10.0
|
"speed": 10.0
|
@ -1,6 +1,6 @@
|
|||||||
[gd_scene load_steps=23 format=2]
|
[gd_scene load_steps=28 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://images/game1/opening.tres" type="SpriteFrames" id=1]
|
[ext_resource path="res://images/game1/Herbert-01.tres" type="SpriteFrames" id=1]
|
||||||
[ext_resource path="res://images/game1/opening2bg.tres" type="SpriteFrames" id=2]
|
[ext_resource path="res://images/game1/opening2bg.tres" type="SpriteFrames" id=2]
|
||||||
[ext_resource path="res://scripts/game1/Game1Script.gd" type="Script" id=3]
|
[ext_resource path="res://scripts/game1/Game1Script.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://scenes/SidePlayer.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://scenes/SidePlayer.tscn" type="PackedScene" id=4]
|
||||||
@ -9,6 +9,9 @@
|
|||||||
[ext_resource path="res://images/goo/goo8.tres" type="Resource" id=7]
|
[ext_resource path="res://images/goo/goo8.tres" type="Resource" id=7]
|
||||||
[ext_resource path="res://scripts/ControlIndicator.gd" type="Script" id=8]
|
[ext_resource path="res://scripts/ControlIndicator.gd" type="Script" id=8]
|
||||||
[ext_resource path="res://scripts/game1/ControlIndicators1.gd" type="Script" id=9]
|
[ext_resource path="res://scripts/game1/ControlIndicators1.gd" type="Script" id=9]
|
||||||
|
[ext_resource path="res://scenes/dialogue.tscn" type="PackedScene" id=10]
|
||||||
|
[ext_resource path="res://fonts/dialog_default_font.tres" type="DynamicFont" id=11]
|
||||||
|
[ext_resource path="res://images/game1/Herbert-01_mask.tres" type="SpriteFrames" id=12]
|
||||||
[ext_resource path="res://images/goo/goo4.tres" type="Resource" id=29]
|
[ext_resource path="res://images/goo/goo4.tres" type="Resource" id=29]
|
||||||
[ext_resource path="res://images/goo/BigGoo2.tres" type="Resource" id=30]
|
[ext_resource path="res://images/goo/BigGoo2.tres" type="Resource" id=30]
|
||||||
[ext_resource path="res://images/goo/goo2.tres" type="Resource" id=31]
|
[ext_resource path="res://images/goo/goo2.tres" type="Resource" id=31]
|
||||||
@ -31,8 +34,78 @@ extents = Vector2( 13.4499, 41.9587 )
|
|||||||
[sub_resource type="RectangleShape2D" id=4]
|
[sub_resource type="RectangleShape2D" id=4]
|
||||||
extents = Vector2( 6.44203, 23.0973 )
|
extents = Vector2( 6.44203, 23.0973 )
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id=14]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
uniform sampler2D tex_frg_3;
|
||||||
|
uniform sampler2D tex_frg_7;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
// Output:0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
// Input:5
|
||||||
|
|
||||||
|
// Input:2
|
||||||
|
|
||||||
|
// Texture:3
|
||||||
|
vec4 tex_frg_3_read = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||||
|
vec3 n_out3p0 = tex_frg_3_read.rgb;
|
||||||
|
float n_out3p1 = tex_frg_3_read.a;
|
||||||
|
|
||||||
|
// VectorDecompose:10
|
||||||
|
float n_out10p0 = n_out3p0.x;
|
||||||
|
float n_out10p1 = n_out3p0.y;
|
||||||
|
float n_out10p2 = n_out3p0.z;
|
||||||
|
|
||||||
|
// Input:8
|
||||||
|
vec3 n_out8p0 = vec3(UV, 0.0);
|
||||||
|
|
||||||
|
// Input:6
|
||||||
|
|
||||||
|
// Texture:7
|
||||||
|
vec4 tex_frg_7_read = texture(TEXTURE, n_out8p0.xy);
|
||||||
|
vec3 n_out7p0 = tex_frg_7_read.rgb;
|
||||||
|
float n_out7p1 = tex_frg_7_read.a;
|
||||||
|
|
||||||
|
// If:9
|
||||||
|
float n_in9p1 = 1.00000;
|
||||||
|
float n_in9p2 = 0.05000;
|
||||||
|
vec3 n_out9p0;
|
||||||
|
if(abs(n_out10p0 - n_in9p1) < n_in9p2)
|
||||||
|
{
|
||||||
|
n_out9p0 = n_out7p0;
|
||||||
|
}
|
||||||
|
else if(n_out10p0 < n_in9p1)
|
||||||
|
{
|
||||||
|
n_out9p0 = n_out3p0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
n_out9p0 = n_out3p0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Output:0
|
||||||
|
COLOR.rgb = n_out9p0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void light() {
|
||||||
|
// Output:0
|
||||||
|
|
||||||
|
}
|
||||||
|
"
|
||||||
|
custom_defines = ""
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=13]
|
||||||
|
shader = SubResource( 14 )
|
||||||
|
|
||||||
[node name="Node2D" type="Node2D"]
|
[node name="Node2D" type="Node2D"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
dialogue = "res://dialogues/game1.json"
|
||||||
|
|
||||||
[node name="Game" type="Node2D" parent="."]
|
[node name="Game" type="Node2D" parent="."]
|
||||||
|
|
||||||
@ -110,3 +183,35 @@ script = ExtResource( 8 )
|
|||||||
[node name="Opening1" type="AnimatedSprite" parent="."]
|
[node name="Opening1" type="AnimatedSprite" parent="."]
|
||||||
frames = ExtResource( 1 )
|
frames = ExtResource( 1 )
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="Opening1"]
|
||||||
|
margin_left = 54.0011
|
||||||
|
margin_top = 30.8309
|
||||||
|
margin_right = 157.001
|
||||||
|
margin_bottom = 77.8309
|
||||||
|
custom_fonts/font = ExtResource( 11 )
|
||||||
|
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||||
|
text = "As I was on my daily morning walk, I saw something strange."
|
||||||
|
align = 1
|
||||||
|
autowrap = true
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Mask" type="AnimatedSprite" parent="Opening1"]
|
||||||
|
frames = ExtResource( 12 )
|
||||||
|
centered = false
|
||||||
|
|
||||||
|
[node name="OpeningOver" type="AnimatedSprite" parent="Opening1"]
|
||||||
|
material = SubResource( 13 )
|
||||||
|
frames = ExtResource( 1 )
|
||||||
|
centered = false
|
||||||
|
|
||||||
|
[node name="UI" type="Control" parent="."]
|
||||||
|
margin_right = 192.0
|
||||||
|
margin_bottom = 108.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Dialog" parent="UI" instance=ExtResource( 10 )]
|
||||||
|
@ -6,6 +6,9 @@ onready var player_fab = preload('res://scenes/game1/Player.tscn')
|
|||||||
var player : AnimatedSprite
|
var player : AnimatedSprite
|
||||||
var player_camera : Camera2D
|
var player_camera : Camera2D
|
||||||
|
|
||||||
|
onready var dialogue_box = $UI/Dialog
|
||||||
|
export (String, FILE, '*.json') var dialogue
|
||||||
|
|
||||||
onready var levels = [
|
onready var levels = [
|
||||||
#'TestLogEntity',
|
#'TestLogEntity',
|
||||||
'Level1',
|
'Level1',
|
||||||
@ -22,6 +25,8 @@ var spawn_pos = Vector2()
|
|||||||
var exit_points = []
|
var exit_points = []
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
assert(dialogue != null)
|
||||||
|
|
||||||
if skipToLevel != '':
|
if skipToLevel != '':
|
||||||
$Opening1.queue_free()
|
$Opening1.queue_free()
|
||||||
start_game()
|
start_game()
|
||||||
@ -29,10 +34,15 @@ func _ready():
|
|||||||
next_level()
|
next_level()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
yield(get_tree().create_timer(6), "timeout")
|
||||||
$Opening1.play('default')
|
$Opening1.play('default')
|
||||||
|
$Opening1/Mask.play('default')
|
||||||
|
$Opening1/OpeningOver.play('default')
|
||||||
yield($Opening1, 'animation_finished')
|
yield($Opening1, 'animation_finished')
|
||||||
$Opening1.queue_free()
|
$Opening1.queue_free()
|
||||||
|
|
||||||
$Opening2/Player.sleep = false
|
$Opening2/Player.sleep = false
|
||||||
|
yield(dialogue_box.start_dialogue(dialogue), 'end')
|
||||||
|
|
||||||
func start_game():
|
func start_game():
|
||||||
# Hide opening
|
# Hide opening
|
||||||
|
Loading…
Reference in New Issue
Block a user