diff --git a/graphics/backgrounds/future/mountain_clouds_future.png b/graphics/backgrounds/future/mountain_clouds_future.png new file mode 100644 index 0000000..9e8e745 Binary files /dev/null and b/graphics/backgrounds/future/mountain_clouds_future.png differ diff --git a/graphics/backgrounds/future/mountain_clouds_future.png.import b/graphics/backgrounds/future/mountain_clouds_future.png.import new file mode 100644 index 0000000..22a1b50 --- /dev/null +++ b/graphics/backgrounds/future/mountain_clouds_future.png.import @@ -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 diff --git a/graphics/backgrounds/future/mountain_mountain_future.png b/graphics/backgrounds/future/mountain_mountain_future.png new file mode 100644 index 0000000..ff7a96a Binary files /dev/null and b/graphics/backgrounds/future/mountain_mountain_future.png differ diff --git a/graphics/backgrounds/future/mountain_mountain_future.png.import b/graphics/backgrounds/future/mountain_mountain_future.png.import new file mode 100644 index 0000000..7687bf2 --- /dev/null +++ b/graphics/backgrounds/future/mountain_mountain_future.png.import @@ -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 diff --git a/graphics/backgrounds/future/mountain_sunset_future.png b/graphics/backgrounds/future/mountain_sunset_future.png new file mode 100644 index 0000000..c5d1af1 Binary files /dev/null and b/graphics/backgrounds/future/mountain_sunset_future.png differ diff --git a/graphics/backgrounds/future/mountain_sunset_future.png.import b/graphics/backgrounds/future/mountain_sunset_future.png.import new file mode 100644 index 0000000..5636d8d --- /dev/null +++ b/graphics/backgrounds/future/mountain_sunset_future.png.import @@ -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 diff --git a/graphics/particles/raindrop.png b/graphics/particles/raindrop.png new file mode 100644 index 0000000..c15cee3 Binary files /dev/null and b/graphics/particles/raindrop.png differ diff --git a/graphics/particles/raindrop.png.import b/graphics/particles/raindrop.png.import new file mode 100644 index 0000000..17c932e --- /dev/null +++ b/graphics/particles/raindrop.png.import @@ -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 diff --git a/graphics/tiles/future/mountain_future.png b/graphics/tiles/future/mountain_future.png index e7b3c80..b8d3a5c 100644 Binary files a/graphics/tiles/future/mountain_future.png and b/graphics/tiles/future/mountain_future.png differ diff --git a/maps/future/mountain_future.gd b/maps/future/mountain_future.gd new file mode 100644 index 0000000..0b03a10 --- /dev/null +++ b/maps/future/mountain_future.gd @@ -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)) diff --git a/maps/future/mountain_future.tscn b/maps/future/mountain_future.tscn index 0f4cd4d..aef10cb 100644 --- a/maps/future/mountain_future.tscn +++ b/maps/future/mountain_future.tscn @@ -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://maps/map.gd" type="Script" id=2] -[ext_resource path="res://graphics/backgrounds/mountain_mountain.png" type="Texture" id=3] -[ext_resource path="res://graphics/backgrounds/mountain_clouds.png" type="Texture" id=4] -[ext_resource path="res://graphics/backgrounds/mountain_sunset.png" type="Texture" id=5] +[ext_resource path="res://maps/future/mountain_future.gd" type="Script" id=2] +[ext_resource path="res://graphics/backgrounds/future/mountain_mountain_future.png" type="Texture" id=3] +[ext_resource path="res://graphics/backgrounds/future/mountain_clouds_future.png" type="Texture" id=4] +[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://tilesets/future/t_mountain_future.tres" type="TileSet" id=7] [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/respawn_point.tscn" type="PackedScene" id=25] [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/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] extents = Vector2( 24, 20 ) @@ -84,17 +79,22 @@ tracks/0/keys = { [node name="Map2" type="Node2D" groups=["map"]] pause_mode = 1 script = ExtResource( 2 ) -target_time_any = 45 -target_time_100 = 185 -music = ExtResource( 27 ) -lore_entries = [ ExtResource( 30 ), ExtResource( 28 ), ExtResource( 29 ), ExtResource( 31 ) ] +min_interval = 1.0 +max_interval = 8.0 +fade_time = 1.0 + +[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="CanvasLayer" parent="Background"] layer = -101 -[node name="Sunset" type="Sprite" parent="Background/Background"] +[node name="Sky" type="Sprite" parent="Background/Background"] position = Vector2( 128, 96 ) z_index = -2 texture = ExtResource( 5 ) @@ -102,6 +102,13 @@ __meta__ = { "_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"] layer = -100 follow_viewport_enable = true @@ -119,15 +126,36 @@ __meta__ = { [node name="Background2" type="CanvasLayer" parent="Background"] 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"] pause_mode = 1 +unique_name_in_owner = true position = Vector2( 128, 96 ) -z_index = -2 texture = ExtResource( 4 ) __meta__ = { "_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"]] light_mask = 3 material = ExtResource( 11 ) @@ -680,15 +708,7 @@ cost = 25 [node name="AnimationPlayer" type="AnimationPlayer" parent="." groups=["mountain_easter_egg"]] 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="."] +[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 ]] diff --git a/objects/gfx/lightning.gd b/objects/gfx/lightning.gd new file mode 100644 index 0000000..b3bfc48 --- /dev/null +++ b/objects/gfx/lightning.gd @@ -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 diff --git a/objects/gfx/lightning.tscn b/objects/gfx/lightning.tscn new file mode 100644 index 0000000..1d23a4a --- /dev/null +++ b/objects/gfx/lightning.tscn @@ -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 diff --git a/tilesets/future/t_mountain_future.tres b/tilesets/future/t_mountain_future.tres index 3382d99..7714f42 100644 --- a/tilesets/future/t_mountain_future.tres +++ b/tilesets/future/t_mountain_future.tres @@ -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/future/mountain_future.png" type="Texture" id=2] [sub_resource type="ConvexPolygonShape2D" id=1] 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] 0/name = "grass.png 0" -0/texture = ExtResource( 1 ) +0/texture = ExtResource( 2 ) 0/tex_offset = Vector2( 0, 0 ) 0/modulate = Color( 1, 1, 1, 1 ) 0/region = Rect2( 0, 0, 32, 32 )