feat: new level lighting, two new levels, levels fully decorated

This commit is contained in:
Jakob Feldmann 2024-01-28 17:38:18 +01:00
parent ea9b5a2c5d
commit 54c4ef6aa3
64 changed files with 8411 additions and 2036 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl-sheet.png-81a0f93d52765da5deec33ed3479b007.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl-sheet.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl-sheet.png-81a0f93d52765da5deec33ed3479b007.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: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl1.png-cd48df8eda708b9f973197801c68696e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl1.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl1.png-cd48df8eda708b9f973197801c68696e.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.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl2.png-f6b7833ca90f073563e826e888db6450.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl2.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl2.png-f6b7833ca90f073563e826e888db6450.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.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl3.png-02f969cb682211992f47e569087fbed9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl3.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl3.png-02f969cb682211992f47e569087fbed9.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.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl4.png-929e020ff24cceb6fd5891ae9942ed61.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl4.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl4.png-929e020ff24cceb6fd5891ae9942ed61.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.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Spaceship-Wall-Lampsl5.png-2c0c735f6c479835eef787691210e144.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/environment/background/Spaceship-Wall-Lampsl5.png"
dest_files=[ "res://.import/Spaceship-Wall-Lampsl5.png-2c0c735f6c479835eef787691210e144.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: 6.0 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -11,7 +11,7 @@
[ext_resource path="res://src/Utilities/SceneAudio.tscn" type="PackedScene" id=9]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 12.9698, 8.9748 )
extents = Vector2( 10.4505, 13.5399 )
[sub_resource type="StreamTexture" id=62]
load_path = "res://.import/blobby-spritesheet.png-205c8efc79bec685345a637ed2dcfc9b.stex"
@ -345,12 +345,12 @@ states/wallsliding/node = SubResource( 96 )
states/wallsliding/position = Vector2( 1795.45, 770.152 )
transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "runToJump", "jumping", SubResource( 148 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ), "jumping", "idling", SubResource( 193 ), "jumping", "walking", SubResource( 194 ), "runToJump", "wallsliding", SubResource( 195 ), "jumpToFall", "idling", SubResource( 196 ), "running", "turnToRun", SubResource( 203 ), "running", "ducking", SubResource( 161 ), "falling", "landStretching", SubResource( 220 ), "landStretching", "idling", SubResource( 221 ), "landStretching", "walking", SubResource( 222 ), "jumpStretching", "jumping", SubResource( 224 ), "ducking", "jumpStretching", SubResource( 225 ), "idling", "jumpStretching", SubResource( 226 ), "walking", "jumpStretching", SubResource( 229 ) ]
start_node = "idling"
graph_offset = Vector2( 642.54, -299.431 )
graph_offset = Vector2( 947.54, 222.569 )
[sub_resource type="AnimationNodeStateMachinePlayback" id=48]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 12, 8.99662 )
extents = Vector2( 10.531, 10 )
[sub_resource type="Animation" id=17]
length = 0.001
@ -546,6 +546,18 @@ tracks/15/keys = {
"update": 0,
"values": [ 1.0 ]
}
tracks/16/type = "value"
tracks/16/path = NodePath("../Blobby3DEffects:position")
tracks/16/interp = 1
tracks/16/loop_wrap = true
tracks/16/imported = false
tracks/16/enabled = true
tracks/16/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, -9 ) ]
}
[sub_resource type="Animation" id=67]
length = 0.1
@ -1237,7 +1249,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 12, 10.525 ) ]
"values": [ Vector2( 11, 9 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -1249,7 +1261,7 @@ tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, -10.481 ) ]
"values": [ Vector2( 0, -9 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("../WallRaycasts/LeftWallRaycast/Left_Wallcast1:position")
@ -1374,7 +1386,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 12, 10.525 ) ]
"values": [ Vector2( 11, 9 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -1386,7 +1398,7 @@ tracks/4/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, -10.481 ) ]
"values": [ Vector2( 0, -9 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("../WallRaycasts/LeftWallRaycast/Left_Wallcast1:position")
@ -2240,7 +2252,7 @@ tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 12, 9.981 ) ]
"values": [ Vector2( 11, 9 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("../BlobbyBody:position")
@ -2377,7 +2389,7 @@ tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 12, 9.981 ) ]
"values": [ Vector2( 11, 9 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("../BlobbyBody:position")
@ -2584,7 +2596,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 11, 10.534 ) ]
"values": [ Vector2( 8, 8 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -2721,7 +2733,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 11, 10.534 ) ]
"values": [ Vector2( 8, 8 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -3681,7 +3693,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 10.5306, 13.5644 ) ]
"values": [ Vector2( 10.531, 10 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -3690,10 +3702,10 @@ tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"times": PoolRealArray( 0.01 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( -2.5137, -13.5066 ) ]
"values": [ Vector2( -2.514, -10 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("../WallRaycasts/LeftWallRaycast/Left_Wallcast1:position")
@ -3819,7 +3831,7 @@ tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 10.5306, 13.5644 ) ]
"values": [ Vector2( 10.531, 10 ) ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("../BlobbyBody:position")
@ -3828,10 +3840,10 @@ tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0 ),
"times": PoolRealArray( 0.01 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 2.5, -13.507 ) ]
"values": [ Vector2( 2.5, -10 ) ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("../WallRaycasts/LeftWallRaycast/Left_Wallcast1:position")
@ -3979,7 +3991,7 @@ tracks/5/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 6.01041, 15.026 ) ]
"values": [ Vector2( 6.01, 10 ) ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("../BlobbyBody:position")
@ -3991,7 +4003,7 @@ tracks/6/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( -7, -14.968 ) ]
"values": [ Vector2( -7, -10 ) ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("../BlobbySkin/CollisionPolygon2D:shape:extents")
@ -4116,7 +4128,7 @@ tracks/5/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 6.01041, 15.026 ) ]
"values": [ Vector2( 6.01, 10 ) ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("../BlobbyBody:position")
@ -4128,7 +4140,7 @@ tracks/6/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 7, -14.968 ) ]
"values": [ Vector2( 7, -10 ) ]
}
tracks/7/type = "value"
tracks/7/path = NodePath("../BlobbySkin/CollisionPolygon2D:shape:extents")
@ -4342,6 +4354,8 @@ __meta__ = {
"_edit_vertical_guides_": [ -22.4902 ]
}
[node name="SceneAudio" parent="." instance=ExtResource( 9 )]
[node name="StateLabel" type="Label" parent="."]
visible = false
show_behind_parent = true
@ -4356,24 +4370,27 @@ text = "Ihre Werbung"
align = 1
valign = 1
[node name="SceneAudio" parent="." instance=ExtResource( 9 )]
[node name="Listener2D" type="Listener2D" parent="."]
current = true
[node name="BlobbySkin" type="Area2D" parent="." groups=["player"]]
unique_name_in_owner = true
process_priority = -1
collision_mask = 254
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="BlobbySkin"]
position = Vector2( 1, -8.975 )
position = Vector2( -2.48624, -13.4786 )
scale = Vector2( 1.03, 1.04 )
shape = SubResource( 2 )
[node name="BubbleShieldViewport" type="Viewport" parent="."]
unique_name_in_owner = true
size = Vector2( 128, 128 )
own_world = true
transparent_bg = true
handle_input_locally = false
hdr = false
usage = 3
[node name="IridescenceBall" parent="BubbleShieldViewport" instance=ExtResource( 6 )]
visible = false
@ -4382,10 +4399,9 @@ visible = false
material = ExtResource( 2 )
position = Vector2( 0, -16 )
texture = SubResource( 62 )
offset = Vector2( 1, 0 )
hframes = 6
vframes = 6
frame = 6
frame = 26
__meta__ = {
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
}
@ -4394,7 +4410,6 @@ __meta__ = {
unique_name_in_owner = true
tree_root = SubResource( 47 )
anim_player = NodePath("../BlobbymationPlayer")
active = true
root_motion_track = NodePath(".")
parameters/playback = SubResource( 48 )
parameters/ducking/blend_position = 1.0
@ -4492,11 +4507,12 @@ anims/airstrafingLeft = SubResource( 183 )
[node name="Blobby3DEffects" type="Sprite" parent="."]
unique_name_in_owner = true
position = Vector2( 0, -9 )
position = Vector2( -1, -9 )
scale = Vector2( 0.48, 0.48 )
[node name="BlobbyBody" type="CollisionShape2D" parent="." groups=["player"]]
position = Vector2( 1, -8.975 )
unique_name_in_owner = true
position = Vector2( -2.514, -10 )
shape = SubResource( 1 )
[node name="WallRaycasts" type="Node2D" parent="."]
@ -4505,13 +4521,13 @@ position = Vector2( 0, -1 )
[node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"]
[node name="Left_Wallcast1" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
position = Vector2( -9.5, -10.686 )
position = Vector2( -11.5, -15 )
enabled = true
cast_to = Vector2( -5, 0 )
collision_mask = 40
[node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
position = Vector2( -9.5, -1.942 )
position = Vector2( -11.5, -7.751 )
enabled = true
cast_to = Vector2( -5, 0 )
collision_mask = 40
@ -4519,13 +4535,13 @@ collision_mask = 40
[node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"]
[node name="Right_Wallcast1" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
position = Vector2( 11.5, -10.686 )
position = Vector2( 5.5, -15.351 )
enabled = true
cast_to = Vector2( 5, 0 )
collision_mask = 40
[node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
position = Vector2( 11.5, -1.942 )
position = Vector2( 5.5, -7.751 )
enabled = true
cast_to = Vector2( 5, 0 )
collision_mask = 40
@ -4552,7 +4568,7 @@ collision_mask = 8
script = ExtResource( 3 )
[node name="JumpBufferTimer" type="Timer" parent="BlobbyStateMachine"]
wait_time = 0.1
wait_time = 0.14
one_shot = true
[node name="CrushTimer" type="Timer" parent="BlobbyStateMachine"]
@ -4576,5 +4592,5 @@ one_shot = true
[connection signal="timeout" from="BlobbyStateMachine/JumpBufferTimer" to="BlobbyStateMachine" method="_on_JumpBufferTimer_timeout"]
[connection signal="timeout" from="BlobbyStateMachine/CrushTimer" to="." method="_on_CrushTimer_timeout"]
[connection signal="timeout" from="InvincibilityTimer" to="." method="_on_InvincibilityTimer_timeout"]
[connection signal="timeout" from="PitfallTimer" to="." method="die_for_real" binds= [ -1 ]]
[connection signal="timeout" from="PitfallTimer" to="." method="_on_PitfallTimer_timeout"]
[connection signal="timeout" from="PitfallTimer" to="." method="die_for_real" binds= [ -1 ]]

View File

@ -6,6 +6,11 @@ export var offset_adapt_seconds := 1
export var offset_input_seconds := 0.618 * 2
export var alarm_light_shader: Material
export var fixed_position: bool = false
export var alarm_light_color: Color = Color("#3eff0000")
export var alarm_light_strength: float = 0.8
export var normal_light_color: Color = Color("#aaf9ff99")
export var normal_light_strength: float = 0.2
export var normal_light_radius: float = 256
onready var level_state := $"%LevelState"
onready var signal_manager := $"%SignalManager"
@ -34,6 +39,7 @@ var target_offset: Vector2 = Vector2(0, 0)
var terminal_activated: bool = false
var image = Image.new()
var texture = ImageTexture.new()
var emitters
var prev_pos: Vector2
var camera_state := "centered"
@ -52,6 +58,13 @@ var screen_right = Vector2()
# Gets the camera limits from the tilemap of the level
# Requires "TileMap" to be a sibling of blobby
func _ready():
# Emitters affect the gameendeavour light shader in the background only
emitters = get_tree().get_nodes_in_group("emitters")
$"LampAnimationPlayer".play("CloseRedLight")
for emitter in emitters:
emitter.color = normal_light_color;
emitter.strength = normal_light_strength;
emitter.radius = normal_light_radius;
_set_boundaries()
get_tree().get_root().connect("size_changed", self, "_set_boundaries")
if !fixed_position:
@ -59,15 +72,26 @@ func _ready():
image.create(128, 2, false, Image.FORMAT_RGBAH)
# TODO Test Performance
material.set_shader_param("light_data", null)
_update_lighting_shader()
_update_lighting_shader(true)
# TODO Trigger when needed
signal_manager.connect("terminal_activated", self, "_on_SignalManager_terminal_activated")
signal_manager.connect("player_died", self, "_death_cam")
func _on_SignalManager_terminal_activated(animation_number: int = 0):
for emitter in emitters:
emitter.color = alarm_light_color;
emitter.strength = alarm_light_strength;
var light_groups = get_tree().get_nodes_in_group("lights")
var lights := []
for group in light_groups:
lights.append_array(group.get_children())
for light in lights:
if "enabled" in light:
light.enabled = false
terminal_activated = true
get_node("LightAnimationPlayer").play("Pulsing")
$"LampAnimationPlayer".play("OpenRedLight")
$"LightAnimationPlayer".play("Pulsing")
#func _draw():
@ -120,7 +144,7 @@ func _physics_process(delta: float) -> void:
_adapt_to_input(player_vel, delta)
position = blobby.position
prev_pos = position
_update_lighting_shader()
_update_lighting_shader(true)
# TODO This has to be redone when the screen is resized in any way
@ -223,12 +247,14 @@ func _adapt_to_input(velocity: Vector2, delta: float) -> void:
# TODO Maybe just make background black and dont bother
func _adjust_offset(delta: float) -> bool:
var new_offset = offset
if limit_left - position.x - screen_left.x > 0.1:
if anim_player.is_playing():
var overshot_left = limit_left - position.x - screen_left.x > 0.1
var overshot_right = limit_right - position.x - screen_right.x < 0.1
if overshot_left:
if anim_player.is_playing() && !overshot_right:
anim_player.stop(true)
new_offset.x += (limit_left - position.x - screen_left.x) / 1.5
if limit_right - position.x - screen_right.x < 0.1:
if anim_player.is_playing():
if overshot_right:
if anim_player.is_playing() && !overshot_left:
anim_player.stop(true)
new_offset.x += (limit_right - position.x - screen_right.x) / 1.5
if limit_top - position.y - screen_top.y > 0.001:
@ -257,25 +283,29 @@ func _death_cam(animation_number: int = 0) -> void:
$CameraAnimationPlayer.play("deathCamJustZoom")
if animation_number == 1:
$CameraAnimationPlayer.play("deathCamLateRotation")
#$"LampAnimationPlayer".play("CloseRedLight")
#for light in lights:
# light.color = normal_light_color;
# TODO Rename to alarm lights specially
func _update_lighting_shader() -> void:
if !terminal_activated:
# Shader Idea and implementation from gameendeavour
func _update_lighting_shader(fire_once: bool = false) -> void:
if !terminal_activated && !fire_once:
return
# Props to gameendaevour
# TODO get this into a central world update management system
var lights = get_tree().get_nodes_in_group("light")
image.lock()
for i in lights.size():
var light = lights[i]
for i in emitters.size():
var light = emitters[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))
#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)
)
@ -284,7 +314,7 @@ func _update_lighting_shader() -> void:
texture.create_from_image(image)
material.set_shader_param("n_lights", lights.size())
material.set_shader_param("n_lights", emitters.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())

View File

@ -1,11 +1,11 @@
[gd_scene load_steps=58 format=2]
[gd_scene load_steps=60 format=2]
[ext_resource path="res://src/Actors/BlobbyCam.gd" type="Script" id=1]
[ext_resource path="res://assets/environment/background/starry-space-near.png" type="Texture" id=2]
[ext_resource path="res://assets/environment/background/starry-space-far.png" type="Texture" id=3]
[ext_resource path="res://assets/environment/background/starry-space-middle.png" type="Texture" id=4]
[ext_resource path="res://assets/environment/background/Spaceship-Wall.png" type="Texture" id=5]
[ext_resource path="res://assets/environment/background/Spaceship-Wall-Lampsl.png" type="Texture" id=6]
[ext_resource path="res://assets/environment/background/Spaceship-Wall-Lampsl-sheet.png" type="Texture" id=6]
[ext_resource path="res://assets/environment/decor/Robbit-Left.png" type="Texture" id=7]
[ext_resource path="res://assets/environment/decor/Robbit-Right.png" type="Texture" id=8]
[ext_resource path="res://assets/environment/decor/Ceiling-Struct.png" type="Texture" id=9]
@ -560,7 +560,7 @@ tracks/9/keys = {
[sub_resource type="Animation" id=23]
resource_name = "justRespawn"
[sub_resource type="Animation" id=11]
[sub_resource type="Animation" id=39]
resource_name = "shiftingCenter"
length = 0.6
tracks/0/type = "value"
@ -648,7 +648,7 @@ tracks/6/keys = {
"values": [ 0.2, 0.05 ]
}
[sub_resource type="Animation" id=12]
[sub_resource type="Animation" id=40]
resource_name = "shiftingLeft"
length = 0.6
tracks/0/type = "value"
@ -688,7 +688,7 @@ tracks/2/keys = {
"values": [ 0.2, 0.05 ]
}
[sub_resource type="Animation" id=13]
[sub_resource type="Animation" id=41]
resource_name = "shiftingRight"
length = 0.6
tracks/0/type = "value"
@ -728,7 +728,7 @@ tracks/2/keys = {
"values": [ 0.2, 0.05 ]
}
[sub_resource type="Animation" id=16]
[sub_resource type="Animation" id=42]
resource_name = "shiftingUp"
length = 0.6
tracks/0/type = "value"
@ -768,86 +768,48 @@ tracks/2/keys = {
"values": [ 0.2, 0.05 ]
}
[sub_resource type="Animation" id=9]
[sub_resource type="Animation" id=25]
resource_name = "CloseRedLight"
length = 0.2
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("../ParallaxBackground/ParallaxLayer4/Sprite2:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3, 4 ]
}
[sub_resource type="Animation" id=24]
resource_name = "OpenRedLight"
length = 0.2
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("../ParallaxBackground/ParallaxLayer4/Sprite2:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 4, 3, 2, 1, 0 ]
}
[sub_resource type="Animation" id=43]
resource_name = "Pulsing"
length = 3.33
loop = true
step = 0.05
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, 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]
[sub_resource type="Animation" id=44]
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 ),
"update": 0,
"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="Gradient" id=20]
interpolation_mode = 2
@ -875,7 +837,7 @@ fill = 1
fill_from = Vector2( 0.507438, 0.866468 )
fill_to = Vector2( 1, 0.994443 )
[sub_resource type="SpriteFrames" id=7]
[sub_resource type="SpriteFrames" id=45]
animations = [ {
"frames": [ ExtResource( 10 ), ExtResource( 12 ), ExtResource( 11 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 19 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 23 ) ],
"loop": true,
@ -883,7 +845,7 @@ animations = [ {
"speed": 5.0
} ]
[sub_resource type="SpriteFrames" id=8]
[sub_resource type="SpriteFrames" id=46]
animations = [ {
"frames": [ ExtResource( 36 ), ExtResource( 28 ), ExtResource( 35 ), ExtResource( 29 ), ExtResource( 26 ), ExtResource( 27 ), ExtResource( 31 ), ExtResource( 24 ), ExtResource( 33 ), ExtResource( 25 ), ExtResource( 30 ), ExtResource( 37 ), ExtResource( 32 ), ExtResource( 34 ) ],
"loop": true,
@ -892,7 +854,6 @@ animations = [ {
} ]
[node name="BlobbyCam" type="Camera2D"]
physics_interpolation_mode = 2
material = ExtResource( 38 )
z_index = 3
rotating = true
@ -914,15 +875,20 @@ anims/deathCam = SubResource( 6 )
anims/deathCamJustZoom = SubResource( 15 )
anims/deathCamLateRotation = SubResource( 14 )
anims/justRespawn = SubResource( 23 )
anims/shiftingCenter = SubResource( 11 )
anims/shiftingLeft = SubResource( 12 )
anims/shiftingRight = SubResource( 13 )
anims/shiftingUp = SubResource( 16 )
anims/shiftingCenter = SubResource( 39 )
anims/shiftingLeft = SubResource( 40 )
anims/shiftingRight = SubResource( 41 )
anims/shiftingUp = SubResource( 42 )
[node name="LampAnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../LightAnimationPlayer")
anims/CloseRedLight = SubResource( 25 )
anims/OpenRedLight = SubResource( 24 )
[node name="LightAnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../ParallaxBackground/ParallaxLayer4")
anims/Pulsing = SubResource( 9 )
anims/RESET = SubResource( 10 )
anims/Pulsing = SubResource( 43 )
anims/RESET = SubResource( 44 )
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
layer = -2
@ -956,30 +922,114 @@ material = ExtResource( 38 )
z_index = -1
texture = ExtResource( 5 )
[node name="Emitter3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
[node name="Light2" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( -154, 14 )
position = Vector2( -147, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 1, 0, 0, 0.615686 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 256
strength = 0.3
[node name="Emitter4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
[node name="Light4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 1, 14 )
position = Vector2( -162, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 1, 0, 0, 0.615686 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
strength = 0.3
[node name="Emitter5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]]
[node name="Light8" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 154, 14 )
position = Vector2( -209, -164 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 1, 0, 0, 0.615686 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 256
strength = 0.3
[node name="Light10" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( -1, -171 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 400
strength = 0.3
[node name="Light9" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 213, 160 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 300
strength = 0.3
[node name="Light11" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 0, 157 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 300
strength = 0.3
[node name="Light12" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( -254, 161 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 300
strength = 0.3
[node name="Light13" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 201, -165 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
strength = 0.3
[node name="Light3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 9, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 256
strength = 0.3
[node name="Light5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( -8, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
strength = 0.3
[node name="Light6" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 163, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
radius = 256
strength = 0.3
[node name="Light7" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["emitters"]]
visible = false
position = Vector2( 146, 14 )
texture = ExtResource( 40 )
script = ExtResource( 39 )
color = Color( 0.976471, 1, 0.6, 0.666667 )
strength = 0.3
[node name="Sprite2" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"]
material = ExtResource( 38 )
texture = ExtResource( 6 )
hframes = 5
[node name="TextureRect" type="TextureRect" parent="ParallaxBackground/ParallaxLayer4"]
anchor_left = 0.5
@ -1034,9 +1084,9 @@ z_index = -1
texture = ExtResource( 8 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
frames = SubResource( 7 )
frames = SubResource( 45 )
playing = true
[node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"]
frames = SubResource( 8 )
frames = SubResource( 46 )
playing = true

View File

@ -5,13 +5,14 @@ onready var right_src = $SlopeRaycastRight
onready var left_wrc = $WallRaycastLeft
onready var right_wrc = $WallRaycastRight
export var block_size := 16
export var speed := -120
var time = 0
var snap = Vector2.DOWN * block_size
func _ready() -> void:
velocity.x = -120
velocity.x = speed
func execute_movement(delta: float) -> void:

View File

@ -192,9 +192,9 @@ extents = Vector2( 11.4286, 5.12039 )
[sub_resource type="RectangleShape2D" id=52]
extents = Vector2( 15.7143, 12.1429 )
[node name="Flyer" type="KinematicBody2D" groups=["frogfood", "harmful"]]
[node name="Flyer" type="KinematicBody2D" groups=["flying", "frogfood", "harmful"]]
collision_layer = 258
collision_mask = 25
collision_mask = 57
script = ExtResource( 2 )
vision_distance = 8.0
loose_target_seconds = 5.0
@ -257,7 +257,7 @@ cast_to = Vector2( 0, -1 )
collision_mask = 56
collide_with_areas = true
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["frogfood", "harmful"]]
[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["flying", "frogfood", "harmful"]]
position = Vector2( 0, -0.5 )
shape = SubResource( 1 )
@ -289,7 +289,7 @@ shape = SubResource( 2 )
[node name="DangerousBlockArea" type="Node2D" parent="."]
scale = Vector2( 0.7, 0.7 )
[node name="Area2D" type="Area2D" parent="DangerousBlockArea" groups=["frogfood", "harmful"]]
[node name="Area2D" type="Area2D" parent="DangerousBlockArea" groups=["flying", "frogfood", "harmful"]]
collision_layer = 2
collision_mask = 0
monitoring = false

View File

@ -62,3 +62,4 @@ func _on_FrogFreeButton_pushed() -> void:
level_state.free_a_frog(frog_number)
disconnect_rope()
is_first_signal = false

View File

@ -1,11 +1,21 @@
extends Node
onready var players: Dictionary = {}
onready var max_parallel: int = 4
func play_scene_independent(sound_name: String, bus: String = "Master", attenuation: float = 0.0,
singleton = false, start_time = 0.0, random_pitch = false, pitch = 1.0) -> void:
func play_scene_independent(
sound_name: String,
bus: String = "Master",
attenuation: float = 0.0,
singleton = false,
start_time = 0.0,
random_pitch = false,
pitch = 1.0
) -> void:
if singleton && players.has(sound_name):
return
if players.size() >= max_parallel:
return
var disposable_player
disposable_player = AudioStreamPlayer.new()
add_child(disposable_player)
@ -21,11 +31,13 @@ func play_scene_independent(sound_name: String, bus: String = "Master", attenuat
disposable_player.play(start_time)
players[sound_name] = weakref(disposable_player)
func dispose_player(player: WeakRef) -> void:
if !player.get_ref(): return
if !player.get_ref():
return
var p = player.get_ref()
var sound_name
if("audio_stream" in p.stream):
if "audio_stream" in p.stream:
sound_name = p.stream.audio_stream.resource_path
else:
sound_name = p.stream.resource_path
@ -33,14 +45,17 @@ func dispose_player(player: WeakRef) -> void:
players.erase(sound_name)
p.queue_free()
func pause_scene_independent(sound_name: String):
if players.has(sound_name) && players[sound_name].get_ref():
players[sound_name].set_stream_paused(true)
func continue_scene_independent(sound_name: String):
if players.has(sound_name) && players[sound_name].get_ref():
players[sound_name].set_stream_paused(false)
func stop_scene_independent(sound_name: String):
if players.has(sound_name) && players[sound_name].get_ref():
dispose_player(players[sound_name])

View File

@ -154,6 +154,13 @@ func set_wallet(value) -> void:
func get_wallet() -> int:
return gsr.wallet
func set_swaying_grass(value: bool) -> void:
gsr.swaying_grass = value
SaveManager.save_default()
func get_swaying_grass() -> bool:
return gsr.swaying_grass
func reinstate() -> void:
if gsr.input_map.size() <= 1:
InputMap.load_from_globals()

View File

@ -8,33 +8,40 @@ onready var signal_manager := get_tree().root.get_child(4).get_node("%SignalMana
export(String, FILE, "*.tscn") var next_scene
export(bool) var is_active
func _ready() -> void:
if(!is_active):
monitoring = false
signal_manager.connect("terminal_activated", self, "activate_portal")
else:
$portal.frame = 0
if !is_active:
monitoring = false
signal_manager.connect("terminal_activated", self, "activate_portal")
else:
$portal.frame = 0
func _get_configuration_warning() -> String:
return "The next scene property can't be empty" if not next_scene else ""
return "The next scene property can't be empty" if not next_scene else ""
func level_completion() -> void:
signal_manager.emit_signal("level_completed")
signal_manager.emit_signal("level_completed")
func activate_portal(_time: float) -> void:
$AnimationPlayer.play("activatePortal")
monitoring = true
$AnimationPlayer.play("activatePortal")
monitoring = true
func teleport() -> void:
GlobalAudio.play_scene_independent("res://assets/sounds/MAGIC_SPELL_Morphing_Synth_Harp_Scales_stereo.wav", "Music", -15)
get_tree().paused = true
anim_player.play("fade_in")
# TODO This doesn't pause the game but should
yield(anim_player, "animation_finished")
if ResourceLoader.exists(next_scene):
get_tree().change_scene(next_scene)
GlobalAudio.play_scene_independent(
"res://assets/sounds/MAGIC_SPELL_Morphing_Synth_Harp_Scales_stereo.wav", "Music", -15
)
get_tree().paused = true
anim_player.play("fade_in")
# TODO This doesn't pause the game but should
yield(anim_player, "animation_finished")
if ResourceLoader.exists(next_scene):
get_tree().change_scene(next_scene)
func _on_body_entered(_body: Node) -> void:
level_completion()
teleport()
level_completion()
teleport()

View File

@ -84,7 +84,7 @@ z_as_relative = false
collision_layer = 0
monitorable = false
script = ExtResource( 2 )
next_scene = "res://src/Levels/Level 1.tscn"
next_scene = "res://src/UserInterface/Screens/MainMenu/MainScreen.tscn"
[node name="portal" type="Sprite" parent="."]
texture = ExtResource( 1 )

View File

@ -147,6 +147,7 @@
9/z_index = 0
[node name="GlassAndRoots" type="TileMap"]
z_index = -1
tile_set = SubResource( 1 )
cell_size = Vector2( 16, 16 )
format = 1

View File

@ -1,4 +1,4 @@
[gd_resource type="TileSet" load_steps=33 format=2]
[gd_resource type="TileSet" load_steps=40 format=2]
[ext_resource path="res://assets/environment/blocks/Planting-Grounds-For-Basic.png" type="Texture" id=1]
[ext_resource path="res://assets/environment/blocks/BasicTileSet.png" type="Texture" id=2]
@ -43,6 +43,27 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=49]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=52]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=54]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=55]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=56]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=57]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=58]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=59]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="NavigationPolygon" id=21]
vertices = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
@ -339,3 +360,150 @@ outlines = [ PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) ]
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
16/z_index = 0
17/name = "Planting-Grounds-For-Basic.png 17"
17/texture = ExtResource( 1 )
17/tex_offset = Vector2( 0, 0 )
17/modulate = Color( 1, 1, 1, 1 )
17/region = Rect2( 256, 128, 16, 16 )
17/tile_mode = 0
17/occluder_offset = Vector2( 0, 0 )
17/navigation_offset = Vector2( 0, 0 )
17/shape_offset = Vector2( 0, 0 )
17/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
17/shape = SubResource( 52 )
17/shape_one_way = false
17/shape_one_way_margin = 1.0
17/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 52 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
17/z_index = 0
19/name = "Planting-Grounds-For-Basic.png 19"
19/texture = ExtResource( 1 )
19/tex_offset = Vector2( 0, 0 )
19/modulate = Color( 1, 1, 1, 1 )
19/region = Rect2( 160, 224, 16, 16 )
19/tile_mode = 0
19/occluder_offset = Vector2( 0, 0 )
19/navigation_offset = Vector2( 0, 0 )
19/shape_offset = Vector2( 0, 0 )
19/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
19/shape = SubResource( 54 )
19/shape_one_way = false
19/shape_one_way_margin = 1.0
19/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 54 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
19/z_index = 0
20/name = "Planting-Grounds-For-Basic.png 20"
20/texture = ExtResource( 1 )
20/tex_offset = Vector2( 0, 0 )
20/modulate = Color( 1, 1, 1, 1 )
20/region = Rect2( 176, 224, 16, 16 )
20/tile_mode = 0
20/occluder_offset = Vector2( 0, 0 )
20/navigation_offset = Vector2( 0, 0 )
20/shape_offset = Vector2( 0, 0 )
20/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
20/shape = SubResource( 55 )
20/shape_one_way = false
20/shape_one_way_margin = 1.0
20/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 55 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
20/z_index = 0
21/name = "Planting-Grounds-For-Basic.png 21"
21/texture = ExtResource( 1 )
21/tex_offset = Vector2( 0, 0 )
21/modulate = Color( 1, 1, 1, 1 )
21/region = Rect2( 240, 128, 16, 16 )
21/tile_mode = 0
21/occluder_offset = Vector2( 0, 0 )
21/navigation_offset = Vector2( 0, 0 )
21/shape_offset = Vector2( 0, 0 )
21/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
21/shape = SubResource( 56 )
21/shape_one_way = false
21/shape_one_way_margin = 1.0
21/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 56 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
21/z_index = 0
22/name = "Planting-Grounds-For-Basic.png 22"
22/texture = ExtResource( 1 )
22/tex_offset = Vector2( 0, 0 )
22/modulate = Color( 1, 1, 1, 1 )
22/region = Rect2( 224, 128, 16, 16 )
22/tile_mode = 0
22/occluder_offset = Vector2( 0, 0 )
22/navigation_offset = Vector2( 0, 0 )
22/shape_offset = Vector2( 0, 0 )
22/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
22/shape = SubResource( 57 )
22/shape_one_way = false
22/shape_one_way_margin = 1.0
22/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 57 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
22/z_index = 0
23/name = "Planting-Grounds-For-Basic.png 23"
23/texture = ExtResource( 1 )
23/tex_offset = Vector2( 0, 0 )
23/modulate = Color( 1, 1, 1, 1 )
23/region = Rect2( 304, 160, 16, 16 )
23/tile_mode = 0
23/occluder_offset = Vector2( 0, 0 )
23/navigation_offset = Vector2( 0, 0 )
23/shape_offset = Vector2( 0, 0 )
23/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
23/shape = SubResource( 58 )
23/shape_one_way = false
23/shape_one_way_margin = 1.0
23/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 58 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
23/z_index = 0
24/name = "Planting-Grounds-For-Basic.png 24"
24/texture = ExtResource( 1 )
24/tex_offset = Vector2( 0, 0 )
24/modulate = Color( 1, 1, 1, 1 )
24/region = Rect2( 288, 128, 16, 16 )
24/tile_mode = 0
24/occluder_offset = Vector2( 0, 0 )
24/navigation_offset = Vector2( 0, 0 )
24/shape_offset = Vector2( 0, 0 )
24/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
24/shape = SubResource( 59 )
24/shape_one_way = false
24/shape_one_way_margin = 1.0
24/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 59 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
24/z_index = 0

View File

@ -0,0 +1,54 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=1]
[ext_resource path="res://src/Environment/WorldEnvironment.tscn" type="PackedScene" id=2]
[node name="LevelLighting" type="Node2D"]
[node name="CanvasModulate" type="CanvasModulate" parent="."]
color = Color( 0.513726, 0.592157, 0.701961, 1 )
[node name="WorldEnvironment" parent="." instance=ExtResource( 2 )]
[node name="Lamps" type="Node2D" parent="." groups=["lights"]]
[node name="LightYellow" type="Light2D" parent="Lamps"]
visible = false
texture = ExtResource( 1 )
texture_scale = 0.25
color = Color( 1, 0.921569, 0, 1 )
energy = 0.4
[node name="Accents" type="Node2D" parent="." groups=["lights"]]
[node name="LightGreen" type="Light2D" parent="Accents"]
visible = false
position = Vector2( -66, 105 )
texture = ExtResource( 1 )
texture_scale = 0.1
color = Color( 0.301961, 1, 0.301961, 1 )
energy = 0.7
[node name="LightBlue" type="Light2D" parent="Accents"]
visible = false
position = Vector2( 52, 104 )
texture = ExtResource( 1 )
texture_scale = 0.1
color = Color( 0.301961, 0.301961, 1, 1 )
energy = 0.7
[node name="LightRed" type="Light2D" parent="Accents"]
visible = false
position = Vector2( 99, 104 )
texture = ExtResource( 1 )
texture_scale = 0.1
color = Color( 1, 0.301961, 0.301961, 1 )
energy = 0.7
[node name="LightPurple" type="Light2D" parent="Accents"]
visible = false
position = Vector2( 151, 105 )
texture = ExtResource( 1 )
texture_scale = 0.1
color = Color( 0.698039, 0.301961, 0.698039, 1 )
energy = 0.7

View File

@ -10,6 +10,7 @@ uniform mat4 global_transform;
uniform mat4 viewport_transform;
uniform sampler2D light_data;
uniform int n_lights = 0;
uniform vec4 dark_color : hint_color = vec4(0.,0.,0.,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;
@ -25,6 +26,10 @@ void vertex() {
world_position = (viewport_transform * (global_transform * vec4(VERTEX, 0.0, 1.0))).xy;
}
vec3 softblend_pegtop(vec3 src, vec3 dest){
return (1.-2. * dest)*(src * src) + 2.*src*dest;
}
void fragment() {
vec4 col = texture(TEXTURE, UV);
if (col.a <= 0.0){
@ -84,7 +89,7 @@ void fragment() {
}
}
COLOR = col + m_value * light_color;
COLOR = vec4(softblend_pegtop(col.rgb,dark_color.rgb) + m_value * light_color.rgb, col.a + (m_value * light_color).a);
}
}"
@ -93,6 +98,7 @@ shader = SubResource( 1 )
shader_param/global_transform = null
shader_param/viewport_transform = null
shader_param/n_lights = 0
shader_param/dark_color = Color( 0.223529, 0.12549, 0.298039, 1 )
shader_param/default_light_color = null
shader_param/light_level = 0.0
shader_param/offset_modifier = 1.0

View File

@ -0,0 +1,19 @@
[gd_scene load_steps=2 format=2]
[sub_resource type="Environment" id=38]
background_mode = 4
tonemap_mode = 4
tonemap_white = 0.6
auto_exposure_scale = 0.08
auto_exposure_max_luma = 16.0
auto_exposure_speed = 0.01
dof_blur_far_distance = 12.17
dof_blur_far_amount = 1.0
dof_blur_near_distance = 1.2
glow_intensity = 1.81
glow_hdr_threshold = 0.34
glow_hdr_scale = 1.18
adjustment_brightness = 0.95
[node name="WorldEnvironment" type="WorldEnvironment"]
environment = SubResource( 38 )

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

528
src/Levels/Level 6.tscn Normal file

File diff suppressed because one or more lines are too long

978
src/Levels/Level 7.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=19 format=2]
[gd_scene load_steps=23 format=2]
[ext_resource path="res://src/Environment/GreenHouseTiles.tres" type="TileSet" id=1]
[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=2]
@ -14,6 +14,10 @@
[ext_resource path="res://src/Environment/GlassAndRoots.tscn" type="PackedScene" id=12]
[ext_resource path="res://src/Utilities/SceneAudio.tscn" type="PackedScene" id=13]
[ext_resource path="res://src/Environment/Plants/DecorPlant.tscn" type="PackedScene" id=14]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=15]
[ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=16]
[ext_resource path="res://src/BenefitialObjects/ProtoCoin3DSprite.tscn" type="PackedScene" id=17]
[ext_resource path="res://src/Environment/WorldEnvironment.tscn" type="PackedScene" id=18]
[sub_resource type="Shader" id=15]
code = "shader_type canvas_item;
@ -86,6 +90,7 @@ __meta__ = {
"_edit_horizontal_guides_": [ 464.0 ],
"_edit_vertical_guides_": [ 2880.0 ]
}
level_music = "res://assets/music/The Laboratory (LOOP).wav"
[node name="SignalManager" parent="." instance=ExtResource( 2 )]
@ -113,13 +118,66 @@ unique_name_in_owner = true
unique_name_in_owner = true
drag_margin_bottom = 0.3
[node name="Sprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer4" index="13"]
frame = 4
[node name="LevelLighting" type="Node2D" parent="."]
[node name="CanvasModulate" type="CanvasModulate" parent="LevelLighting"]
color = Color( 0.513726, 0.592157, 0.701961, 1 )
[node name="WorldEnvironment" parent="LevelLighting" instance=ExtResource( 18 )]
[node name="Lamps" type="Node2D" parent="LevelLighting" groups=["lights"]]
[node name="LightYellow" type="Light2D" parent="LevelLighting/Lamps"]
visible = false
texture = ExtResource( 15 )
texture_scale = 0.25
color = Color( 1, 0.921569, 0, 1 )
energy = 0.4
[node name="Accents" type="Node2D" parent="LevelLighting" groups=["lights"]]
[node name="LightGreen" type="Light2D" parent="LevelLighting/Accents"]
visible = false
position = Vector2( -66, 105 )
texture = ExtResource( 15 )
texture_scale = 0.1
color = Color( 0.301961, 1, 0.301961, 1 )
energy = 0.7
[node name="LightBlue" type="Light2D" parent="LevelLighting/Accents"]
visible = false
position = Vector2( 52, 104 )
texture = ExtResource( 15 )
texture_scale = 0.1
color = Color( 0.301961, 0.301961, 1, 1 )
energy = 0.7
[node name="LightRed" type="Light2D" parent="LevelLighting/Accents"]
visible = false
position = Vector2( 99, 104 )
texture = ExtResource( 15 )
texture_scale = 0.1
color = Color( 1, 0.301961, 0.301961, 1 )
energy = 0.7
[node name="LightPurple" type="Light2D" parent="LevelLighting/Accents"]
visible = false
position = Vector2( 151, 105 )
texture = ExtResource( 15 )
texture_scale = 0.1
color = Color( 0.698039, 0.301961, 0.698039, 1 )
energy = 0.7
[node name="Blobby" parent="." instance=ExtResource( 7 )]
unique_name_in_owner = true
position = Vector2( -1, 112 )
scale = Vector2( 0.878906, 0.936025 )
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 7
frame = 5
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
@ -160,6 +218,15 @@ elevator_time = 10
position = Vector2( 288, 96 )
next_scene = "res://src/Levels/Actual Level 1.tscn"
[node name="Coins" type="Node2D" parent="."]
[node name="Coin" parent="Coins" instance=ExtResource( 16 )]
[node name="ProtoCoin3DSprite" parent="Coins" instance=ExtResource( 17 )]
unique_name_in_owner = true
position = Vector2( -6, -6 )
scale = Vector2( 0.8, 0.8 )
[connection signal="body_exited" from="Blobby/BlobbySkin" to="Blobby" method="_on_BlobbySkin_body_exited"]
[editable path="SignalManager"]

View File

@ -29,7 +29,6 @@ func _ready():
func _on_Timer_timeout() -> void:
is_armed = true
$HarmfulArea.add_to_group("harmful")
$Sprite/AnimationPlayer.play("arming")
func _on_AnimationPlayer_animation_finished(anim_name: String) -> void:
@ -42,6 +41,7 @@ func _on_DetectionArea_area_exited(area: Area2D) -> void:
&& trigger_zone_entered):
$Timer.start()
trigger_zone_entered = false
$Sprite/AnimationPlayer.play("arming")
func _on_HarmfulArea_area_entered(area: Area2D) -> void:

View File

@ -74,7 +74,7 @@ radius = 6.0
[sub_resource type="CircleShape2D" id=9]
resource_local_to_scene = true
radius = 9.0
radius = 11.0
[node name="Mine" type="Node2D"]
script = ExtResource( 2 )
@ -104,7 +104,7 @@ collision_layer = 64
shape = SubResource( 9 )
[node name="Timer" type="Timer" parent="."]
wait_time = 0.1
wait_time = 0.3
one_shot = true
[connection signal="animation_finished" from="Sprite/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://src/ObstacleObjects/DangerousBlockArea.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=2]
[ext_resource path="res://assets/obstacle object/speiku/speiku16.png" type="Texture" id=23]
[sub_resource type="RectangleShape2D" id=1]
@ -18,4 +19,10 @@ texture = ExtResource( 23 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="LightOrange" type="Light2D" parent="."]
texture = ExtResource( 2 )
texture_scale = 0.1
color = Color( 1, 0.580392, 0.301961, 1 )
energy = 0.5
[editable path="DangerousBlockArea"]

View File

@ -1,9 +1,10 @@
[gd_scene load_steps=11 format=2]
[gd_scene load_steps=12 format=2]
[ext_resource path="res://assets/contraption/FlyingLaserCutterShaded.png" type="Texture" id=1]
[ext_resource path="res://src/Platforms/FlyingLaserCutter.gd" type="Script" id=2]
[ext_resource path="res://src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader" type="Shader" id=3]
[ext_resource path="res://assets/Sprite-0001.png" type="Texture" id=4]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=5]
[sub_resource type="Animation" id=2]
length = 2.4
@ -156,5 +157,12 @@ texture = ExtResource( 4 )
offset = Vector2( 2430, 4 )
region_rect = Rect2( 2106.25, 268.196, 8.5918, 0 )
[node name="LightOrange" type="Light2D" parent="FlyingLaserCutterBody"]
position = Vector2( 16, 0 )
texture = ExtResource( 5 )
texture_scale = 0.1
color = Color( 1, 0.580392, 0.301961, 1 )
energy = 0.5
[connection signal="body_entered" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_entered"]
[connection signal="body_exited" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_exited"]

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://src/Platforms/FlyingPlatform.gd" type="Script" id=1]
[ext_resource path="res://assets/contraption/5xFloatingPlatform.png" type="Texture" id=2]
[ext_resource path="res://assets/sounds/AMBIENCE_SciFi_Static_Tonal_loop_stereo.wav" type="AudioStream" id=3]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=4]
[sub_resource type="Animation" id=1]
length = 0.001
@ -86,6 +87,13 @@ position = Vector2( 0, 4 )
scale = Vector2( 4, 0.4 )
polygon = PoolVector2Array( -10, -10, 10, -10, 9.5, 0, 9.25, 5, -9.25, 5, -9.5, 0 )
[node name="LightGreen" type="Light2D" parent="PlatformBody"]
position = Vector2( 0, 15 )
texture = ExtResource( 4 )
texture_scale = 0.1
color = Color( 0.301961, 1, 0.301961, 1 )
energy = 0.5
[node name="FlyTween" type="Tween" parent="."]
[connection signal="tween_completed" from="FlyTween" to="." method="_on_FlyTween_tween_completed"]

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://src/Platforms/FlyingPlatform.gd" type="Script" id=1]
[ext_resource path="res://assets/contraption/3xFloatingPlatform.png" type="Texture" id=2]
[ext_resource path="res://assets/sounds/AMBIENCE_SciFi_Static_Tonal_loop_stereo.wav" type="AudioStream" id=3]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=4]
[sub_resource type="Animation" id=1]
length = 0.001
@ -90,6 +91,13 @@ position = Vector2( 0, 4 )
scale = Vector2( 4, 0.4 )
polygon = PoolVector2Array( -6, -10, 6, -10, 5.5, 0, 5.25, 5, -5.25, 5, -5.5, 0 )
[node name="LightGreen" type="Light2D" parent="PlatformBody"]
position = Vector2( 0, 15 )
texture = ExtResource( 4 )
texture_scale = 0.1
color = Color( 0.301961, 1, 0.301961, 1 )
energy = 0.5
[node name="FlyTween" type="Tween" parent="."]
[node name="FlyingSound" type="AudioStreamPlayer2D" parent="."]

View File

@ -41,7 +41,7 @@ resource_name = "LowPassFilter"
cutoff_hz = 3000.0
[resource]
bus/0/volume_db = -10.4576
bus/0/volume_db = -3.09804
bus/1/name = "Music"
bus/1/solo = false
bus/1/mute = false

View File

@ -44,7 +44,7 @@ func _ready():
state = states.idle
level_state.is_dead = false
set_state(states.idle)
anim_tree.active = true
# Zero Vector is false
if level_state.load_savepoint():
parent.global_position = GlobalState.get_savepoint(level_state.level_name)
@ -82,8 +82,10 @@ func _state_logic(delta):
handle_input_ref = funcref(self, "handle_wallslide_input")
_:
print("don't panik")
var texture = $"%BubbleShieldViewport".get_texture()
$"%Blobby3DEffects".texture = texture
if $"%BubbleShieldViewport/IridescenceBall".visible:
var texture = $"%BubbleShieldViewport".get_texture()
$"%Blobby3DEffects".texture = texture
$"%Blobby3DEffects".position = $"%BlobbySkin/CollisionPolygon2D".position
var direction = get_horizontal_direction()
did_turn = false
@ -150,6 +152,7 @@ func _get_transition(_delta):
# + " y vel/10:"
# + String(round(parent.velocity.y / 10))
var new_state
if parent.is_crushed() && $CrushTimer.is_stopped():
print(parent.is_crushed())
$CrushTimer.start()
@ -270,10 +273,12 @@ func _enter_state(new_state, old_state):
# TODO When the hitbox transforms from wallslide to idle, blobby hangs in the air and that triggers the wallslide on landing
if old_state != states.idle:
anim_state_playback.travel("wallsliding")
func _exit_state(old_state, new_state):
scene_audio.stop_sound()
if(scene_audio != null):
scene_audio.stop_sound()
if old_state == "run":
running_particles.emitting = false
if old_state == "fall" && new_state != "wallslide":

View File

@ -9,7 +9,7 @@
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3 )
far = 150.0
far = 5.0
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1, -0.00767937, 0, 0.00767937, 1, 0, 0, 0, 1, 0, 0, 0 )

Binary file not shown.

View File

@ -1,8 +1,10 @@
[gd_resource type="GradientTexture" load_steps=2 format=2]
[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.0816327, 0.156463, 0.238095, 0.319728, 0.414966, 0.489796, 0.591837, 0.70068, 0.809524, 0.911565, 1 )
colors = PoolColorArray( 0, 0, 0, 0, 1, 0, 0, 1, 1, 0.585938, 0, 1, 1, 0.960938, 0, 1, 0.631893, 1, 0.403573, 1, 0, 1, 0.554688, 1, 0, 0.953125, 1, 1, 0, 0.390625, 1, 1, 0.382812, 0, 1, 1, 1, 0, 0.820312, 1, 1, 0, 0, 1, 1, 0.611765, 0.611765, 0 )
interpolation_mode = 1
offsets = PoolRealArray( 0, 0.056435, 0.169305, 0.309016, 0.459738, 0.619408, 0.782519, 0.946318 )
colors = PoolColorArray( 0, 0, 0, 0, 1, 0.585938, 0, 1, 1, 0.960938, 0, 1, 0.631893, 1, 0.403573, 1, 0, 1, 0.554688, 1, 0, 0.953125, 1, 1, 0, 0.390625, 1, 1, 0.382812, 0, 1, 1 )
[resource]
gradient = SubResource( 1 )
width = 1024

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=21 format=2]
[ext_resource path="res://src/UserInterface/TutorialComboThingy.gd" type="Script" id=1]
[ext_resource path="res://assets/ui/sci-fi-godot-theme/Pixel Square 10.ttf" type="DynamicFontData" id=2]
@ -8,6 +8,7 @@
[ext_resource path="res://addons/controller_icons/assets/ps4/cross.png" type="Texture" id=6]
[ext_resource path="res://assets/sounds/vibing.wav" type="AudioStream" id=7]
[ext_resource path="res://assets/effects/noise.png" type="Texture" id=8]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=9]
[sub_resource type="Shader" id=15]
code = "shader_type canvas_item;
@ -146,6 +147,7 @@ extents = Vector2( 61, 8 )
[node name="TutorialComboThingy" type="Node2D"]
physics_interpolation_mode = 2
visible = false
z_index = 10
script = ExtResource( 1 )
goal_state = "running"
@ -275,6 +277,11 @@ stream = ExtResource( 7 )
volume_db = -17.211
bus = "UI"
[node name="Light2D" type="Light2D" parent="."]
texture = ExtResource( 9 )
texture_scale = 0.5
energy = 0.5
[connection signal="area_entered" from="Area" to="." method="_on_Area_area_entered"]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_lesson_learned"]
[connection signal="area_entered" from="StartTutorialArea" to="." method="_on_StartTutorialArea_area_entered"]

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=17 format=2]
[gd_scene load_steps=18 format=2]
[ext_resource path="res://assets/sounds/vibing.wav" type="AudioStream" id=1]
[ext_resource path="res://src/UserInterface/TutorialThingy.gd" type="Script" id=2]
[ext_resource path="res://addons/controller_icons/objects/Button.gd" type="Script" id=3]
[ext_resource path="res://assets/meta/light.png" type="Texture" id=4]
[ext_resource path="res://assets/ui/fonts/kenny_thick.tres" type="DynamicFont" id=5]
[ext_resource path="res://addons/controller_icons/assets/ps4/cross.png" type="Texture" id=6]
[ext_resource path="res://assets/effects/noise.png" type="Texture" id=8]
@ -225,6 +226,11 @@ bus = "UI"
[node name="Sprite" type="Sprite" parent="."]
[node name="Light2D" type="Light2D" parent="."]
texture = ExtResource( 4 )
texture_scale = 0.5
energy = 0.5
[connection signal="area_entered" from="Area" to="." method="_on_Area_area_entered"]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_lesson_learned"]
[connection signal="area_entered" from="StartTutorialArea" to="." method="_on_StartTutorialArea_area_entered"]

View File

@ -3,6 +3,7 @@ class_name GlobalStateResource
export(Dictionary) var progress_dict := {}
export(int) var wallet := 0
export(bool) var swaying_grass := true
export(String) var last_played_level := ""
export(Dictionary) var settings := {}
export(Dictionary) var tutorial_prompts := {}