feat: initialize main scene, character portraits, and UI/lobby management systems

This commit is contained in:
Yogi Wiguna
2026-03-30 15:28:38 +08:00
parent 42e96a7ed9
commit f08b21006b
13 changed files with 50 additions and 46 deletions

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://vt6uftsiilds"
path.s3tc="res://.godot/imported/player_2.png-ebb8c6ff02b1825426b4ebd24b1412fb.s3tc.ctex"
path.s3tc="res://.godot/imported/sc_copper.png-3eb5edb1be791f0e1bdd87ad73702039.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://assets/graphics/characters_potrait/player_2.png"
dest_files=["res://.godot/imported/player_2.png-ebb8c6ff02b1825426b4ebd24b1412fb.s3tc.ctex"]
source_file="res://assets/graphics/characters_potrait/sc_copper.png"
dest_files=["res://.godot/imported/sc_copper.png-3eb5edb1be791f0e1bdd87ad73702039.s3tc.ctex"]
[params]

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c2grmrcejjllp"
path.s3tc="res://.godot/imported/player_3.png-64a705faa20baf8fae4d2bba29e69075.s3tc.ctex"
path.s3tc="res://.godot/imported/sc_dabro.png-b7e31803b0e3ac70f852a6ddcc9553b0.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://assets/graphics/characters_potrait/player_3.png"
dest_files=["res://.godot/imported/player_3.png-64a705faa20baf8fae4d2bba29e69075.s3tc.ctex"]
source_file="res://assets/graphics/characters_potrait/sc_dabro.png"
dest_files=["res://.godot/imported/sc_dabro.png-b7e31803b0e3ac70f852a6ddcc9553b0.s3tc.ctex"]
[params]

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://kj2qnaps6lsv"
path.s3tc="res://.godot/imported/player_4.png-4a9be46b5d58111dfc679ffac64a2436.s3tc.ctex"
path.s3tc="res://.godot/imported/sc_gatot.png-574cf8649d3885f1c09e5706aeed1952.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://assets/graphics/characters_potrait/player_4.png"
dest_files=["res://.godot/imported/player_4.png-4a9be46b5d58111dfc679ffac64a2436.s3tc.ctex"]
source_file="res://assets/graphics/characters_potrait/sc_gatot.png"
dest_files=["res://.godot/imported/sc_gatot.png-574cf8649d3885f1c09e5706aeed1952.s3tc.ctex"]
[params]

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

