stormy day
This commit is contained in:
parent
72761e3de7
commit
6c211c364c
14 changed files with 266 additions and 28 deletions
BIN
graphics/backgrounds/future/mountain_clouds_future.png
Normal file
BIN
graphics/backgrounds/future/mountain_clouds_future.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/mountain_clouds_future.png-82a2b49c4c528aaf3362c6117191441f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/backgrounds/future/mountain_clouds_future.png"
|
||||||
|
dest_files=[ "res://.import/mountain_clouds_future.png-82a2b49c4c528aaf3362c6117191441f.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
BIN
graphics/backgrounds/future/mountain_mountain_future.png
Normal file
BIN
graphics/backgrounds/future/mountain_mountain_future.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/mountain_mountain_future.png-0659ba78fd43afd0d3b94d55ab64e26d.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/backgrounds/future/mountain_mountain_future.png"
|
||||||
|
dest_files=[ "res://.import/mountain_mountain_future.png-0659ba78fd43afd0d3b94d55ab64e26d.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
BIN
graphics/backgrounds/future/mountain_sunset_future.png
Normal file
BIN
graphics/backgrounds/future/mountain_sunset_future.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/mountain_sunset_future.png-aec14beb52361837a7350902edff2fca.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/backgrounds/future/mountain_sunset_future.png"
|
||||||
|
dest_files=[ "res://.import/mountain_sunset_future.png-aec14beb52361837a7350902edff2fca.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
BIN
graphics/particles/raindrop.png
Normal file
BIN
graphics/particles/raindrop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 563 B |
35
graphics/particles/raindrop.png.import
Normal file
35
graphics/particles/raindrop.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/raindrop.png-b4ad8b4d270933f9f9b4ccdb25eb0182.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/particles/raindrop.png"
|
||||||
|
dest_files=[ "res://.import/raindrop.png-b4ad8b4d270933f9f9b4ccdb25eb0182.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
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
Binary file not shown.
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
29
maps/future/mountain_future.gd
Normal file
29
maps/future/mountain_future.gd
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
extends "res://maps/map.gd"
|
||||||
|
|
||||||
|
|
||||||
|
const Lightning = preload("res://objects/gfx/lightning.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
export var min_interval: float
|
||||||
|
export var max_interval: float
|
||||||
|
export var fade_time: float
|
||||||
|
|
||||||
|
|
||||||
|
onready var lightning_spawn: Node2D = $"%LightningSpawn"
|
||||||
|
onready var bright_sky: ColorRect = $"%BrightSky"
|
||||||
|
onready var lightning_timer: Timer = $"%LightningTimer"
|
||||||
|
onready var clouds: Sprite = $"%Clouds"
|
||||||
|
|
||||||
|
|
||||||
|
func _spawn_lightning():
|
||||||
|
var bolt = Lightning.instance()
|
||||||
|
bright_sky.modulate.a = 1.0
|
||||||
|
clouds.modulate = Color(1.2, 1.2, 1.2)
|
||||||
|
bolt.position.x = rand_range(-100.0, 100.0)
|
||||||
|
bolt.fade_time = fade_time
|
||||||
|
lightning_spawn.add_child(bolt)
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.set_parallel(true)
|
||||||
|
tween.tween_property(bright_sky, "modulate:a", 0.0, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||||
|
tween.tween_property(clouds, "modulate", Color.white, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||||
|
lightning_timer.start(rand_range(min_interval, max_interval))
|
|
@ -1,10 +1,10 @@
|
||||||
[gd_scene load_steps=45 format=2]
|
[gd_scene load_steps=40 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://maps/map.gd" type="Script" id=2]
|
[ext_resource path="res://maps/future/mountain_future.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://graphics/backgrounds/mountain_mountain.png" type="Texture" id=3]
|
[ext_resource path="res://graphics/backgrounds/future/mountain_mountain_future.png" type="Texture" id=3]
|
||||||
[ext_resource path="res://graphics/backgrounds/mountain_clouds.png" type="Texture" id=4]
|
[ext_resource path="res://graphics/backgrounds/future/mountain_clouds_future.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://graphics/backgrounds/mountain_sunset.png" type="Texture" id=5]
|
[ext_resource path="res://graphics/backgrounds/future/mountain_sunset_future.png" type="Texture" id=5]
|
||||||
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=6]
|
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=6]
|
||||||
[ext_resource path="res://tilesets/future/t_mountain_future.tres" type="TileSet" id=7]
|
[ext_resource path="res://tilesets/future/t_mountain_future.tres" type="TileSet" id=7]
|
||||||
[ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=8]
|
[ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=8]
|
||||||
|
@ -26,13 +26,8 @@
|
||||||
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=24]
|
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=24]
|
||||||
[ext_resource path="res://objects/respawn_point.tscn" type="PackedScene" id=25]
|
[ext_resource path="res://objects/respawn_point.tscn" type="PackedScene" id=25]
|
||||||
[ext_resource path="res://objects/environment/exit/exit.tscn" type="PackedScene" id=26]
|
[ext_resource path="res://objects/environment/exit/exit.tscn" type="PackedScene" id=26]
|
||||||
[ext_resource path="res://audio/music/burnt_out.ogg" type="AudioStream" id=27]
|
|
||||||
[ext_resource path="res://objects/lore/hills/eviscerator.tscn" type="PackedScene" id=28]
|
|
||||||
[ext_resource path="res://objects/lore/hills/catbat.tscn" type="PackedScene" id=29]
|
|
||||||
[ext_resource path="res://objects/lore/mountain/echo_mountain.tscn" type="PackedScene" id=30]
|
|
||||||
[ext_resource path="res://objects/lore/mountain/rolling_fiend.tscn" type="PackedScene" id=31]
|
|
||||||
[ext_resource path="res://graphics/turniwood/turning_platform_wood_dark.png" type="Texture" id=32]
|
[ext_resource path="res://graphics/turniwood/turning_platform_wood_dark.png" type="Texture" id=32]
|
||||||
[ext_resource path="res://graphics/particles/pixel.png" type="Texture" id=33]
|
[ext_resource path="res://graphics/particles/raindrop.png" type="Texture" id=33]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=2]
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
extents = Vector2( 24, 20 )
|
extents = Vector2( 24, 20 )
|
||||||
|
@ -84,17 +79,22 @@ tracks/0/keys = {
|
||||||
[node name="Map2" type="Node2D" groups=["map"]]
|
[node name="Map2" type="Node2D" groups=["map"]]
|
||||||
pause_mode = 1
|
pause_mode = 1
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
target_time_any = 45
|
min_interval = 1.0
|
||||||
target_time_100 = 185
|
max_interval = 8.0
|
||||||
music = ExtResource( 27 )
|
fade_time = 1.0
|
||||||
lore_entries = [ ExtResource( 30 ), ExtResource( 28 ), ExtResource( 29 ), ExtResource( 31 ) ]
|
|
||||||
|
[node name="LightningTimer" type="Timer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
wait_time = 5.0
|
||||||
|
one_shot = true
|
||||||
|
autostart = true
|
||||||
|
|
||||||
[node name="Background" type="Node" parent="."]
|
[node name="Background" type="Node" parent="."]
|
||||||
|
|
||||||
[node name="Background" type="CanvasLayer" parent="Background"]
|
[node name="Background" type="CanvasLayer" parent="Background"]
|
||||||
layer = -101
|
layer = -101
|
||||||
|
|
||||||
[node name="Sunset" type="Sprite" parent="Background/Background"]
|
[node name="Sky" type="Sprite" parent="Background/Background"]
|
||||||
position = Vector2( 128, 96 )
|
position = Vector2( 128, 96 )
|
||||||
z_index = -2
|
z_index = -2
|
||||||
texture = ExtResource( 5 )
|
texture = ExtResource( 5 )
|
||||||
|
@ -102,6 +102,13 @@ __meta__ = {
|
||||||
"_edit_lock_": true
|
"_edit_lock_": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="BrightSky" type="ColorRect" parent="Background/Background"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
modulate = Color( 1, 1, 1, 0 )
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
color = Color( 0.623529, 0.815686, 1, 1 )
|
||||||
|
|
||||||
[node name="BackgroundMountain" type="CanvasLayer" parent="Background"]
|
[node name="BackgroundMountain" type="CanvasLayer" parent="Background"]
|
||||||
layer = -100
|
layer = -100
|
||||||
follow_viewport_enable = true
|
follow_viewport_enable = true
|
||||||
|
@ -119,15 +126,36 @@ __meta__ = {
|
||||||
[node name="Background2" type="CanvasLayer" parent="Background"]
|
[node name="Background2" type="CanvasLayer" parent="Background"]
|
||||||
layer = -100
|
layer = -100
|
||||||
|
|
||||||
|
[node name="LightningSpawn" type="Node2D" parent="Background/Background2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2( 128, 36 )
|
||||||
|
|
||||||
[node name="Clouds" type="Sprite" parent="Background/Background2"]
|
[node name="Clouds" type="Sprite" parent="Background/Background2"]
|
||||||
pause_mode = 1
|
pause_mode = 1
|
||||||
|
unique_name_in_owner = true
|
||||||
position = Vector2( 128, 96 )
|
position = Vector2( 128, 96 )
|
||||||
z_index = -2
|
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_lock_": true
|
"_edit_lock_": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="RainLayer" type="CanvasLayer" parent="."]
|
||||||
|
layer = 50
|
||||||
|
|
||||||
|
[node name="CPUParticles2D" type="CPUParticles2D" parent="RainLayer"]
|
||||||
|
position = Vector2( 104, 0 )
|
||||||
|
amount = 48
|
||||||
|
lifetime = 0.85
|
||||||
|
preprocess = 1.0
|
||||||
|
texture = ExtResource( 33 )
|
||||||
|
emission_shape = 2
|
||||||
|
emission_rect_extents = Vector2( 160, 0 )
|
||||||
|
flag_align_y = true
|
||||||
|
direction = Vector2( 0.2, 1 )
|
||||||
|
spread = 5.0
|
||||||
|
gravity = Vector2( 0, 0 )
|
||||||
|
initial_velocity = 250.0
|
||||||
|
|
||||||
[node name="Ground" type="TileMap" parent="." groups=["can_stain"]]
|
[node name="Ground" type="TileMap" parent="." groups=["can_stain"]]
|
||||||
light_mask = 3
|
light_mask = 3
|
||||||
material = ExtResource( 11 )
|
material = ExtResource( 11 )
|
||||||
|
@ -680,15 +708,7 @@ cost = 25
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." groups=["mountain_easter_egg"]]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="." groups=["mountain_easter_egg"]]
|
||||||
anims/liftoff = SubResource( 10 )
|
anims/liftoff = SubResource( 10 )
|
||||||
|
|
||||||
[node name="Light2D" type="Light2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2( 73, 33 )
|
|
||||||
scale = Vector2( 256, 192 )
|
|
||||||
texture = ExtResource( 33 )
|
|
||||||
offset = Vector2( 0.5, 0.5 )
|
|
||||||
energy = 0.25
|
|
||||||
mode = 1
|
|
||||||
|
|
||||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||||
|
|
||||||
|
[connection signal="timeout" from="LightningTimer" to="." method="_spawn_lightning"]
|
||||||
[connection signal="tree_entered" from="Background/BackgroundMountain/Mountain" to="Background/BackgroundMountain/Mountain" method="set_visible" binds= [ true ]]
|
[connection signal="tree_entered" from="Background/BackgroundMountain/Mountain" to="Background/BackgroundMountain/Mountain" method="set_visible" binds= [ true ]]
|
||||||
|
|
34
objects/gfx/lightning.gd
Normal file
34
objects/gfx/lightning.gd
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
export var color: Color
|
||||||
|
export var width: float = 1.5
|
||||||
|
export var segments: int
|
||||||
|
export var segment_length: float
|
||||||
|
export var angle_min: float
|
||||||
|
export var angle_max: float
|
||||||
|
export var branch_chance: float
|
||||||
|
export var fade_time: float
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_property(self, "modulate:a", 0.0, fade_time).set_trans(Tween.TRANS_EXPO)
|
||||||
|
tween.tween_callback(self, "queue_free")
|
||||||
|
|
||||||
|
|
||||||
|
func _draw() -> void:
|
||||||
|
var pos := Vector2.ZERO
|
||||||
|
var dir := Vector2.DOWN * segment_length
|
||||||
|
var offset = randi() % 2
|
||||||
|
for i in range(offset, segments + offset):
|
||||||
|
var angle = rand_range(angle_min, angle_max)
|
||||||
|
if i % 2 == 0:
|
||||||
|
angle *= -1.0
|
||||||
|
dir = dir.rotated(deg2rad(angle))
|
||||||
|
var new_pos = pos + dir
|
||||||
|
draw_line(pos, new_pos, color, width, false)
|
||||||
|
if randf() <= branch_chance:
|
||||||
|
dir = dir.rotated(deg2rad(angle) * -2.0)
|
||||||
|
draw_line(pos, pos + dir, color, width, false)
|
||||||
|
pos = new_pos
|
14
objects/gfx/lightning.tscn
Normal file
14
objects/gfx/lightning.tscn
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://objects/gfx/lightning.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="Lightning" type="Node2D"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
color = Color( 1, 1, 1, 1 )
|
||||||
|
width = 2.0
|
||||||
|
segments = 8
|
||||||
|
segment_length = 20.0
|
||||||
|
angle_min = 15.0
|
||||||
|
angle_max = 45.0
|
||||||
|
branch_chance = 0.4
|
||||||
|
fade_time = 1.0
|
|
@ -1,6 +1,7 @@
|
||||||
[gd_resource type="TileSet" load_steps=17 format=2]
|
[gd_resource type="TileSet" load_steps=18 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://graphics/tiles/mountain.png" type="Texture" id=1]
|
[ext_resource path="res://graphics/tiles/mountain.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://graphics/tiles/future/mountain_future.png" type="Texture" id=2]
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||||
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
|
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
|
||||||
|
@ -49,7 +50,7 @@ points = PoolVector2Array( 8, 2, 0, 2, 0, 2, 8, 2 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
0/name = "grass.png 0"
|
0/name = "grass.png 0"
|
||||||
0/texture = ExtResource( 1 )
|
0/texture = ExtResource( 2 )
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
0/region = Rect2( 0, 0, 32, 32 )
|
0/region = Rect2( 0, 0, 32, 32 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue