Compare commits
3 commits
d53073ad1a
...
b3db7f1ba6
| Author | SHA1 | Date | |
|---|---|---|---|
| b3db7f1ba6 | |||
| fd43faf658 | |||
| 73c65415f1 |
15 changed files with 198 additions and 16 deletions
BIN
assets/palettes/forgotten.png
Normal file
BIN
assets/palettes/forgotten.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 464 B |
40
assets/palettes/forgotten.png.import
Normal file
40
assets/palettes/forgotten.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://h5523ru86vrd"
|
||||||
|
path="res://.godot/imported/forgotten.png-16ceeb0132426814a27475a2e3efca51.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/palettes/forgotten.png"
|
||||||
|
dest_files=["res://.godot/imported/forgotten.png-16ceeb0132426814a27475a2e3efca51.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
|
@ -15,7 +15,7 @@ z_index = 1
|
||||||
collision_mask = 2
|
collision_mask = 2
|
||||||
motion_mode = 1
|
motion_mode = 1
|
||||||
script = ExtResource("1_dovo2")
|
script = ExtResource("1_dovo2")
|
||||||
max_speed = 95.0
|
max_speed = 85.0
|
||||||
|
|
||||||
[node name="PlayerStateMachine" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
|
[node name="PlayerStateMachine" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
|
||||||
script = ExtResource("2_lvxji")
|
script = ExtResource("2_lvxji")
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class_name Room extends Node2D
|
||||||
# TODO: better alternative to preloading as i add functionality?
|
# TODO: better alternative to preloading as i add functionality?
|
||||||
# https://theduriel.github.io/Godot/Do-not-use---Preload
|
# https://theduriel.github.io/Godot/Do-not-use---Preload
|
||||||
var player_scene: PackedScene = preload("uid://cqm5besqgsb7x")
|
var player_scene: PackedScene = preload("uid://cqm5besqgsb7x")
|
||||||
var initial_spawn: Vector2i = Vector2i(16,16)
|
var initial_spawn: Vector2i = Vector2i.ZERO
|
||||||
|
|
||||||
var player: Player
|
var player: Player
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://bxhyxox662buj"]
|
[gd_scene load_steps=11 format=3 uid="uid://bxhyxox662buj"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://pcl0om2k32g6" path="res://scenes/room/room.gd" id="1_8xru0"]
|
[ext_resource type="Script" uid="uid://pcl0om2k32g6" path="res://scenes/room/room.gd" id="1_8xru0"]
|
||||||
[ext_resource type="Script" uid="uid://diou146pyb0br" path="res://scenes/room/room_camera.gd" id="3_y1kpu"]
|
[ext_resource type="Script" uid="uid://diou146pyb0br" path="res://scenes/room/room_camera.gd" id="3_y1kpu"]
|
||||||
|
|
@ -7,11 +7,28 @@
|
||||||
[ext_resource type="Script" uid="uid://d2xitfobwbk20" path="res://scenes/room/states/room_playing.gd" id="5_w7vtx"]
|
[ext_resource type="Script" uid="uid://d2xitfobwbk20" path="res://scenes/room/states/room_playing.gd" id="5_w7vtx"]
|
||||||
[ext_resource type="Script" uid="uid://drnrd5xlt8imm" path="res://scenes/room/states/room_exiting.gd" id="6_7jj40"]
|
[ext_resource type="Script" uid="uid://drnrd5xlt8imm" path="res://scenes/room/states/room_exiting.gd" id="6_7jj40"]
|
||||||
[ext_resource type="Script" uid="uid://ceevyto3vbq7c" path="res://scenes/room/states/room_paused.gd" id="6_gui0a"]
|
[ext_resource type="Script" uid="uid://ceevyto3vbq7c" path="res://scenes/room/states/room_paused.gd" id="6_gui0a"]
|
||||||
|
[ext_resource type="Shader" uid="uid://bxvmsjxx0tj21" path="res://shaders/palette.gdshader" id="8_dv301"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://h5523ru86vrd" path="res://assets/palettes/forgotten.png" id="9_68b7a"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ip1yl"]
|
||||||
|
shader = ExtResource("8_dv301")
|
||||||
|
shader_parameter/palette = ExtResource("9_68b7a")
|
||||||
|
shader_parameter/palette_size = 120
|
||||||
|
|
||||||
[node name="Room" type="Node2D"]
|
[node name="Room" type="Node2D"]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
script = ExtResource("1_8xru0")
|
script = ExtResource("1_8xru0")
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
|
||||||
|
material = SubResource("ShaderMaterial_ip1yl")
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="RoomDirector" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
|
[node name="RoomDirector" type="Node" parent="." node_paths=PackedStringArray("initial_state")]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("4_vaubn")
|
script = ExtResource("4_vaubn")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
class_name RoomConfig extends Resource
|
class_name RoomConfig extends Resource
|
||||||
|
|
||||||
|
@export_group('Player')
|
||||||
|
## The initial player spawn point.
|
||||||
|
## Only used if one wasn't provided to the room beforehand.
|
||||||
|
@export var initial_spawn: Vector2i = Vector2i.ZERO
|
||||||
|
|
||||||
@export_group('Camera')
|
@export_group('Camera')
|
||||||
## Whether the camera will (initially) follow the player ot not.
|
## Whether the camera will (initially) follow the player ot not.
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,13 @@ func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void:
|
||||||
func _instantiate_player() -> Player:
|
func _instantiate_player() -> Player:
|
||||||
var p: Player = room.player_scene.instantiate()
|
var p: Player = room.player_scene.instantiate()
|
||||||
room.add_child(p)
|
room.add_child(p)
|
||||||
p.global_position = room.initial_spawn
|
if room.initial_spawn != Vector2i.ZERO:
|
||||||
|
p.global_position = room.initial_spawn
|
||||||
|
else:
|
||||||
|
assert(
|
||||||
|
room.config.initial_spawn != Vector2i.ZERO,
|
||||||
|
"invalid player initial spawn provided"
|
||||||
|
)
|
||||||
|
p.global_position = room.config.initial_spawn
|
||||||
|
|
||||||
return p
|
return p
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_t5fpq"]
|
[sub_resource type="Resource" id="Resource_t5fpq"]
|
||||||
script = ExtResource("2_06s2n")
|
script = ExtResource("2_06s2n")
|
||||||
|
initial_spawn = Vector2i(25, 40)
|
||||||
loopable = true
|
loopable = true
|
||||||
loop_size = Rect2i(0, 0, 320, 240)
|
loop_size = Rect2i(0, 0, 320, 240)
|
||||||
metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
||||||
|
|
@ -14,6 +15,58 @@ metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
||||||
config = SubResource("Resource_t5fpq")
|
config = SubResource("Resource_t5fpq")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="." index="2"]
|
[node name="Sprite2D" type="Sprite2D" parent="." index="2"]
|
||||||
|
z_index = 1
|
||||||
position = Vector2(232, 144)
|
position = Vector2(232, 144)
|
||||||
texture = ExtResource("3_06s2n")
|
texture = ExtResource("3_06s2n")
|
||||||
offset = Vector2(0, -50)
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D5" type="Sprite2D" parent="." index="3"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(232, 384)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D2" type="Sprite2D" parent="." index="4"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(-88, 144)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D3" type="Sprite2D" parent="." index="5"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(232, -104)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D8" type="Sprite2D" parent="." index="6"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(552, -104)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D9" type="Sprite2D" parent="." index="7"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(552, 384)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D6" type="Sprite2D" parent="." index="8"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(-88, 384)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D7" type="Sprite2D" parent="." index="9"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(-88, -104)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="Sprite2D4" type="Sprite2D" parent="." index="10"]
|
||||||
|
z_index = 1
|
||||||
|
position = Vector2(552, 144)
|
||||||
|
texture = ExtResource("3_06s2n")
|
||||||
|
offset = Vector2(0, -50)
|
||||||
|
|
||||||
|
[node name="ColorRect" parent="CanvasLayer" index="0"]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
|
||||||
|
|
@ -941,6 +941,7 @@ texture_region_size = Vector2i(18, 18)
|
||||||
9:9/0/terrains_peering_bit/top_right_corner = 0
|
9:9/0/terrains_peering_bit/top_right_corner = 0
|
||||||
10:9/0 = 0
|
10:9/0 = 0
|
||||||
10:9/0/z_index = 1
|
10:9/0/z_index = 1
|
||||||
|
10:9/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||||
11:9/0 = 0
|
11:9/0 = 0
|
||||||
11:9/0/z_index = 1
|
11:9/0/z_index = 1
|
||||||
11:9/0/terrain_set = 0
|
11:9/0/terrain_set = 0
|
||||||
|
|
@ -2724,6 +2725,8 @@ texture_region_size = Vector2i(18, 18)
|
||||||
11:3/0/terrains_peering_bit/top_side = 3
|
11:3/0/terrains_peering_bit/top_side = 3
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
physics_layer_0/collision_layer = 2
|
||||||
|
physics_layer_0/collision_mask = 0
|
||||||
terrain_set_0/mode = 0
|
terrain_set_0/mode = 0
|
||||||
terrain_set_0/terrain_0/name = "Auto1"
|
terrain_set_0/terrain_0/name = "Auto1"
|
||||||
terrain_set_0/terrain_0/color = Color(0.79, 0.57, 0.73, 1)
|
terrain_set_0/terrain_0/color = Color(0.79, 0.57, 0.73, 1)
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,24 @@
|
||||||
[gd_scene load_steps=6 format=4 uid="uid://04d4byo43t4b"]
|
[gd_scene load_steps=5 format=4 uid="uid://04d4byo43t4b"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bxhyxox662buj" path="res://scenes/room/room.tscn" id="1_1k8b4"]
|
[ext_resource type="PackedScene" uid="uid://bxhyxox662buj" path="res://scenes/room/room.tscn" id="1_1k8b4"]
|
||||||
[ext_resource type="Script" uid="uid://bamoq5wi0lkdy" path="res://scenes/room/room_config.gd" id="2_2qa51"]
|
[ext_resource type="Resource" uid="uid://h54yiuv2bup1" path="res://scenes/worlds/yukotsukis_room/yukotsukis_room_config.tres" id="2_vqekq"]
|
||||||
[ext_resource type="TileSet" uid="uid://chb3vsmojvo8q" path="res://scenes/worlds/yukotsukis_room/assets/curtains/curtains_godot4.tres" id="3_od2gb"]
|
[ext_resource type="TileSet" uid="uid://chb3vsmojvo8q" path="res://scenes/worlds/yukotsukis_room/assets/curtains/curtains_godot4.tres" id="3_od2gb"]
|
||||||
[ext_resource type="TileSet" uid="uid://bcpinmakhx3ix" path="res://scenes/worlds/yukotsukis_room/assets/carpets/carpets_godot4.tres" id="4_vqekq"]
|
[ext_resource type="TileSet" uid="uid://diqyujsetlsp6" path="res://scenes/worlds/yukotsukis_room/assets/floorboards/floorboards_godot4.tres" id="4_od2gb"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_r3h47"]
|
|
||||||
script = ExtResource("2_2qa51")
|
|
||||||
follow_player = false
|
|
||||||
camera_position = Vector2i(160, 120)
|
|
||||||
metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
|
||||||
|
|
||||||
[node name="Yukotsuki\'s Room" instance=ExtResource("1_1k8b4")]
|
[node name="Yukotsuki\'s Room" instance=ExtResource("1_1k8b4")]
|
||||||
config = SubResource("Resource_r3h47")
|
config = ExtResource("2_vqekq")
|
||||||
|
|
||||||
[node name="FloorLayer" type="TileMapLayer" parent="." index="2"]
|
[node name="FloorLayer" type="TileMapLayer" parent="." index="2"]
|
||||||
tile_map_data = PackedByteArray("AAAPAA4AAQALAAMAAAAPAA0AAQALAAIAAAAPAAwAAQALAA4AAAAPAAsAAQALAAYAAAAPAAoAAQALAAQAAAAOAA4AAQAJAA8AAAAOAA0AAQAJAA4AAAAOAAwAAQAJAAIAAAAOAAsAAQAJAAoAAAAOAAoAAQAKAAQAAAANAA4AAQAJAA8AAAANAA0AAQAJAA4AAAANAAwAAQAJAAYAAAANAAsAAQAJAAYAAAANAAoAAQAKAAwAAAAMAA4AAQAJAAMAAAAMAA0AAQAJAAoAAAAMAAwAAQAJAAYAAAAMAAsAAQAJAA4AAAAMAAoAAQAKAAQAAAALAA4AAQAJAAsAAAALAA0AAQAJAAYAAAALAAwAAQAJAAoAAAALAAsAAQAJAAoAAAALAAoAAQAKAAAAAAAKAA4AAQAJAA8AAAAKAA0AAQAJAAYAAAAKAAwAAQAJAAIAAAAKAAsAAQAJAAIAAAAKAAoAAQAKAAAAAAAJAA4AAQAJAAMAAAAJAA0AAQAJAAYAAAAJAAwAAQAJAAIAAAAJAAsAAQAJAAoAAAAJAAoAAQAKAAwAAAAIAA4AAQAJAAcAAAAIAA0AAQAJAA4AAAAIAAwAAQAJAAIAAAAIAAsAAQAJAAoAAAAIAAoAAQAKAAAAAAAHAA4AAQAJAA8AAAAHAA0AAQAJAAoAAAAHAAwAAQAJAAYAAAAHAAsAAQAJAAoAAAAHAAoAAQAKAAgAAAAGAA4AAQAJAAsAAAAGAA0AAQAJAAYAAAAGAAwAAQAJAAYAAAAGAAsAAQAJAAoAAAAGAAoAAQAKAAgAAAAFAA4AAQAJAA8AAAAFAA0AAQAJAAoAAAAFAAwAAQAJAAoAAAAFAAsAAQAJAAYAAAAFAAoAAQAKAAQAAAAEAA4AAQAIAAcAAAAEAA0AAQAIAAUAAAAEAAwAAQAIAAEAAAAEAAsAAQAIAAUAAAAEAAoAAQAIAAQAAAA=")
|
tile_map_data = PackedByteArray("AAAPAA4AAQALAAMAAAAPAA0AAQALAAIAAAAPAAwAAQALAA4AAAAPAAsAAQALAAYAAAAPAAoAAQALAAQAAAAOAA4AAQAJAA8AAAAOAA0AAQAJAA4AAAAOAAwAAQAJAAIAAAAOAAsAAQAJAAoAAAAOAAoAAQAKAAQAAAANAA4AAQAJAA8AAAANAA0AAQAJAA4AAAANAAwAAQAJAAYAAAANAAsAAQAJAAYAAAANAAoAAQAKAAwAAAAMAA4AAQAJAAMAAAAMAA0AAQAJAAoAAAAMAAwAAQAJAAYAAAAMAAsAAQAJAA4AAAAMAAoAAQAKAAQAAAALAA4AAQAJAAsAAAALAA0AAQAJAAYAAAALAAwAAQAJAAoAAAALAAsAAQAJAAoAAAALAAoAAQAKAAAAAAAKAA4AAQAJAA8AAAAKAA0AAQAJAAYAAAAKAAwAAQAJAAIAAAAKAAsAAQAJAAIAAAAKAAoAAQAKAAAAAAAJAA4AAQAJAAMAAAAJAA0AAQAJAAYAAAAJAAwAAQAJAAIAAAAJAAsAAQAJAAoAAAAJAAoAAQAKAAwAAAAIAA4AAQAJAAcAAAAIAA0AAQAJAA4AAAAIAAwAAQAJAAIAAAAIAAsAAQAJAAoAAAAIAAoAAQAKAAAAAAAHAA4AAQAJAA8AAAAHAA0AAQAJAAoAAAAHAAwAAQAJAAYAAAAHAAsAAQAJAAoAAAAHAAoAAQAKAAgAAAAGAA4AAQAJAAsAAAAGAA0AAQAJAAYAAAAGAAwAAQAJAAYAAAAGAAsAAQAJAAoAAAAGAAoAAQAKAAgAAAAFAA4AAQAJAA8AAAAFAA0AAQAJAAoAAAAFAAwAAQAJAAoAAAAFAAsAAQAJAAYAAAAFAAoAAQAKAAQAAAAEAA4AAQAIAAcAAAAEAA0AAQAIAAUAAAAEAAwAAQAIAAEAAAAEAAsAAQAIAAUAAAAEAAoAAQAIAAQAAAA=")
|
||||||
tile_set = ExtResource("3_od2gb")
|
tile_set = ExtResource("3_od2gb")
|
||||||
|
|
||||||
[node name="CarpetLayer" type="TileMapLayer" parent="." index="3"]
|
[node name="CarpetLayer" type="TileMapLayer" parent="." index="3"]
|
||||||
tile_map_data = PackedByteArray("AAAFAAsAAAAIAAAAAAAFAAwAAAAIAAEAAAAFAA0AAAAIAAMAAAAGAAwAAAALAAIAAAAGAAsAAAALAAAAAAAGAA0AAAALAAMAAAA=")
|
tile_map_data = PackedByteArray("AAAIAAsAAwAIAAAAAAAJAAsAAwAFAAEAAAAJAAoAAwAIAAAAAAAKAAoAAwAKAAAAAAALAAoAAwAKAAAAAAAMAAoAAwAKAAAAAAANAAoAAwALAAAAAAANAAsAAwAGAAEAAAAOAAsAAwALAAAAAAAOAAwAAwALAAMAAAANAAwAAwAGAAIAAAANAA0AAwALAAMAAAAMAA0AAwAJAAMAAAALAA0AAwAJAAMAAAAKAA0AAwAJAAMAAAAJAA0AAwAJAAMAAAAIAA0AAwAIAAMAAAAIAAwAAwAIAAEAAAAMAAsAAwAJAAIAAAAMAAwAAwAJAAIAAAALAAwAAwAJAAIAAAAKAAwAAwAJAAIAAAAJAAwAAwAJAAIAAAAKAAsAAwAJAAIAAAALAAsAAwAJAAIAAAA=")
|
||||||
tile_set = ExtResource("4_vqekq")
|
tile_set = ExtResource("4_od2gb")
|
||||||
|
|
||||||
[node name="WallLayer" type="TileMapLayer" parent="." index="4"]
|
[node name="WallLayer" type="TileMapLayer" parent="." index="4"]
|
||||||
|
tile_map_data = PackedByteArray("AAADAA4AAAAKAAkAAAADAA0AAAAKAAkAAAADAAwAAAAKAAkAAAADAAsAAAAKAAkAAAADAAoAAAAKAAkAAAADAAkAAAAKAAkAAAAEAAkAAAAKAAkAAAAFAAkAAAAKAAkAAAAGAAkAAAAKAAkAAAAHAAkAAAAKAAkAAAAIAAkAAAAKAAkAAAAJAAkAAAAKAAkAAAAKAAkAAAAKAAkAAAALAAkAAAAKAAkAAAAMAAkAAAAKAAkAAAANAAkAAAAKAAkAAAAOAAkAAAAKAAkAAAAPAAkAAAAKAAkAAAAQAAkAAAAKAAkAAAAQAAoAAAAKAAkAAAAQAAsAAAAKAAkAAAAQAAwAAAAKAAkAAAAQAA0AAAAKAAkAAAAQAA4AAAAKAAkAAAADAA8AAAAKAAkAAAAEAA8AAAAKAAkAAAAFAA8AAAAKAAkAAAAGAA8AAAAKAAkAAAAHAA8AAAAKAAkAAAAIAA8AAAAKAAkAAAAJAA8AAAAKAAkAAAAKAA8AAAAKAAkAAAALAA8AAAAKAAkAAAAMAA8AAAAKAAkAAAANAA8AAAAKAAkAAAAOAA8AAAAKAAkAAAAPAA8AAAAKAAkAAAAQAA8AAAAKAAkAAAA=")
|
||||||
|
tile_set = ExtResource("4_od2gb")
|
||||||
|
|
||||||
[node name="CurtainLayer" type="TileMapLayer" parent="." index="5"]
|
[node name="CurtainLayer" type="TileMapLayer" parent="." index="5"]
|
||||||
tile_set = ExtResource("3_od2gb")
|
tile_set = ExtResource("3_od2gb")
|
||||||
|
|
|
||||||
10
scenes/worlds/yukotsukis_room/yukotsukis_room_config.tres
Normal file
10
scenes/worlds/yukotsukis_room/yukotsukis_room_config.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[gd_resource type="Resource" script_class="RoomConfig" load_steps=2 format=3 uid="uid://h54yiuv2bup1"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bamoq5wi0lkdy" path="res://scenes/room/room_config.gd" id="1_vlksg"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_vlksg")
|
||||||
|
initial_spawn = Vector2i(85, 225)
|
||||||
|
follow_player = false
|
||||||
|
camera_position = Vector2i(160, 120)
|
||||||
|
metadata/_custom_type_script = "uid://bamoq5wi0lkdy"
|
||||||
31
shaders/outline.gdshader
Normal file
31
shaders/outline.gdshader
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform vec4 clr : source_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
uniform int type : hint_range(0, 2) = 2;
|
||||||
|
uniform float thickness = 1.0;
|
||||||
|
|
||||||
|
const vec2[8] DIRECTIONS = {
|
||||||
|
vec2(1.0, 0.0),
|
||||||
|
vec2(0.0, 1.0),
|
||||||
|
vec2(-1.0, 0.0),
|
||||||
|
vec2(0.0, -1.0),
|
||||||
|
vec2(1.0, 1.0),
|
||||||
|
vec2(-1.0, 1.0),
|
||||||
|
vec2(-1.0, -1.0),
|
||||||
|
vec2(1.0, -1.0)
|
||||||
|
};
|
||||||
|
|
||||||
|
float gtz(float input) { return max(0, sign(input)); }
|
||||||
|
// returns 1 if input > 0, else 0
|
||||||
|
|
||||||
|
float check(sampler2D tex, vec2 from, vec2 size) {
|
||||||
|
float result = 0.0;
|
||||||
|
for (int i = 0; i < 4 * type; i++) {
|
||||||
|
result += texture(tex, from + DIRECTIONS[i] * size * thickness).a;
|
||||||
|
}
|
||||||
|
return gtz(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
COLOR = mix( COLOR, clr, check(TEXTURE, UV, TEXTURE_PIXEL_SIZE) * (1.0 - gtz(COLOR.a)) );
|
||||||
|
}
|
||||||
1
shaders/outline.gdshader.uid
Normal file
1
shaders/outline.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://tydujgmoudjd
|
||||||
19
shaders/palette.gdshader
Normal file
19
shaders/palette.gdshader
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||||
|
uniform sampler2D palette : hint_default_black; // Insert a palette from lospec for instance
|
||||||
|
uniform int palette_size = 16;
|
||||||
|
|
||||||
|
void fragment(){
|
||||||
|
vec4 color = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||||
|
vec4 new_color = vec4(.0);
|
||||||
|
|
||||||
|
for (int i = 0; i < palette_size; i++) {
|
||||||
|
vec4 palette_color = texture(palette, vec2(1.0 / float(palette_size) * float(i), .0));
|
||||||
|
if (distance(palette_color, color) < distance(new_color, color)) {
|
||||||
|
new_color = palette_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
COLOR = new_color;
|
||||||
|
}
|
||||||
1
shaders/palette.gdshader.uid
Normal file
1
shaders/palette.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bxvmsjxx0tj21
|
||||||
Loading…
Add table
Reference in a new issue