@@ -3,7 +3,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cya6gvac4fqkg"
path.s3tc="res://.godot/imported/player_1.png-d0a9caf891c894b099ccc84d92782798.s3tc.ctex"
path.s3tc="res://.godot/imported/sc_pip.png-cb2ab46c8fd8bed05c3303490c70d78a.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://assets/graphics/characters_potrait/player_1.png"
dest_files=["res://.godot/imported/player_1.png-d0a9caf891c894b099ccc84d92782798.s3tc.ctex"]
source_file="res://assets/graphics/characters_potrait/sc_pip.png"
dest_files=["res://.godot/imported/sc_pip.png-cb2ab46c8fd8bed05c3303490c70d78a.s3tc.ctex"]
[params]
+21 -24
View File
@@ -24,12 +24,13 @@
[ext_resource type="Texture2D" uid="uid://djbin5556lwsx" path="res://assets/graphics/gui/gauge/Segment2_empty.png" id="17_fv21b"]
[ext_resource type="Theme" uid="uid://0dhxl4ohyxh8" path="res://assets/graphics/game_setting/setting_theme.tres" id="18_pm3ni"]
[ext_resource type="Texture2D" uid="uid://cxp0k2spgs080" path="res://assets/graphics/gui/gauge/gauge_ready.png" id="22_kmb1v"]
[ext_resource type="Texture2D" uid="uid://cya6gvac4fqkg" path="res://assets/graphics/characters_potrait/sc_pip.png" id="25_c6pm6"]
[ext_resource type="Texture2D" uid="uid://ba80xnybpixw2" path="res://assets/graphics/touch_control/take_tile.png" id="25_qkpxi"]
[ext_resource type="Texture2D" uid="uid://bsgqrjx2ity4c" path="res://assets/graphics/touch_control/speed.png" id="26_2f3dj"]
[ext_resource type="Texture2D" uid="uid://pwxo4lb87yi" path="res://assets/graphics/touch_control/put_tile.png" id="26_5q0nq"]
[ext_resource type="Texture2D" uid="uid://cp0nlmkii1ewp" path="res://assets/graphics/gui/rankings/1st.png" id="26_j8jky"]
[ext_resource type="Texture2D" uid="uid://umw3e8nfe3vr" path="res://assets/graphics/touch_control/attack_mode.png" id="27_dgi5k"]
[ext_resource type="Texture2D" uid="uid://cfpxknbdsk4u" path="res://assets/graphics/character_selection/sc_characters/sc_unknown.png" id="27_j8jky"]
[ext_resource type="Texture2D" uid="uid://kj2qnaps6lsv" path="res://assets/graphics/characters_potrait/sc_gatot.png" id="28_5he1u"]
[ext_resource type="Texture2D" uid="uid://ikek8mcpeob5" path="res://assets/graphics/gui/rankings/2nd.png" id="28_fuf3a"]
[ext_resource type="Texture2D" uid="uid://bowng12514p53" path="res://assets/graphics/gui/rankings/3rd.png" id="29_pibwh"]
[ext_resource type="Texture2D" uid="uid://biun2yvglxgij" path="res://assets/graphics/touch_control/grab_tekton.png" id="36_pibwh"]
@@ -1286,9 +1287,9 @@ layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_5he1u")
[node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1" unique_id=617135879]
custom_minimum_size = Vector2(0, 100)
custom_minimum_size = Vector2(0, 132)
layout_mode = 2
theme_override_constants/separation = 2
theme_override_constants/separation = 5
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox" unique_id=828754165]
custom_minimum_size = Vector2(70, 0)
@@ -1303,10 +1304,9 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="PortraitRect" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox" unique_id=1512406425]
custom_minimum_size = Vector2(100, 100)
custom_minimum_size = Vector2(100, 132)
layout_mode = 2
texture = ExtResource("27_j8jky")
expand_mode = 5
texture = ExtResource("25_c6pm6")
stretch_mode = 6
[node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox" unique_id=1068203836]
@@ -1370,7 +1370,7 @@ theme_override_styles/panel = SubResource("StyleBoxTexture_5poiv")
[node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2" unique_id=1942870621]
layout_mode = 2
theme_override_constants/separation = 0
theme_override_constants/separation = 5
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox" unique_id=1946714047]
custom_minimum_size = Vector2(70, 0)
@@ -1385,15 +1385,14 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="PortraitRect" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox" unique_id=46217188]
custom_minimum_size = Vector2(100, 100)
custom_minimum_size = Vector2(100, 132)
layout_mode = 2
texture = ExtResource("27_j8jky")
expand_mode = 1
texture = ExtResource("25_c6pm6")
stretch_mode = 6
[node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox" unique_id=2134048836]
layout_mode = 2
theme_override_constants/separation = 8
theme_override_constants/separation = 18
alignment = 1
[node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox/SplitterContainer" unique_id=1404467822]
@@ -1422,7 +1421,7 @@ layout_mode = 2
alignment = 1
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox/SplitterContainer/SectionB" unique_id=1606855267]
custom_minimum_size = Vector2(120, 0)
custom_minimum_size = Vector2(110, 0)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
@@ -1453,7 +1452,7 @@ theme_override_styles/panel = SubResource("StyleBoxTexture_2cjbq")
[node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3" unique_id=1214564201]
layout_mode = 2
theme_override_constants/separation = 2
theme_override_constants/separation = 5
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox" unique_id=377846102]
custom_minimum_size = Vector2(70, 0)
@@ -1468,15 +1467,14 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="PortraitRect" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox" unique_id=383855502]
custom_minimum_size = Vector2(100, 100)
custom_minimum_size = Vector2(100, 132)
layout_mode = 2
texture = ExtResource("27_j8jky")
expand_mode = 1
texture = ExtResource("28_5he1u")
stretch_mode = 6
[node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox" unique_id=1969616094]
layout_mode = 2
theme_override_constants/separation = 8
theme_override_constants/separation = 18
alignment = 1
[node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox/SplitterContainer" unique_id=1627755679]
@@ -1505,7 +1503,7 @@ layout_mode = 2
alignment = 1
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox/SplitterContainer/SectionB" unique_id=246464797]
custom_minimum_size = Vector2(120, 0)
custom_minimum_size = Vector2(110, 0)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
@@ -1536,7 +1534,7 @@ theme_override_styles/panel = SubResource("StyleBoxTexture_cjqg0")
[node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4" unique_id=1110779657]
layout_mode = 2
theme_override_constants/separation = 2
theme_override_constants/separation = 5
[node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox" unique_id=171801451]
custom_minimum_size = Vector2(70, 0)
@@ -1551,15 +1549,14 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="PortraitRect" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox" unique_id=1346078271]
custom_minimum_size = Vector2(100, 100)
custom_minimum_size = Vector2(100, 132)
layout_mode = 2
texture = ExtResource("27_j8jky")
expand_mode = 1
texture = ExtResource("28_5he1u")
stretch_mode = 6
[node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox" unique_id=249320303]
layout_mode = 2
theme_override_constants/separation = 8
theme_override_constants/separation = 18
alignment = 1
[node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox/SplitterContainer" unique_id=404059862]
@@ -1588,7 +1585,7 @@ layout_mode = 2
alignment = 1
[node name="ScoreLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox/SplitterContainer/SectionB" unique_id=1975407740]
custom_minimum_size = Vector2(120, 0)
custom_minimum_size = Vector2(110, 0)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("13_j8jky")
+11 -4
View File
@@ -353,15 +353,22 @@ func _ready():
@onready var floor_spawn_bot: AnimatedSprite3D = $floor_spawn_bot
@onready var floor_spawn_top: AnimatedSprite3D = $floor_spawn_top
func _input(event: InputEvent) -> void:
if event.is_action_pressed("grab_item"):
floor_spawn_bot.play("floor_spawn_bot")
floor_spawn_top.play("floor_spawn_top")
#func _input(event: InputEvent) -> void:
#if event.is_action_pressed("grab_item"):
#play_floor_spawn()
func play_floor_spawn():
floor_spawn_bot.visible = true
floor_spawn_top.visible = true
floor_spawn_bot.play("floor_spawn_bot")
floor_spawn_top.play("floor_spawn_top")
# Wait for animation to finish then hide.
# We assume both animations have roughly similar lengths.
await floor_spawn_bot.animation_finished
floor_spawn_bot.visible = false
floor_spawn_top.visible = false
func _init_managers():
movement_manager = load("res://scripts/managers/player_movement_manager.gd").new()
movement_manager.name = "MovementManager"
+2 -2
View File
@@ -13,8 +13,8 @@ var player: Node3D
@export var default_y: float = 19.636
# Bounds Definitions { min_x, max_x, min_z, max_z }
var bounds_freemode = { "min_x": 3.0, "max_x": 11.0, "min_z": 15.0, "max_z": 22.5 }
var bounds_stop_n_go = { "min_x": 3.0, "max_x": 19.5, "min_z": 15.0, "max_z": 19.5 }
var bounds_freemode = { "min_x": 3.0, "max_x": 11.0, "min_z": 13.0, "max_z": 22.5 }
var bounds_stop_n_go = { "min_x": 3.0, "max_x": 19.5, "min_z": 13.0, "max_z": 19.5 }
var bounds_doors = { "min_x": 7.0, "max_x": 7.0, "min_z": 25.8, "max_z": 25.8 } # Static overlook
func initialize(p_camera: Camera3D, _p_shake_manager: Node):
+2 -2
View File
@@ -64,7 +64,7 @@ var disconnect_reason: String = ""
# Stop N Go settings
var sng_go_duration: int = 20
var sng_stop_duration: int = 4
var sng_required_goals: int = 1
var sng_required_goals: int = 8
# Tekton Doors settings
var doors_swap_time: int = 15
@@ -904,7 +904,7 @@ func reset() -> void:
selected_area = available_areas[0]
local_character_index = 0 # Default to "Copper"
enable_cycle_timer = false
sng_go_duration = 15
sng_go_duration = 20
sng_stop_duration = 4
sng_required_goals = 8
doors_swap_time = 15
+2 -2
View File
@@ -454,7 +454,7 @@ func initialize_leaderboard_with_players(players: Array):
character_name = p.get("character", "Pip")
break
var avatar_url = "res://assets/graphics/character_selection/sc_characters/sc_%s.png" % character_name.to_lower()
var avatar_url = "res://assets/graphics/character_potrait/sc_%s.png" % character_name.to_lower()
if ResourceLoader.exists(avatar_url):
portrait_rect.texture = load(avatar_url)
@@ -559,7 +559,7 @@ func update_live_leaderboard(players: Array):
"Oldpop": character_name = "Copper"
_: character_name = sc
var avatar_url = "res://assets/graphics/character_selection/sc_characters/sc_%s.png" % character_name.to_lower()
var avatar_url = "res://assets/graphics/character_potrait/sc_%s.png" % character_name.to_lower()
if ResourceLoader.exists(avatar_url):
portrait_rect.texture = load(avatar_url)