feat: implement player character system with network synchronization and visual effects

This commit is contained in:
Yogi Wiguna
2026-03-30 15:36:28 +08:00
parent f08b21006b
commit f43dba73a2
5 changed files with 483 additions and 1 deletions
@@ -12,6 +12,7 @@
[ext_resource type="Texture2D" uid="uid://cjhatl26dafxx" path="res://assets/graphics/vfx/spawn_tiles_top.png" id="5_xd54h"] [ext_resource type="Texture2D" uid="uid://cjhatl26dafxx" path="res://assets/graphics/vfx/spawn_tiles_top.png" id="5_xd54h"]
[ext_resource type="Texture2D" uid="uid://dqdntrjuarixl" path="res://assets/graphics/vfx/gogo_sprite.png" id="6_jmlpd"] [ext_resource type="Texture2D" uid="uid://dqdntrjuarixl" path="res://assets/graphics/vfx/gogo_sprite.png" id="6_jmlpd"]
[ext_resource type="Texture2D" uid="uid://mnsqay5hs0jh" path="res://assets/graphics/vfx/effects/wall.png" id="6_q227o"] [ext_resource type="Texture2D" uid="uid://mnsqay5hs0jh" path="res://assets/graphics/vfx/effects/wall.png" id="6_q227o"]
[ext_resource type="Texture2D" uid="uid://c1rx6wpbgn657" path="res://assets/graphics/vfx/scatter_knock/scatter_knock.png" id="9_iiy2r"]
[sub_resource type="AtlasTexture" id="AtlasTexture_lfbm8"] [sub_resource type="AtlasTexture" id="AtlasTexture_lfbm8"]
atlas = ExtResource("1_8bjou") atlas = ExtResource("1_8bjou")
@@ -2205,6 +2206,246 @@ region = Rect2(2400, 2250, 600, 250)
atlas = ExtResource("6_jmlpd") atlas = ExtResource("6_jmlpd")
region = Rect2(3000, 2250, 600, 250) region = Rect2(3000, 2250, 600, 250)
[sub_resource type="AtlasTexture" id="AtlasTexture_7v2g6"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_r1bnt"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_0nsyh"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_qeoj0"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_jcgxn"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_bc3a1"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 0, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_i2unw"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_kxjad"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_ar5qy"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_doip7"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_7qe8f"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_vdmrq"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 360, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_tn5h4"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_5loj5"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_bgtbe"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_qablj"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_5lk76"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_d3j6o"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 720, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_pquac"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_urcxt"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_eoysu"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_rkovs"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_efqqe"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_q3bcv"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 1080, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_sutfo"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_tvkh1"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_mduwa"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_5wctr"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_xac74"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_majwi"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 1440, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_1hnr2"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_5p2jg"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8888"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_vpyip"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_hx83n"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_8mo0v"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 1800, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_amw2u"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_di6j0"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_3hspo"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_ioin8"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_uabfg"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_3gx40"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 2160, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_iytsu"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_fffu6"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_1mm8d"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_ce2a2"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_h4w0v"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_y8ksb"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 2520, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_hjx8w"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_o4mhr"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_lrmn5"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_t1umq"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_4cgy0"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_7hnng"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 2880, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_pqtgb"]
atlas = ExtResource("9_iiy2r")
region = Rect2(0, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_hdi4h"]
atlas = ExtResource("9_iiy2r")
region = Rect2(360, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_kj4i1"]
atlas = ExtResource("9_iiy2r")
region = Rect2(720, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_cpj5a"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1080, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_xa6ni"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1440, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_npc38"]
atlas = ExtResource("9_iiy2r")
region = Rect2(1800, 3240, 360, 360)
[sub_resource type="AtlasTexture" id="AtlasTexture_pj4gv"] [sub_resource type="AtlasTexture" id="AtlasTexture_pj4gv"]
atlas = ExtResource("4_8bjou") atlas = ExtResource("4_8bjou")
region = Rect2(0, 0, 125, 125) region = Rect2(0, 0, 125, 125)
@@ -5530,6 +5771,191 @@ animations = [{
}, { }, {
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_7v2g6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r1bnt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0nsyh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qeoj0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jcgxn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bc3a1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i2unw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kxjad")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ar5qy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_doip7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7qe8f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vdmrq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tn5h4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5loj5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bgtbe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qablj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5lk76")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d3j6o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pquac")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_urcxt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eoysu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rkovs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_efqqe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_q3bcv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sutfo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tvkh1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mduwa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5wctr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xac74")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_majwi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1hnr2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5p2jg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a8888")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vpyip")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hx83n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8mo0v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_amw2u")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_di6j0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3hspo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ioin8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uabfg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3gx40")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_iytsu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fffu6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1mm8d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ce2a2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h4w0v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y8ksb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hjx8w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o4mhr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lrmn5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t1umq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4cgy0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7hnng")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pqtgb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hdi4h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kj4i1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cpj5a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xa6ni")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_npc38")
}],
"loop": false,
"name": &"scatter_knock",
"speed": 30.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pj4gv") "texture": SubResource("AtlasTexture_pj4gv")
}, { }, {
"duration": 1.0, "duration": 1.0,
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1rx6wpbgn657"
path.s3tc="res://.godot/imported/scatter_knock.png-1399948bbf9b79889432d8b2de948882.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/graphics/vfx/scatter_knock/scatter_knock.png"
dest_files=["res://.godot/imported/scatter_knock.png-1399948bbf9b79889432d8b2de948882.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0
+7 -1
View File
@@ -1284,7 +1284,7 @@ func is_position_occupied(pos: Vector2i) -> bool:
if p.is_player_moving and p.target_position == pos: if p.is_player_moving and p.target_position == pos:
return true return true
# Prevent overlap with Static Tekton Stands (3x3 area) # Prevent overlap with Static Tekton Stands (3x3 area) using active nodes
if enhanced_gridmap: if enhanced_gridmap:
for stand in get_tree().get_nodes_in_group("StaticTektonStands"): for stand in get_tree().get_nodes_in_group("StaticTektonStands"):
var local_pos = enhanced_gridmap.to_local(stand.global_position) var local_pos = enhanced_gridmap.to_local(stand.global_position)
@@ -1292,6 +1292,12 @@ func is_position_occupied(pos: Vector2i) -> bool:
if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1: if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1:
return true return true
var main_node = get_tree().get_root().get_node_or_null("Main")
if main_node and "reserved_static_positions" in main_node:
for reserved in main_node.reserved_static_positions:
if abs(pos.x - reserved.x) <= 1 and abs(pos.y - reserved.y) <= 1:
return true
return false return false
func find_valid_starting_position() -> Vector2i: func find_valid_starting_position() -> Vector2i:
+9
View File
@@ -144,6 +144,15 @@ billboard = 1
sprite_frames = ExtResource("10_y4r1p") sprite_frames = ExtResource("10_y4r1p")
animation = &"wall-initiator" animation = &"wall-initiator"
[node name="scatter_knock" type="AnimatedSprite3D" parent="." unique_id=808896775]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 1.509958e-07, 0, -1.509958e-07, 0.5, 0, 1.5475016, 0.012766336)
visible = false
billboard = 1
sprite_frames = ExtResource("10_y4r1p")
animation = &"scatter_knock"
frame = 59
frame_progress = 1.0
[node name="floor_spawn_top" type="AnimatedSprite3D" parent="." unique_id=248195140] [node name="floor_spawn_top" type="AnimatedSprite3D" parent="." unique_id=248195140]
transform = Transform3D(0.5, 0, 0, 0, -0.5, -7.54979e-08, 0, 7.54979e-08, -0.5, 0, 1.4714267, 0.02553294) transform = Transform3D(0.5, 0, 0, 0, -0.5, -7.54979e-08, 0, 7.54979e-08, -0.5, 0, 1.4714267, 0.02553294)
visible = false visible = false