Skip to content

Commit

Permalink
feat: intro cutscene
Browse files Browse the repository at this point in the history
  • Loading branch information
Balloonpopper authored and StraToN committed Mar 24, 2022
1 parent a9aa8dd commit dd4b120
Show file tree
Hide file tree
Showing 9 changed files with 317 additions and 6 deletions.
7 changes: 7 additions & 0 deletions game/rooms/intro/esc/intro.esc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:setup | NO_UI
anim_block intro_animation_player RESET

:ready | NO_UI
anim_block intro_animation_player intro

show_menu main
Binary file added game/rooms/intro/escoria-logo-comet-anim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/rooms/intro/escoria-logo-comet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/rooms/intro/escoria_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/rooms/intro/escoria_background_1080p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/rooms/intro/intro_background_space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/rooms/intro/intro_background_space_1080p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
307 changes: 307 additions & 0 deletions game/rooms/intro/intro_room.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
[gd_scene load_steps=17 format=2]

[ext_resource path="res://game/rooms/intro/escoria-logo-comet-anim.png" type="Texture" id=1]
[ext_resource path="res://game/rooms/intro/intro_background_space.png" type="Texture" id=2]
[ext_resource path="res://game/rooms/intro/escoria-logo-comet.png" type="Texture" id=3]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=4]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=5]
[ext_resource path="res://game/rooms/intro/escoria_background.png" type="Texture" id=6]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7]

[sub_resource type="AtlasTexture" id=9]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 340, 400 )

[sub_resource type="AtlasTexture" id=10]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 340, 0, 340, 400 )

[sub_resource type="AtlasTexture" id=11]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 680, 0, 340, 400 )

[sub_resource type="AtlasTexture" id=12]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1020, 0, 340, 400 )

[sub_resource type="AtlasTexture" id=13]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1360, 0, 340, 400 )

[sub_resource type="AtlasTexture" id=14]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1700, 0, 340, 400 )

[sub_resource type="SpriteFrames" id=8]
animations = [ {
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]

[sub_resource type="Animation" id=1]
length = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("asteroid:visible")
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": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("initial_background:visible")
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": [ true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("animated_asteroid:visible")
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": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("ESCBackground:visible")
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": 1,
"values": [ true ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("asteroid:position")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 620, 450 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("Polygon2D:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ true ]
}

[sub_resource type="Animation" id=2]
resource_name = "intro"
length = 6.0
tracks/0/type = "value"
tracks/0/path = NodePath("animated_asteroid:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 350, -20 ), Vector2( 630, 471 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("animated_asteroid:playing")
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": 1,
"values": [ true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("animated_asteroid:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0.1, 0.1 ), Vector2( 1, 1 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("animated_asteroid:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("asteroid:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ false, true ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("asteroid:modulate")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0, 3.5, 4.5 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("Polygon2D:color")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ) ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("Polygon2D:modulate")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/keys = {
"times": PoolRealArray( 0, 3, 3.5, 5 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/8/type = "value"
tracks/8/path = NodePath("initial_background:visible")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/keys = {
"times": PoolRealArray( 0, 3.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
tracks/9/type = "value"
tracks/9/path = NodePath("asteroid:position")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 620, 450 ) ]
}
tracks/10/type = "value"
tracks/10/path = NodePath("Polygon2D:visible")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}

[node name="ESCRoom" type="Node2D"]
script = ExtResource( 5 )
global_id = "intro_cutscene"
esc_script = "res://game/rooms/intro/esc/intro.esc"
camera_limits = [ Rect2( 0, 0, 1920, 1080 ) ]

[node name="ESCBackground" type="TextureRect" parent="."]
margin_right = 1279.0
margin_bottom = 900.0
mouse_filter = 2
texture = ExtResource( 6 )
expand = true
stretch_mode = 1
script = ExtResource( 4 )

[node name="initial_background" type="Sprite" parent="."]
position = Vector2( 640, 450 )
texture = ExtResource( 2 )

[node name="animated_asteroid" type="AnimatedSprite" parent="."]
visible = false
position = Vector2( 630, 471 )
frames = SubResource( 8 )
frame = 5
playing = true

[node name="Polygon2D" type="Polygon2D" parent="."]
modulate = Color( 1, 1, 1, 0 )
position = Vector2( 0, 6 )
polygon = PoolVector2Array( 0, 0, 1280, 0, 1280, 900, 0, 900 )

[node name="asteroid" type="Sprite" parent="."]
visible = false
modulate = Color( 1, 1, 1, 0 )
position = Vector2( 620, 450 )
texture = ExtResource( 3 )

[node name="ESCItem" type="Area2D" parent="."]
pause_mode = 1
script = ExtResource( 7 )
global_id = "intro_animation_player"
dialog_color = Color( 1, 1, 1, 1 )
animations = null

[node name="AnimationPlayer" type="AnimationPlayer" parent="ESCItem"]
root_node = NodePath("../..")
anims/RESET = SubResource( 1 )
anims/intro = SubResource( 2 )
9 changes: 3 additions & 6 deletions game/start_game.esc
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
:init
# Play Escoria logo cutscene
change_scene res://game/rooms/intro/intro_room.tscn false

# When control is passed back after the logo, start the music
play_snd res://game/sfx/Game-Menu_Looping.mp3 _music

# Showing main menu with automatic transition DISABLED
show_menu main



:newgame

# 1/ Simple scene
change_scene res://game/rooms/room01/room01.tscn

Expand Down

0 comments on commit dd4b120

Please sign in to comment.