laboratory tiles and electrification shader

This commit is contained in:
Haze Weathers 2023-07-11 16:57:02 -04:00
parent cb5f9284cf
commit be2008163d
5 changed files with 760 additions and 16 deletions

View file

@ -1,6 +1,5 @@
[gd_scene load_steps=29 format=2]
[gd_scene load_steps=32 format=2]
[ext_resource path="res://objects/enemy/squig.tscn" type="PackedScene" id=1]
[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2]
[ext_resource path="res://tilesets/t_mountain.tres" type="TileSet" id=3]
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=4]
@ -8,14 +7,15 @@
[ext_resource path="res://objects/environment/moving_platform/moving_platform.tscn" type="PackedScene" id=6]
[ext_resource path="res://graphics/backgrounds/canopy.png" type="Texture" id=7]
[ext_resource path="res://objects/environment/turret/turret.tscn" type="PackedScene" id=8]
[ext_resource path="res://tilesets/t_laboratory.tres" type="TileSet" id=9]
[ext_resource path="res://objects/enemy/slime.tscn" type="PackedScene" id=10]
[ext_resource path="res://maps/map.gd" type="Script" id=11]
[ext_resource path="res://objects/environment/turniwood/turning_platform.tscn" type="PackedScene" id=12]
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=13]
[ext_resource path="res://objects/environment/hatch/hatch.tscn" type="PackedScene" id=14]
[ext_resource path="res://shaders/electricity.gdshader" type="Shader" id=15]
[ext_resource path="res://objects/respawn_point.tscn" type="PackedScene" id=16]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=17]
[ext_resource path="res://objects/enemy/turtle.tscn" type="PackedScene" id=18]
[ext_resource path="res://objects/environment/switches/button.tscn" type="PackedScene" id=19]
[ext_resource path="res://objects/enemy/tin.tscn" type="PackedScene" id=20]
[ext_resource path="res://graphics/enemy/sawblade.png" type="Texture" id=21]
@ -46,6 +46,133 @@ animations = [ {
"speed": 20.0
} ]
[sub_resource type="ShaderMaterial" id=10]
shader = ExtResource( 15 )
shader_param/arc_speed = 4.0
shader_param/arc_fps = 10.0
shader_param/arc_scale = 8.0
shader_param/arc_threshold = 0.15
shader_param/arc_color = Color( 1, 0.93, 0, 1 )
shader_param/gamma = 2.0
shader_param/flash_rate = 20.0
shader_param/flash_intensity = 0.2
[sub_resource type="Animation" id=64]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:material:shader_param/arc_color")
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": [ Color( 1, 0.93, 0, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:material:shader_param/arc_speed")
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": [ 4.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:material:shader_param/gamma")
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": 0,
"values": [ 2.0 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:material:shader_param/flash_intensity")
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": 0,
"values": [ 0.2 ]
}
tracks/4/type = "value"
tracks/4/path = NodePath(".:collision_layer")
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": [ 32 ]
}
[sub_resource type="Animation" id=65]
resource_name = "electricity"
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:material:shader_param/arc_color")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 4.8, 5, 9.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 0.929412, 0, 0 ), Color( 1, 0.929412, 0, 0 ), Color( 1, 0.93, 0, 1 ), Color( 1, 0.93, 0, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:material:shader_param/gamma")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 4.6, 4.8, 9.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 1.0, 1.0, 2.0, 2.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:material:shader_param/flash_intensity")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 4.6, 4.8, 9.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 0.0, 0.2, 0.2 ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:collision_layer")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 4.8, 5, 9.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 1, 1, 33, 1 ]
}
[node name="Map2" type="Node2D" groups=["map"]]
pause_mode = 1
script = ExtResource( 11 )
@ -127,14 +254,12 @@ position = Vector2( 48, 120 )
[node name="AnimatedSprite" parent="RollingFiend" index="0"]
visible = false
frame = 1
[node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"]
material = SubResource( 4 )
position = Vector2( 4, 4 )
z_index = -3
frames = SubResource( 5 )
frame = 1
playing = true
[node name="Steam" parent="." instance=ExtResource( 23 )]
@ -156,20 +281,24 @@ turn_time = inf
[node name="TurretBullet" parent="." instance=ExtResource( 26 )]
position = Vector2( 152, 72 )
[node name="LabTiles" type="TileMap" parent="." groups=["death"]]
material = SubResource( 10 )
tile_set = ExtResource( 9 )
cell_size = Vector2( 8, 8 )
collision_layer = 32
collision_mask = 0
format = 1
tile_data = PoolIntArray( 196623, 1, 1, 196624, 1, 2, 196625, 1, 2, 196626, 1, 3, 262159, 1, 65537, 262160, 1, 65538, 262161, 1, 65538, 262162, 1, 65539, 327695, 1, 131073, 327696, 1, 131074, 327697, 1, 131074, 327698, 1, 131075, 393237, 0, 1, 393238, 0, 2, 393239, 0, 2, 393240, 0, 2, 393241, 0, 3, 458775, 0, 1, 458776, 0, 2, 458777, 0, 2, 458778, 0, 2, 458779, 0, 3, 524308, 0, 1, 524309, 0, 2, 524310, 0, 2, 524311, 0, 2, 524312, 0, 2, 524313, 0, 2, 524314, 0, 2, 524315, 0, 3, 589838, 2, 1, 589839, 2, 2, 589840, 2, 2, 589841, 2, 2, 589842, 2, 3, 655374, 2, 65537, 655375, 2, 65538, 655376, 2, 65538, 655377, 2, 65538, 655378, 2, 65539, 720910, 2, 65537, 720911, 2, 65538, 720912, 2, 65538, 720913, 2, 65538, 720914, 2, 65539, 786446, 2, 131073, 786447, 2, 131074, 786448, 2, 131074, 786449, 2, 131074, 786450, 2, 131075, 1114126, 0, 1, 1114127, 0, 2, 1114128, 0, 2, 1114129, 0, 3, 1245205, 2, 1, 1245206, 2, 2, 1245207, 2, 2, 1245208, 2, 3, 1310738, 2, 1, 1310739, 2, 2, 1310740, 2, 2, 1310741, 2, 65538, 1310742, 2, 65538, 1310743, 2, 65538, 1310744, 2, 65539, 1376272, 2, 196609, 1376273, 2, 196610, 1376274, 2, 131074, 1376275, 2, 131074, 1376276, 2, 131074, 1376277, 2, 131074, 1376278, 2, 131074, 1376279, 2, 131074, 1376280, 2, 131075 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="LabTiles"]
autoplay = "electricity"
playback_process_mode = 0
anims/RESET = SubResource( 64 )
anims/electricity = SubResource( 65 )
[node name="Player2" parent="." instance=ExtResource( 27 )]
position = Vector2( 112, 176 )
[node name="Squig" parent="." instance=ExtResource( 1 )]
position = Vector2( 168, 56 )
left_up_boundary = 5.0
right_down_boundary = 5.0
[node name="Turtle" parent="." instance=ExtResource( 18 )]
position = Vector2( 152, 152 )
left_up_boundary = 4.0
right_down_boundary = 4.0
spike_positions = [ -2.0, 2.0 ]
[node name="MovingPlatform" parent="." instance=ExtResource( 6 )]
position = Vector2( 96, 144 )
scale = Vector2( 2, 1 )