Unoccluded lighting shader
The camera now updates a shader with the positions, strengths and colors of nodes in the light group. The sources cast light around them on the z layer they are on. They do not work for Tilemaps yet and can't be occluded. The light of different sources does not get stronger if they overlap.
This commit is contained in:
parent
69ad83369d
commit
b01b898558
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Blobby.png-554d4a075b6d3934353e2891595fdca2.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/Blobby.png"
|
|
||||||
dest_files=[ "res://.import/Blobby.png-554d4a075b6d3934353e2891595fdca2.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=false
|
|
||||||
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=false
|
|
||||||
svg/scale=1.0
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="aseprite.wizard.plugin"
|
|
||||||
type="SpriteFrames"
|
|
||||||
path="res://.import/blobby-spritesheett.aseprite-d18d1784e0bcefbf61e41d349f337576.res"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/blobby-spritesheett.aseprite"
|
|
||||||
dest_files=[ "res://.import/blobby-spritesheett.aseprite-d18d1784e0bcefbf61e41d349f337576.res" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
split_layers=false
|
|
||||||
exclude_layers_pattern=""
|
|
||||||
only_visible_layers=false
|
|
||||||
sheet_type="Packed"
|
|
||||||
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
|
||||||
texture_strip/import_texture_strip=false
|
|
||||||
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
|
||||||
texture_atlas/import_texture_atlas=false
|
|
||||||
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
|
||||||
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
|
||||||
animated_texture/import_animated_texture=false
|
|
||||||
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
|
||||||
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/blobby-spritesheett.png-31ad471e3ad73a5f4a303e582c829ff7.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/blobby-spritesheett.png"
|
|
||||||
dest_files=[ "res://.import/blobby-spritesheett.png-31ad471e3ad73a5f4a303e582c829ff7.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=false
|
|
||||||
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=false
|
|
||||||
svg/scale=1.0
|
|
||||||
@ -4588,6 +4588,7 @@ wait_time = 0.067
|
|||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="StateLabel" type="Label" parent="."]
|
[node name="StateLabel" type="Label" parent="."]
|
||||||
|
visible = false
|
||||||
show_behind_parent = true
|
show_behind_parent = true
|
||||||
margin_left = -37.0
|
margin_left = -37.0
|
||||||
margin_top = -44.0
|
margin_top = -44.0
|
||||||
|
|||||||
@ -12,6 +12,9 @@ onready var original_y_zoom = zoom.y
|
|||||||
onready var blobby = get_node("%Blobby")
|
onready var blobby = get_node("%Blobby")
|
||||||
onready var prev_camera_pos
|
onready var prev_camera_pos
|
||||||
|
|
||||||
|
var image = Image.new()
|
||||||
|
var texture = ImageTexture.new()
|
||||||
|
|
||||||
# Gets the camera limits from the tilemap of the level
|
# Gets the camera limits from the tilemap of the level
|
||||||
# Requires "TileMap" to be a sibling of blobby
|
# Requires "TileMap" to be a sibling of blobby
|
||||||
func _ready():
|
func _ready():
|
||||||
@ -19,6 +22,9 @@ func _ready():
|
|||||||
self.position = blobby.global_position
|
self.position = blobby.global_position
|
||||||
prev_camera_pos = get_camera_screen_center()
|
prev_camera_pos = get_camera_screen_center()
|
||||||
offset.x = -camera_horizontal_shift if zoom.x == original_x_zoom else 0
|
offset.x = -camera_horizontal_shift if zoom.x == original_x_zoom else 0
|
||||||
|
image.create(128, 2, false, Image.FORMAT_RGBAH)
|
||||||
|
_update_lighting_shader()
|
||||||
|
get_node("LightAnimationPlayer").play("Pulsing")
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
if(!GlobalState.is_dead):
|
if(!GlobalState.is_dead):
|
||||||
@ -28,6 +34,7 @@ func _physics_process(delta: float) -> void:
|
|||||||
else:
|
else:
|
||||||
self.position = blobby.global_position
|
self.position = blobby.global_position
|
||||||
_death_cam()
|
_death_cam()
|
||||||
|
_update_lighting_shader()
|
||||||
|
|
||||||
func _set_boundaries():
|
func _set_boundaries():
|
||||||
# This is ok, because it only happens on initialization
|
# This is ok, because it only happens on initialization
|
||||||
@ -92,5 +99,32 @@ func _adapt_to_movement():
|
|||||||
position = blobby.position
|
position = blobby.position
|
||||||
|
|
||||||
func _death_cam():
|
func _death_cam():
|
||||||
$AnimationPlayer.play("deathCam")
|
$CameraAnimationPlayer.play("deathCam")
|
||||||
#TODO Animation not always centered
|
|
||||||
|
func _update_lighting_shader():
|
||||||
|
var lights = get_tree().get_nodes_in_group("light")
|
||||||
|
image.lock()
|
||||||
|
for i in lights.size():
|
||||||
|
var light = lights[i]
|
||||||
|
# TODO To make the lighting affect all layers properly
|
||||||
|
# I would have the access the global positions of nodes in different Z layers
|
||||||
|
# without the projection to the global center layer.
|
||||||
|
|
||||||
|
# var vtrans = get_canvas_transform()
|
||||||
|
# var top_left = -vtrans.origin / vtrans.get_scale()
|
||||||
|
# var vsize = get_viewport_rect().size
|
||||||
|
# var t = Transform2D(0, (top_left + 0.5*vsize/vtrans.get_scale()).rotated(rotation))
|
||||||
|
|
||||||
|
image.set_pixel(i, 0, Color(
|
||||||
|
light.position.x, light.position.y,
|
||||||
|
light.strength, light.radius
|
||||||
|
))
|
||||||
|
image.set_pixel(i, 1, light.color)
|
||||||
|
image.unlock()
|
||||||
|
|
||||||
|
texture.create_from_image(image)
|
||||||
|
|
||||||
|
material.set_shader_param("n_lights", lights.size())
|
||||||
|
material.set_shader_param("light_data", texture)
|
||||||
|
material.set_shader_param("global_transform", get_global_transform())
|
||||||
|
material.set_shader_param("viewport_transform", get_viewport_transform())
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=42 format=2]
|
[gd_scene load_steps=47 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/Actors/Blobby/BlobbyCam.gd" type="Script" id=1]
|
[ext_resource path="res://src/Actors/Blobby/BlobbyCam.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://assets/environment/background/Asteroids-Near.png" type="Texture" id=2]
|
[ext_resource path="res://assets/environment/background/Asteroids-Near.png" type="Texture" id=2]
|
||||||
@ -37,6 +37,9 @@
|
|||||||
[ext_resource path="res://assets/environment/decor/screen/Screen3.png" type="Texture" id=35]
|
[ext_resource path="res://assets/environment/decor/screen/Screen3.png" type="Texture" id=35]
|
||||||
[ext_resource path="res://assets/environment/decor/screen/Screen1.png" type="Texture" id=36]
|
[ext_resource path="res://assets/environment/decor/screen/Screen1.png" type="Texture" id=36]
|
||||||
[ext_resource path="res://assets/environment/decor/screen/Screen12.png" type="Texture" id=37]
|
[ext_resource path="res://assets/environment/decor/screen/Screen12.png" type="Texture" id=37]
|
||||||
|
[ext_resource path="res://src/Environment/LightingShaderMaterial.tres" type="Material" id=38]
|
||||||
|
[ext_resource path="res://src/Levels/Emitter.gd" type="Script" id=39]
|
||||||
|
[ext_resource path="res://assets/blobby/idle/blobby1.png" type="Texture" id=40]
|
||||||
|
|
||||||
[sub_resource type="Animation" id=5]
|
[sub_resource type="Animation" id=5]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
@ -299,17 +302,86 @@ tracks/9/keys = {
|
|||||||
"update": 1,
|
"update": 1,
|
||||||
"values": [ false ]
|
"values": [ false ]
|
||||||
}
|
}
|
||||||
tracks/10/type = "value"
|
|
||||||
tracks/10/path = NodePath("ColorRect:visible")
|
[sub_resource type="Animation" id=9]
|
||||||
tracks/10/interp = 1
|
resource_name = "Pulsing"
|
||||||
tracks/10/loop_wrap = true
|
length = 3.33
|
||||||
tracks/10/imported = false
|
loop = true
|
||||||
tracks/10/enabled = true
|
step = 0.05
|
||||||
tracks/10/keys = {
|
tracks/0/type = "value"
|
||||||
"times": PoolRealArray( 1.6 ),
|
tracks/0/path = NodePath("Emitter3:radius")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1.65 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 128, 256 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Emitter4:radius")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1.65 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 128, 256 ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("Emitter5:radius")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 1.65 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 128, 256 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=10]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Emitter3:radius")
|
||||||
|
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 ),
|
"transitions": PoolRealArray( 1 ),
|
||||||
"update": 1,
|
"update": 0,
|
||||||
"values": [ true ]
|
"values": [ 128 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Emitter4:radius")
|
||||||
|
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": [ 128 ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("Emitter5:radius")
|
||||||
|
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": [ 128 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=7]
|
[sub_resource type="SpriteFrames" id=7]
|
||||||
@ -329,6 +401,7 @@ animations = [ {
|
|||||||
} ]
|
} ]
|
||||||
|
|
||||||
[node name="BlobbyCam" type="Camera2D"]
|
[node name="BlobbyCam" type="Camera2D"]
|
||||||
|
material = ExtResource( 38 )
|
||||||
z_index = 3
|
z_index = 3
|
||||||
rotating = true
|
rotating = true
|
||||||
current = true
|
current = true
|
||||||
@ -343,26 +416,19 @@ drag_margin_bottom = 0.0
|
|||||||
editor_draw_screen = false
|
editor_draw_screen = false
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
|
||||||
visible = false
|
|
||||||
margin_left = -320.0
|
|
||||||
margin_top = -180.0
|
|
||||||
margin_right = 320.0
|
|
||||||
margin_bottom = 178.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color( 0, 0, 0, 1 )
|
|
||||||
|
|
||||||
[node name="ShiftTween" type="Tween" parent="."]
|
[node name="ShiftTween" type="Tween" parent="."]
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="CameraAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
anims/RESET = SubResource( 5 )
|
anims/RESET = SubResource( 5 )
|
||||||
anims/deathCam = SubResource( 6 )
|
anims/deathCam = SubResource( 6 )
|
||||||
|
|
||||||
|
[node name="LightAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
root_node = NodePath("../ParallaxBackground/ParallaxLayer4")
|
||||||
|
anims/Pulsing = SubResource( 9 )
|
||||||
|
anims/RESET = SubResource( 10 )
|
||||||
|
|
||||||
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
||||||
layer = -2
|
layer = -2
|
||||||
offset = Vector2( 0, -20 )
|
|
||||||
transform = Transform2D( 1, 0, 0, 1, 0, -20 )
|
|
||||||
|
|
||||||
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
|
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||||
z_index = -1
|
z_index = -1
|
||||||
@ -392,13 +458,34 @@ texture = ExtResource( 2 )
|
|||||||
motion_scale = Vector2( 0.01, 0.01 )
|
motion_scale = Vector2( 0.01, 0.01 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
||||||
|
material = ExtResource( 38 )
|
||||||
z_index = -1
|
z_index = -1
|
||||||
texture = ExtResource( 5 )
|
texture = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="Emitter3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
position = Vector2( -154, 14 )
|
||||||
|
texture = ExtResource( 40 )
|
||||||
|
script = ExtResource( 39 )
|
||||||
|
color = Color( 1, 0, 0, 0.615686 )
|
||||||
|
|
||||||
|
[node name="Emitter4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
position = Vector2( 1, 14 )
|
||||||
|
texture = ExtResource( 40 )
|
||||||
|
script = ExtResource( 39 )
|
||||||
|
color = Color( 1, 0, 0, 0.615686 )
|
||||||
|
|
||||||
|
[node name="Emitter5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
|
||||||
|
position = Vector2( 154, 14 )
|
||||||
|
texture = ExtResource( 40 )
|
||||||
|
script = ExtResource( 39 )
|
||||||
|
color = Color( 1, 0, 0, 0.615686 )
|
||||||
|
|
||||||
[node name="Sprite2" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
[node name="Sprite2" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
|
||||||
|
material = ExtResource( 38 )
|
||||||
texture = ExtResource( 6 )
|
texture = ExtResource( 6 )
|
||||||
|
|
||||||
[node name="ParallaxLayer5" type="ParallaxLayer" parent="ParallaxBackground"]
|
[node name="ParallaxLayer5" type="ParallaxLayer" parent="ParallaxBackground"]
|
||||||
|
visible = false
|
||||||
motion_scale = Vector2( 0.05, 0.05 )
|
motion_scale = Vector2( 0.05, 0.05 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer5"]
|
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||||
@ -419,10 +506,9 @@ texture = ExtResource( 8 )
|
|||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||||
frames = SubResource( 7 )
|
frames = SubResource( 7 )
|
||||||
frame = 8
|
frame = 9
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
|
||||||
frames = SubResource( 8 )
|
frames = SubResource( 8 )
|
||||||
frame = 13
|
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
@ -1,6 +1,2 @@
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
func _ready():
|
|
||||||
# parent our emissive and occluding sprites to the EmittersAndOccluders viewport at runtime.
|
|
||||||
var emitter = $ViewPort/Emitter
|
|
||||||
var occluder = $Viewport/Occluder
|
|
||||||
|
|||||||
@ -86,4 +86,3 @@ cell_custom_transform = Transform2D( 0, 0, 0, 0, 0, 0 )
|
|||||||
collision_layer = 128
|
collision_layer = 128
|
||||||
collision_mask = 128
|
collision_mask = 128
|
||||||
format = 1
|
format = 1
|
||||||
tile_data = PoolIntArray( -65510, 1, 0, -65509, 0, 0, -65507, 2, 0 )
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/Contraptions/Platform/FlyingLaserCutter.gd" type="Script" id=1]
|
[ext_resource path="res://src/Contraptions/Platform/FlyingLaserCutter.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://src/Environment/LightingShaderMaterial.tres" type="Material" id=2]
|
||||||
|
|
||||||
[sub_resource type="StreamTexture" id=5]
|
[sub_resource type="StreamTexture" id=5]
|
||||||
load_path = "res://.import/FlyingLaserCutter.png-9cf80385a79c58041216f8c2509a5bab.stex"
|
load_path = "res://.import/FlyingLaserCutter.png-9cf80385a79c58041216f8c2509a5bab.stex"
|
||||||
@ -36,6 +37,7 @@ collision_mask = 57
|
|||||||
collision/safe_margin = 0.001
|
collision/safe_margin = 0.001
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="FlyingLaserCutterBody"]
|
[node name="Sprite" type="Sprite" parent="FlyingLaserCutterBody"]
|
||||||
|
material = ExtResource( 2 )
|
||||||
texture = SubResource( 5 )
|
texture = SubResource( 5 )
|
||||||
hframes = 5
|
hframes = 5
|
||||||
vframes = 5
|
vframes = 5
|
||||||
|
|||||||
@ -50,5 +50,5 @@ animations = [ {
|
|||||||
position = Vector2( 0, 1.5 )
|
position = Vector2( 0, 1.5 )
|
||||||
z_index = -1
|
z_index = -1
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
frame = 25
|
frame = 19
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
80
src/Environment/LightingShader.gdshader
Normal file
80
src/Environment/LightingShader.gdshader
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
shader_type canvas_item;
|
||||||
|
render_mode unshaded;
|
||||||
|
|
||||||
|
uniform mat4 global_transform;
|
||||||
|
uniform sampler2D light_data;
|
||||||
|
uniform int n_lights = 0;
|
||||||
|
uniform vec4 dark_color : hint_color = vec4(0.25, 0.0625, 0.25, 1.0);
|
||||||
|
uniform vec4 default_light_color : hint_color;
|
||||||
|
uniform float light_level : hint_range(0.0, 1.0) = 0.0;
|
||||||
|
uniform float offset_modifier : hint_range(0.0, 8.0) = 1.0;
|
||||||
|
uniform int n_light_bands : hint_range(1, 13) = 7;
|
||||||
|
uniform bool will_smooth_shade = false;
|
||||||
|
uniform float band_decay_rate : hint_range(0.0, 1.0, 0.05) = 0.5;
|
||||||
|
uniform float light_strength_modifier : hint_range(0.0, 1.0) = 1.0;
|
||||||
|
|
||||||
|
varying vec2 world_position;
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
world_position = (global_transform * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
// floor() the world_position so that it matches the native resolution
|
||||||
|
vec2 frag_position = floor(world_position);
|
||||||
|
float m_value = 0.0; // 0.0 == dark, 1.0 == light
|
||||||
|
vec4 light_color = default_light_color;
|
||||||
|
// Iterate through every light source.
|
||||||
|
for(int i = 0; i < n_lights; i++) {
|
||||||
|
// Get the data for this light source as passed in via texture
|
||||||
|
vec4 texel = texelFetch(light_data, ivec2(i, 0), 0);
|
||||||
|
|
||||||
|
// How far the light source extends
|
||||||
|
float radius = texel.a;
|
||||||
|
// How bright the light source is
|
||||||
|
float strength = texel.b;
|
||||||
|
// Distance from this pixel to the light source then normalize
|
||||||
|
float dist = distance(texel.xy, frag_position);
|
||||||
|
dist = min(dist / radius, 1.0);
|
||||||
|
|
||||||
|
// offset so that light source doesn't fade immediately
|
||||||
|
dist = max((dist * offset_modifier) - (offset_modifier - 1.0), 0.0);
|
||||||
|
|
||||||
|
float value = 0.0;
|
||||||
|
if(will_smooth_shade) {
|
||||||
|
value = (1.0 - dist) * strength * light_strength_modifier;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// decay offset so that max value == 1.0
|
||||||
|
float offset = pow(band_decay_rate, float(n_light_bands));
|
||||||
|
for(int p = 0; p < n_light_bands; p++) {
|
||||||
|
// Get max radius for this light band
|
||||||
|
float radius_check = 1.0 - pow(band_decay_rate, float(p + 1)) + offset;
|
||||||
|
// if pixel is less than the band's radius, then it's in the pth band
|
||||||
|
if(dist < radius_check) {
|
||||||
|
// Set it's value to the position of the band before this one
|
||||||
|
value = (pow(band_decay_rate, float(p)) - offset)
|
||||||
|
* strength * light_strength_modifier;
|
||||||
|
// Nearest band was found, so break the loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
value = clamp(value, 0.0, 1.0);
|
||||||
|
if(value > m_value) {
|
||||||
|
m_value = value;
|
||||||
|
light_color = texelFetch(light_data, ivec2(i, 1), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// mix darkness with light based on light level
|
||||||
|
vec4 ambient_color = mix(dark_color, light_color, m_value);
|
||||||
|
// apply global light level
|
||||||
|
ambient_color.a *= 1.0 - light_level;
|
||||||
|
// get screen color for this pixel
|
||||||
|
vec4 screen_color = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||||
|
|
||||||
|
// apply multiply blend mode
|
||||||
|
COLOR = screen_color * ambient_color;
|
||||||
|
|
||||||
|
}
|
||||||
97
src/Environment/LightingShaderMaterial.tres
Normal file
97
src/Environment/LightingShaderMaterial.tres
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
[gd_resource type="ShaderMaterial" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id=1]
|
||||||
|
code = "shader_type canvas_item;
|
||||||
|
render_mode unshaded;
|
||||||
|
|
||||||
|
uniform sampler2D noise_img;
|
||||||
|
|
||||||
|
uniform mat4 global_transform;
|
||||||
|
uniform mat4 viewport_transform;
|
||||||
|
uniform sampler2D light_data;
|
||||||
|
uniform int n_lights = 0;
|
||||||
|
uniform vec4 default_light_color : hint_color;
|
||||||
|
uniform float light_level : hint_range(0.0, 1.0) = 0.0;
|
||||||
|
uniform float offset_modifier : hint_range(0.0, 8.0) = 1.0;
|
||||||
|
uniform int n_light_bands : hint_range(1, 13) = 7;
|
||||||
|
uniform bool will_smooth_shade = false;
|
||||||
|
uniform float band_decay_rate : hint_range(0.0, 1.0, 0.05) = 0.5;
|
||||||
|
uniform float light_strength_modifier : hint_range(0.0, 1.0) = 1.0;
|
||||||
|
|
||||||
|
varying vec2 world_position;
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
world_position = (viewport_transform * (global_transform * vec4(VERTEX, 0.0, 1.0))).xy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 col = texture(TEXTURE, UV);
|
||||||
|
if (col.a <= 0.0){
|
||||||
|
COLOR = col;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// floor() the world_position so that it matches the native resolution
|
||||||
|
vec2 frag_position = floor(world_position);
|
||||||
|
float m_value = 0.0; // 0.0 == dark, 1.0 == light
|
||||||
|
vec4 light_color = default_light_color;
|
||||||
|
// Iterate through every light source.
|
||||||
|
for(int i = 0; i < n_lights; i++) {
|
||||||
|
// Get the data for this light source as passed in via texture
|
||||||
|
vec4 texel = texelFetch(light_data, ivec2(i, 0), 0);
|
||||||
|
vec2 texel_pos = (viewport_transform * (global_transform * vec4(texel.xy, 0.0, 1.0))).xy;
|
||||||
|
vec2 texel_pos2 = texel.xy;
|
||||||
|
|
||||||
|
// How far the light source extends
|
||||||
|
float radius = texel.a;
|
||||||
|
// How bright the light source is
|
||||||
|
float strength = texel.b;
|
||||||
|
// Distance from this pixel to the light source then normalize
|
||||||
|
float dist = distance(texel_pos, frag_position);
|
||||||
|
dist = min(dist / radius, 1.0);
|
||||||
|
|
||||||
|
// offset so that light source doesn't fade immediately
|
||||||
|
dist = max((dist * offset_modifier) - (offset_modifier - 1.0), 0.0);
|
||||||
|
|
||||||
|
float value = 0.0;
|
||||||
|
if(will_smooth_shade) {
|
||||||
|
value = (1.0 - dist) * strength * light_strength_modifier + value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// decay offset so that max value == 1.0
|
||||||
|
float offset = pow(band_decay_rate, float(n_light_bands));
|
||||||
|
for(int p = 0; p < n_light_bands; p++) {
|
||||||
|
// Get max radius for this light band
|
||||||
|
float radius_check = 1.0 - pow(band_decay_rate, float(p + 1)) + offset;
|
||||||
|
// if pixel is less than the band's radius, then it's in the pth band
|
||||||
|
if(dist < radius_check) {
|
||||||
|
// Set it's value to the position of the band before this one
|
||||||
|
value = (pow(band_decay_rate, float(p)) - offset)
|
||||||
|
* strength * light_strength_modifier;
|
||||||
|
// Nearest band was found, so break the loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
value = clamp(value, 0.0, 1.0);
|
||||||
|
if(value > m_value) {
|
||||||
|
m_value = value;
|
||||||
|
light_color = texelFetch(light_data, ivec2(i, 1), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
COLOR = col + m_value * light_color;
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
shader = SubResource( 1 )
|
||||||
|
shader_param/global_transform = null
|
||||||
|
shader_param/viewport_transform = null
|
||||||
|
shader_param/n_lights = 0
|
||||||
|
shader_param/default_light_color = Color( 1, 0.94902, 0.74902, 1 )
|
||||||
|
shader_param/light_level = 0.0
|
||||||
|
shader_param/offset_modifier = 0.48
|
||||||
|
shader_param/n_light_bands = 13
|
||||||
|
shader_param/will_smooth_shade = true
|
||||||
|
shader_param/band_decay_rate = 0.5
|
||||||
|
shader_param/light_strength_modifier = 1.0
|
||||||
File diff suppressed because one or more lines are too long
@ -79,6 +79,12 @@ wait_time = 20.0
|
|||||||
|
|
||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 12 )]
|
||||||
|
|
||||||
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
|
frame = 10
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
|
frame = 1
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2( 36, -24 )
|
position = Vector2( 36, -24 )
|
||||||
|
|||||||
7
src/Levels/Emitter.gd
Normal file
7
src/Levels/Emitter.gd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
extends Sprite
|
||||||
|
|
||||||
|
|
||||||
|
export var color := Color("#f31333")
|
||||||
|
export var radius := 128
|
||||||
|
export (float, 0.0, 1.0, 0.05) var strength := 1.0
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=14 format=2]
|
[gd_scene load_steps=13 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=1]
|
[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=2]
|
[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=2]
|
||||||
@ -6,7 +6,6 @@
|
|||||||
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=5]
|
||||||
[ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=6]
|
[ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=6]
|
||||||
[ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=7]
|
|
||||||
[ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=8]
|
[ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=8]
|
||||||
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9]
|
||||||
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=10]
|
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=10]
|
||||||
@ -32,6 +31,16 @@ margin_top = 0.456848
|
|||||||
margin_right = 3.15375
|
margin_right = 3.15375
|
||||||
margin_bottom = 0.456848
|
margin_bottom = 0.456848
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = ExtResource( 2 )
|
||||||
|
cell_size = Vector2( 24, 24 )
|
||||||
|
cell_quadrant_size = 3
|
||||||
|
cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 )
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 8
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 0, -1610612732, 0, 260, -1073741820, 0, 65536, -1610612732, 0, 65796, -1073741820, 0, 131072, -1610612732, 0, 131332, -1073741820, 0, 196608, -1610612732, 0, 196638, -1073741822, 0, 196868, -1073741820, 0, 327678, -1610612734, 0, 262144, -1610612732, 0, 262174, -1073741822, 0, 262404, -1073741820, 0, 393214, -1610612734, 0, 327680, -1610612732, 0, 327710, -1073741822, 0, 327940, -1073741820, 0, 458750, -1610612734, 0, 393216, -1610612732, 0, 393246, -1073741822, 0, 393476, -1073741820, 0, 524286, -1610612734, 0, 458752, -1610612732, 0, 458782, -1073741822, 0, 459012, -1073741820, 0, 589822, -1610612734, 0, 524288, -1610612732, 0, 524318, -1073741822, 0, 524548, -1073741820, 0, 655358, -1610612734, 0, 589824, -1610612732, 0, 589854, -1073741822, 0, 590084, -1073741820, 0, 720894, -1610612734, 0, 655360, -1610612732, 0, 655390, -1073741822, 0, 655620, -1073741820, 0, 786430, -1610612734, 0, 720896, -1610612732, 0, 720926, -1073741822, 0, 721156, -1073741820, 0, 851966, -1610612734, 0, 786432, -1610612732, 0, 786462, -1073741822, 0, 786692, -1073741820, 0, 917502, -1610612734, 0, 851968, -1610612732, 0, 851998, -1073741822, 0, 852228, -1073741820, 0, 983038, 3, 0, 983039, 2, 0, 917504, 2, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 2, 0, 917511, 2, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917517, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, 2, 0, 917526, 2, 0, 917527, 2, 0, 917528, 2, 0, 917529, 2, 0, 917530, 2, 0, 917531, 2, 0, 917532, 2, 0, 917533, 2, 0, 917534, -1073741821, 0, 917535, 4, 0, 917536, 4, 0, 917538, 4, 0, 917539, 4, 0, 917540, 4, 0, 917541, 4, 0, 917542, 4, 0, 917543, 4, 0, 917544, 4, 0, 917545, 4, 0, 917546, 4, 0, 917547, 4, 0, 917548, 4, 0, 917549, 4, 0, 917550, 4, 0, 917551, 4, 0, 917552, 4, 0, 917553, 4, 0, 917554, 4, 0, 917555, 4, 0, 917556, 4, 0, 917557, 4, 0, 917558, 4, 0, 917559, 4, 0, 917560, 4, 0, 917561, 4, 0, 917562, 4, 0, 917563, 4, 0, 917564, 4, 0, 917565, 4, 0, 917566, 4, 0, 917567, 4, 0, 917568, 4, 0, 917569, 4, 0, 917570, 4, 0, 917571, 4, 0, 917572, 4, 0, 917573, 4, 0, 917574, 4, 0, 917575, 4, 0, 917576, 4, 0, 917577, 4, 0, 917578, 4, 0, 917579, 4, 0, 917580, 4, 0, 917581, 4, 0, 917582, 4, 0, 917583, 4, 0, 917584, 4, 0, 917585, 4, 0, 917586, 4, 0, 917587, 4, 0, 917588, 4, 0, 917589, 4, 0, 917590, 4, 0, 917591, 4, 0, 917592, 4, 0, 917593, 4, 0, 917594, 4, 0, 917595, 4, 0, 917596, 4, 0, 917597, 4, 0, 917598, 4, 0, 917599, 4, 0, 917600, 4, 0, 917601, 4, 0, 917602, 4, 0, 917603, 4, 0, 917604, 4, 0, 917605, 4, 0, 917606, 4, 0, 917607, 4, 0, 917608, 4, 0, 917609, 4, 0, 917610, 4, 0, 917611, 4, 0, 917612, 4, 0, 917613, 4, 0, 917614, 4, 0, 917615, 4, 0, 917616, 4, 0, 917617, 4, 0, 917618, 4, 0, 917619, 4, 0, 917620, 4, 0, 917621, 4, 0, 917622, 4, 0, 917623, 4, 0, 917624, 4, 0, 917625, 4, 0, 917626, 4, 0, 917627, 4, 0, 917628, 4, 0, 917629, 4, 0, 917630, 4, 0, 917631, 4, 0, 917632, 4, 0, 917633, 4, 0, 917634, 4, 0, 917635, 4, 0, 917636, 4, 0, 917637, 4, 0, 917638, 4, 0, 917639, 4, 0, 917640, 4, 0, 917641, 4, 0, 917642, 4, 0, 917643, 4, 0, 917644, 4, 0, 917645, 4, 0, 917646, 4, 0, 917647, 4, 0, 917648, 4, 0, 917649, 4, 0, 917650, 4, 0, 917651, 4, 0, 917652, 4, 0, 917653, 4, 0, 917654, 4, 0, 917655, 4, 0, 917656, 4, 0, 917657, 4, 0, 917658, 4, 0, 917659, 4, 0, 917660, 4, 0, 917661, 4, 0, 917662, 4, 0, 917663, 4, 0, 917664, 4, 0, 917665, 4, 0, 917666, 4, 0, 917667, 4, 0, 917668, 4, 0, 917669, 4, 0, 917670, 4, 0, 917671, 4, 0, 917672, 4, 0, 917673, 4, 0, 917674, 4, 0, 917675, 4, 0, 917676, 4, 0, 917677, 4, 0, 917678, 4, 0, 917679, 4, 0, 917680, 4, 0, 917681, 4, 0, 917682, 4, 0, 917683, 4, 0, 917684, 4, 0, 917685, 4, 0, 917686, 4, 0, 917687, 4, 0, 917688, 4, 0, 917689, 4, 0, 917690, 4, 0, 917691, 4, 0, 917692, 4, 0, 917693, 4, 0, 917694, 4, 0, 917695, 4, 0, 917696, 4, 0, 917697, 4, 0, 917698, 4, 0, 917699, 4, 0, 917700, 4, 0, 917701, 4, 0, 917702, 4, 0, 917703, 4, 0, 917704, 4, 0, 917705, 4, 0, 917706, 4, 0, 917707, 4, 0, 917708, 4, 0, 917709, 4, 0, 917710, 4, 0, 917711, 4, 0, 917712, 4, 0, 917713, 4, 0, 917714, 4, 0, 917715, 4, 0, 917716, 4, 0, 917717, 4, 0, 917718, 4, 0, 917719, 4, 0, 917720, 4, 0, 917721, 4, 0, 917722, 4, 0, 917723, 4, 0, 917724, 4, 0, 917725, 4, 0, 917726, 4, 0, 917727, 4, 0, 917728, 4, 0, 917729, 4, 0, 917730, 4, 0, 917731, 4, 0, 917732, 4, 0, 917733, 4, 0, 917734, 4, 0, 917735, 4, 0, 917736, 4, 0, 917737, 4, 0, 917738, 4, 0, 917739, 4, 0, 917740, 4, 0, 917741, 4, 0, 917742, 4, 0, 917743, 4, 0, 917744, 4, 0, 917745, 4, 0, 917746, 4, 0, 917747, 4, 0, 917748, 4, 0, 917749, 4, 0, 917750, 4, 0, 917751, 4, 0, 917752, 4, 0, 917753, 4, 0, 917754, 4, 0, 917755, 4, 0, 917756, 4, 0, 917757, 4, 0, 917758, 4, 0, 917759, 4, 0, 917760, 4, 0, 917761, 4, 0, 917762, 4, 0, 917763, 4, 0, 917764, 4, 0 )
|
||||||
|
|
||||||
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
[node name="BlobbyCam" parent="." instance=ExtResource( 11 )]
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 4 )]
|
[node name="Blobby" parent="." instance=ExtResource( 4 )]
|
||||||
@ -42,6 +51,9 @@ scale = Vector2( 0.878906, 0.936025 )
|
|||||||
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||||
parameters/playback = SubResource( 4 )
|
parameters/playback = SubResource( 4 )
|
||||||
|
|
||||||
|
[node name="WhatAreFrog" parent="." instance=ExtResource( 12 )]
|
||||||
|
position = Vector2( 622, 323 )
|
||||||
|
|
||||||
[node name="Collectibles" type="Node2D" parent="."]
|
[node name="Collectibles" type="Node2D" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
@ -75,16 +87,6 @@ position = Vector2( 696, -48 )
|
|||||||
scale = Vector2( 0.133, 0.133 )
|
scale = Vector2( 0.133, 0.133 )
|
||||||
scoreValue = null
|
scoreValue = null
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
|
||||||
tile_set = ExtResource( 2 )
|
|
||||||
cell_size = Vector2( 24, 24 )
|
|
||||||
cell_quadrant_size = 3
|
|
||||||
cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 )
|
|
||||||
collision_layer = 8
|
|
||||||
collision_mask = 8
|
|
||||||
format = 1
|
|
||||||
tile_data = PoolIntArray( 0, -1610612732, 0, 260, -1073741820, 0, 65536, -1610612732, 0, 65569, 2, 0, 65796, -1073741820, 0, 131072, -1610612732, 0, 131105, 2, 0, 131332, -1073741820, 0, 196608, -1610612732, 0, 196641, 2, 0, 196868, -1073741820, 0, 262144, -1610612732, 0, 262177, 2, 0, 262404, -1073741820, 0, 327680, -1610612732, 0, 327713, 2, 0, 327940, -1073741820, 0, 393216, -1610612732, 0, 393249, 2, 0, 393476, -1073741820, 0, 458752, -1610612732, 0, 458785, 2, 0, 459012, -1073741820, 0, 524288, -1610612732, 0, 524321, 2, 0, 524548, -1073741820, 0, 589824, -1610612732, 0, 589857, 2, 0, 590084, -1073741820, 0, 655360, -1610612732, 0, 655393, 2, 0, 655620, -1073741820, 0, 720896, -1610612732, 0, 720929, 2, 0, 721156, -1073741820, 0, 786432, -1610612732, 0, 786465, 2, 0, 786692, -1073741820, 0, 851968, -1610612732, 0, 852001, 2, 0, 852228, -1073741820, 0, 917504, 2, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 2, 0, 917511, 2, 0, 917512, 2, 0, 917513, 4, 0, 917514, 4, 0, 917515, 4, 0, 917516, 4, 0, 917517, 4, 0, 917518, 4, 0, 917519, 4, 0, 917520, 4, 0, 917521, 4, 0, 917522, 4, 0, 917523, 4, 0, 917524, 4, 0, 917525, 4, 0, 917526, 4, 0, 917527, 4, 0, 917528, 4, 0, 917529, 4, 0, 917530, 4, 0, 917531, 4, 0, 917532, 4, 0, 917533, 4, 0, 917534, 4, 0, 917535, 4, 0, 917536, 4, 0, 917537, 4, 0, 917538, 4, 0, 917539, 4, 0, 917540, 4, 0, 917541, 4, 0, 917542, 4, 0, 917543, 4, 0, 917544, 4, 0, 917545, 4, 0, 917546, 4, 0, 917547, 4, 0, 917548, 4, 0, 917549, 4, 0, 917550, 4, 0, 917551, 4, 0, 917552, 4, 0, 917553, 4, 0, 917554, 4, 0, 917555, 4, 0, 917556, 4, 0, 917557, 4, 0, 917558, 4, 0, 917559, 4, 0, 917560, 4, 0, 917561, 4, 0, 917562, 4, 0, 917563, 4, 0, 917564, 4, 0, 917565, 4, 0, 917566, 4, 0, 917567, 4, 0, 917568, 4, 0, 917569, 4, 0, 917570, 4, 0, 917571, 4, 0, 917572, 4, 0, 917573, 4, 0, 917574, 4, 0, 917575, 4, 0, 917576, 4, 0, 917577, 4, 0, 917578, 4, 0, 917579, 4, 0, 917580, 4, 0, 917581, 4, 0, 917582, 4, 0, 917583, 4, 0, 917584, 4, 0, 917585, 4, 0, 917586, 4, 0, 917587, 4, 0, 917588, 4, 0, 917589, 4, 0, 917590, 4, 0, 917591, 4, 0, 917592, 4, 0, 917593, 4, 0, 917594, 4, 0, 917595, 4, 0, 917596, 4, 0, 917597, 4, 0, 917598, 4, 0, 917599, 4, 0, 917600, 4, 0, 917601, 4, 0, 917602, 4, 0, 917603, 4, 0, 917604, 4, 0, 917605, 4, 0, 917606, 4, 0, 917607, 4, 0, 917608, 4, 0, 917609, 4, 0, 917610, 4, 0, 917611, 4, 0, 917612, 4, 0, 917613, 4, 0, 917614, 4, 0, 917615, 4, 0, 917616, 4, 0, 917617, 4, 0, 917618, 4, 0, 917619, 4, 0, 917620, 4, 0, 917621, 4, 0, 917622, 4, 0, 917623, 4, 0, 917624, 4, 0, 917625, 4, 0, 917626, 4, 0, 917627, 4, 0, 917628, 4, 0, 917629, 4, 0, 917630, 4, 0, 917631, 4, 0, 917632, 4, 0, 917633, 4, 0, 917634, 4, 0, 917635, 4, 0, 917636, 4, 0, 917637, 4, 0, 917638, 4, 0, 917639, 4, 0, 917640, 4, 0, 917641, 4, 0, 917642, 4, 0, 917643, 4, 0, 917644, 4, 0, 917645, 4, 0, 917646, 4, 0, 917647, 4, 0, 917648, 4, 0, 917649, 4, 0, 917650, 4, 0, 917651, 4, 0, 917652, 4, 0, 917653, 4, 0, 917654, 4, 0, 917655, 4, 0, 917656, 4, 0, 917657, 4, 0, 917658, 4, 0, 917659, 4, 0, 917660, 4, 0, 917661, 4, 0, 917662, 4, 0, 917663, 4, 0, 917664, 4, 0, 917665, 4, 0, 917666, 4, 0, 917667, 4, 0, 917668, 4, 0, 917669, 4, 0, 917670, 4, 0, 917671, 4, 0, 917672, 4, 0, 917673, 4, 0, 917674, 4, 0, 917675, 4, 0, 917676, 4, 0, 917677, 4, 0, 917678, 4, 0, 917679, 4, 0, 917680, 4, 0, 917681, 4, 0, 917682, 4, 0, 917683, 4, 0, 917684, 4, 0, 917685, 4, 0, 917686, 4, 0, 917687, 4, 0, 917688, 4, 0, 917689, 4, 0, 917690, 4, 0, 917691, 4, 0, 917692, 4, 0, 917693, 4, 0, 917694, 4, 0, 917695, 4, 0, 917696, 4, 0, 917697, 4, 0, 917698, 4, 0, 917699, 4, 0, 917700, 4, 0, 917701, 4, 0, 917702, 4, 0, 917703, 4, 0, 917704, 4, 0, 917705, 4, 0, 917706, 4, 0, 917707, 4, 0, 917708, 4, 0, 917709, 4, 0, 917710, 4, 0, 917711, 4, 0, 917712, 4, 0, 917713, 4, 0, 917714, 4, 0, 917715, 4, 0, 917716, 4, 0, 917717, 4, 0, 917718, 4, 0, 917719, 4, 0, 917720, 4, 0, 917721, 4, 0, 917722, 4, 0, 917723, 4, 0, 917724, 4, 0, 917725, 4, 0, 917726, 4, 0, 917727, 4, 0, 917728, 4, 0, 917729, 4, 0, 917730, 4, 0, 917731, 4, 0, 917732, 4, 0, 917733, 4, 0, 917734, 4, 0, 917735, 4, 0, 917736, 4, 0, 917737, 4, 0, 917738, 4, 0, 917739, 4, 0, 917740, 4, 0, 917741, 4, 0, 917742, 4, 0, 917743, 4, 0, 917744, 4, 0, 917745, 4, 0, 917746, 4, 0, 917747, 4, 0, 917748, 4, 0, 917749, 4, 0, 917750, 4, 0, 917751, 4, 0, 917752, 4, 0, 917753, 4, 0, 917754, 4, 0, 917755, 4, 0, 917756, 4, 0, 917757, 4, 0, 917758, 4, 0, 917759, 4, 0, 917760, 4, 0, 917761, 4, 0, 917762, 4, 0, 917763, 4, 0, 917764, 4, 0 )
|
|
||||||
|
|
||||||
[node name="TreeWhyButtons" parent="." instance=ExtResource( 8 )]
|
[node name="TreeWhyButtons" parent="." instance=ExtResource( 8 )]
|
||||||
visible = false
|
visible = false
|
||||||
position = Vector2( -108, -7 )
|
position = Vector2( -108, -7 )
|
||||||
@ -114,226 +116,6 @@ next_scene = ExtResource( 6 )
|
|||||||
[node name="GameplaySignalManager" type="Node2D" parent="."]
|
[node name="GameplaySignalManager" type="Node2D" parent="."]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="ShaderGrass" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 94.3273, 323.897 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass2" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 97.7583, 323.726 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass3" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 103.443, 323.813 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass4" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 99.556, 322.393 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass5" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 107.485, 323.87 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass6" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 104.781, 322.084 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass7" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 118.829, 323.704 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass8" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 112.732, 323.918 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass9" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 110.33, 321.607 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass10" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 122.514, 323.848 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass11" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 125.945, 323.677 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass12" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 131.629, 323.764 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass13" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 127.742, 322.345 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass14" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 135.671, 323.821 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass15" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 132.967, 322.035 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass16" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 147.015, 323.655 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass17" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 140.918, 323.869 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass18" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 138.516, 321.559 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass19" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 149.723, 323.897 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass20" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 153.154, 323.726 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass21" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 158.839, 323.813 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass22" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 154.952, 322.393 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass23" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 162.881, 323.87 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass24" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 160.177, 322.084 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass25" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 174.225, 323.704 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass26" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 168.128, 323.918 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass27" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 165.726, 321.607 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass28" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 64.794, 323.73 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass29" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 68.225, 323.559 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass30" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 73.9096, 323.646 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass31" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 70.0227, 322.227 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass32" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 77.9516, 323.703 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass33" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 75.2476, 321.917 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass34" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 89.2956, 323.538 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass35" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 83.1986, 323.751 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass36" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 80.7966, 321.441 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass37" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 39.2652, 323.564 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass38" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 42.6962, 323.393 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass39" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 48.3808, 323.48 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass40" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 44.4939, 322.06 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass41" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 52.4228, 323.537 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass42" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 49.7188, 321.751 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass43" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 63.7668, 323.371 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass44" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 57.6698, 323.585 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass45" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 55.2678, 321.274 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass46" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 17.2403, 323.73 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass47" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 20.6713, 323.559 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass48" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 26.3559, 323.646 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass49" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 22.469, 322.227 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass50" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 30.3979, 323.703 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass51" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 27.6939, 321.917 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass52" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 41.7419, 323.538 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass53" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 35.6449, 323.751 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass54" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 33.2429, 321.441 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass55" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 166.242, 323.73 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass56" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 169.673, 323.559 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass57" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 175.357, 323.646 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass58" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 171.471, 322.227 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass59" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 179.399, 323.703 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass60" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 176.695, 321.917 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="ShaderGrass61" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 190.743, 323.538 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass62" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 184.646, 323.751 )
|
|
||||||
|
|
||||||
[node name="ShaderGrass63" parent="." instance=ExtResource( 7 )]
|
|
||||||
position = Vector2( 182.244, 321.441 )
|
|
||||||
z_index = -1
|
|
||||||
|
|
||||||
[node name="WhatAreFrog" parent="." instance=ExtResource( 12 )]
|
|
||||||
position = Vector2( 622, 323 )
|
|
||||||
|
|
||||||
[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"]
|
[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"]
|
||||||
[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"]
|
[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"]
|
||||||
[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"]
|
[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"]
|
||||||
|
|||||||
@ -407,7 +407,7 @@ position = Vector2( 0, -2.52127 )
|
|||||||
scale = Vector2( 0.149428, 0.151196 )
|
scale = Vector2( 0.149428, 0.151196 )
|
||||||
frames = SubResource( 4 )
|
frames = SubResource( 4 )
|
||||||
animation = "rotate"
|
animation = "rotate"
|
||||||
frame = 176
|
frame = 243
|
||||||
playing = true
|
playing = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|||||||
@ -48,5 +48,5 @@ animations = [ {
|
|||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
frame = 9
|
frame = 19
|
||||||
playing = true
|
playing = true
|
||||||
|
|||||||
@ -54,6 +54,7 @@ color = Color( 0, 0, 0, 0 )
|
|||||||
|
|
||||||
[node name="Score" type="Label" parent="HUDOverlay"]
|
[node name="Score" type="Label" parent="HUDOverlay"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
margin_left = -96.0001
|
margin_left = -96.0001
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user