feat: Implement core player character setup, a centralized notification system, and special tile power-up management with inventory and cooldowns.

This commit is contained in:
Yogi Wiguna
2026-02-05 17:16:15 +08:00
parent e933773688
commit a4bd5e3c0b
13 changed files with 208 additions and 26 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://curytecrsmxtw"
path="res://.godot/imported/Char Pointer_color.png-d23f84a06dddac3351069219bb0e6aef.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/models/character_pointer/Char Pointer_color.png"
dest_files=["res://.godot/imported/Char Pointer_color.png-d23f84a06dddac3351069219bb0e6aef.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
@@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b6qng3xy4fsoq"
path="res://.godot/imported/character_pointer.glb-104658ccca94ef9661e32564ae407369.scn"
[deps]
source_file="res://assets/models/character_pointer/character_pointer.glb"
dest_files=["res://.godot/imported/character_pointer.glb-104658ccca94ef9661e32564ae407369.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1,44 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://y4l3c6305ier"
path.s3tc="res://.godot/imported/character_pointer_Char Pointer_color.png-ecfeff5fa4d20f5e85e6221eb9046651.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "100faea39b3ef8258c73d578bc87e855"
}
[deps]
source_file="res://assets/models/character_pointer/character_pointer_Char Pointer_color.png"
dest_files=["res://.godot/imported/character_pointer_Char Pointer_color.png-ecfeff5fa4d20f5e85e6221eb9046651.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
+4
View File
@@ -40,6 +40,10 @@ func _ready():
await get_tree().process_frame
_auto_start_from_lobby()
# Hide MessageBar (User Request)
if message_bar:
message_bar.visible = false
# Ensure grid is randomized with Scarcity if server
if multiplayer.is_server():
randomize_game_grid()
+1 -2
View File
@@ -80,9 +80,8 @@ current = true
fov = 35.5
[node name="Camera3D200" type="Camera3D" parent="." unique_id=1763366951]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 7, 15, 7)
transform = Transform3D(1, 0, 0, 0, 0.5581796, 0.8297202, 0, -0.8297202, 0.5581796, 7, 16.774572, 19.035084)
environment = ExtResource("4_ky38j")
projection = 1
current = true
fov = 35.5
size = 15.0
+9
View File
@@ -165,6 +165,15 @@ func _ready():
display_name = "Player %d" % my_id
$Name.text = display_name
# Character Pointer Visibility
# Show only for our local player (not bots, not other players)
var pointer = get_node_or_null("CharacterPointer")
if pointer:
if is_bot or is_in_group("Bots"):
pointer.visible = false
else:
pointer.visible = is_multiplayer_authority()
# Sync name to other peers if this is our local player or a bot we own
if is_multiplayer_authority():
rpc("sync_display_name", display_name)
+60 -16
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://1dbdbg3q5778"]
[gd_scene format=4 uid="uid://1dbdbg3q5778"]
[ext_resource type="Script" uid="uid://c78jcadupsdro" path="res://scenes/player.gd" id="1_qecr4"]
[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="2_3e0d5"]
@@ -8,6 +8,45 @@
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="5_alfd1"]
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="6_5oq5w"]
[ext_resource type="Script" uid="uid://cwwwixc07jc86" path="res://scripts/bot_controller.gd" id="7_botctrl"]
[ext_resource type="Texture2D" uid="uid://y4l3c6305ier" path="res://assets/models/character_pointer/character_pointer_Char Pointer_color.png" id="7_ur7pv"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_83jal"]
resource_name = "Material.001"
cull_mode = 2
albedo_texture = ExtResource("7_ur7pv")
roughness = 0.5
[sub_resource type="ArrayMesh" id="ArrayMesh_vp6rp"]
_surfaces = [{
"aabb": AABB(-1, -2.1656196, -1, 2, 4.331239, 2),
"format": 34896613377,
"index_count": 24,
"index_data": PackedByteArray("AAABAAIAAQADAAIABAAAAAIAAwAEAAIABQABAAAABQADAAEABQAAAAQABQAEAAMA"),
"name": "Material.001",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 6,
"vertex_data": PackedByteArray("AAD/f///AAAAAP9/AAAAAP9/////fwAA////fwAAAAD///9///8AAP9/AAD/fwAA")
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_6x2wj"]
resource_name = "character_pointer_Cube_001"
_surfaces = [{
"aabb": AABB(-1, -2.1656196, -1, 2, 4.331239, 2),
"attribute_data": PackedByteArray("/z+whgkAmdIJAGsN9f/HOv+/sIYIgGsN/7+whgiAmdIIgGsN9n/HOv8/sIYJAGsN9n/1//8/sIb2f8c69f/1/wiAmdL/v7CG9f/1//+/sIb1/8c69n/1/wkAmdL/P7CG"),
"format": 34896613399,
"index_count": 24,
"index_data": PackedByteArray("AAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcA"),
"material": SubResource("StandardMaterial3D_83jal"),
"name": "Material.001",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 24,
"vertex_data": PackedByteArray("AAD/f///k8gAAP9/AACTyP9/////f5PIAAD/fwAA9vj///9/AAD2+P9/////f/b4////fwAAEcD///9///8RwP9/////fxHA////f///yKUAAP9////Ipf9/////f8il/38AAP9/VZsAAP9///9Vm////3///1Wb/38AAP9/bc7///9///9tzv///38AAG3O/38AAP9/hvv///9/AACG+wAA/38AAIb7/38AAP9/j8EAAP9/AACPwQAA/3///4/BZHxX1WR8V9VkfFfV0bLcIdGy3CHRstwhIaoGLiGqBi4hqgYuQaVYkEGlWJBBpViQIkxIciJMSHIiTEhyM47mODOO5jgzjuY4PlYw6T5WMOk+VjDprVDvwK1Q78CtUO/A")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_vp6rp")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xqgey"]
albedo_color = Color(0.85, 0.085, 0.238, 1)
@@ -20,43 +59,48 @@ material = SubResource("StandardMaterial3D_xqgey")
[sub_resource type="FontVariation" id="FontVariation_q2tkp"]
spacing_glyph = 5
[node name="CharacterBody3D" type="CharacterBody3D"]
[node name="CharacterBody3D" type="CharacterBody3D" unique_id=1781925038]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
collision_layer = 2
script = ExtResource("1_qecr4")
cell_size = Vector3(1, 1, 1)
use_diagonal_movement = true
[node name="Masbro" parent="." instance=ExtResource("2_mjsl8")]
[node name="Masbro" parent="." unique_id=1585899496 instance=ExtResource("2_mjsl8")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
[node name="Bob" parent="." instance=ExtResource("2_3e0d5")]
[node name="Bob" parent="." unique_id=527434763 instance=ExtResource("2_3e0d5")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0)
visible = false
[node name="Gatot" parent="." instance=ExtResource("4_3tlf6")]
[node name="Gatot" parent="." unique_id=1934435989 instance=ExtResource("4_3tlf6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false
[node name="Oldpop" parent="." instance=ExtResource("5_alfd1")]
[node name="Oldpop" parent="." unique_id=926683011 instance=ExtResource("5_alfd1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1085499957]
root_node = NodePath("../Masbro")
libraries = {
&"animation-pack": ExtResource("6_5oq5w")
}
libraries/animation-pack = ExtResource("6_5oq5w")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
[node name="CharacterPointer" type="MeshInstance3D" parent="." unique_id=1262762501]
transform = Transform3D(0.14142136, 0, 0.14142135, 0, 0.2, 0, -0.14142135, 0, 0.14142136, 0, 1.5491982, 0)
visible = false
mesh = SubResource("ArrayMesh_6x2wj")
skeleton = NodePath("")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=310474433]
visible = false
mesh = SubResource("CapsuleMesh_l8ldl")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1430155562]
shape = SubResource("SphereShape3D_3oo5r")
[node name="Name" type="Label3D" parent="."]
[node name="Name" type="Label3D" parent="." unique_id=848046946]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.47085, 0)
visible = false
billboard = 1
modulate = Color(0.32, 0.614667, 1, 1)
text = "username"
@@ -66,14 +110,14 @@ outline_size = 26
uppercase = true
autowrap_mode = 2
[node name="Bubble" type="Sprite3D" parent="."]
[node name="Bubble" type="Sprite3D" parent="." unique_id=1131454414]
transform = Transform3D(0.625, 0, 0, 0, 0.5, 0, 0, 0, 0.625, 0, 2.63593, 0)
visible = false
modulate = Color(0, 0, 0, 1)
billboard = 1
texture = ExtResource("2_5w327")
[node name="Message" type="Label3D" parent="Bubble"]
[node name="Message" type="Label3D" parent="Bubble" unique_id=598228184]
transform = Transform3D(1, 0, 0, 0, 1.25, 0, 0, 0, 1, 0, 0.00180054, 0)
billboard = 1
double_sided = false
@@ -88,5 +132,5 @@ autowrap_mode = 3
justification_flags = 171
width = 700.0
[node name="BotController" type="Node" parent="."]
[node name="BotController" type="Node" parent="." unique_id=723259755]
script = ExtResource("7_botctrl")
+3 -1
View File
@@ -46,7 +46,9 @@ static func send_message(target: Node, message: String, type: int = MessageType.
# Call the RPC on the target (usually a Player node)
# "any_peer" allows any client to send this message to the target
target.rpc("display_message", message, type)
# COMMENTED OUT PER USER REQUEST (Hide MessageBar/Notifications)
# target.rpc("display_message", message, type)
pass
# Helper for broadcasting to all players (if needed in future)
static func broadcast_to_all(tree: SceneTree, message: String, type: int = MessageType.NORMAL):
+1 -1
View File
@@ -314,7 +314,7 @@ func _execute_area_freeze(center_pos: Vector2i = Vector2i.ZERO):
if main:
var gcm = main.get_node_or_null("GoalsCycleManager")
if gcm:
gcm.add_score(player.name.to_int(), points)
gcm.rpc("request_add_score", points)
NotificationManager.send_message(player, "Hit %d Players! +%d Pts" % [hit_count, points], NotificationManager.MessageType.GOAL)
+4 -6
View File
@@ -401,22 +401,20 @@ func setup_playerboard_label(main_node):
var lbl = main_node.get_node_or_null("PlayerBoardLabel")
if lbl:
playerboard_label = lbl
playerboard_label.text = "" # Hidden initially
playerboard_label.text = "x0" # Start at x0
print("[UIManager] Found PlayerBoardLabel")
else:
print("[UIManager] PlayerBoardLabel not found")
func update_goal_count_label(count: int):
if playerboard_label:
playerboard_label.text = "x%d" % count
# Pop effect only for progress
if count > 0:
playerboard_label.text = "x%d" % count
# Pop effect
var tween = playerboard_label.create_tween()
playerboard_label.scale = Vector2(1.5, 1.5)
tween.tween_property(playerboard_label, "scale", Vector2(1.0, 1.0), 0.3).set_trans(Tween.TRANS_BOUNCE)
else:
playerboard_label.text = ""
# Method to update leaderboard with all players in match
func initialize_leaderboard_with_players(players: Array):