feat: Implement the core game scene, initializing various managers, multiplayer setup, and dynamic arena elements.

This commit is contained in:
Yogi Wiguna
2026-03-13 17:01:56 +08:00
parent a7361f4a2b
commit f4307a8405
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -702,9 +702,10 @@ func _start_game():
stop_n_go_manager.setup_mission_tiles() stop_n_go_manager.setup_mission_tiles()
stop_n_go_manager.spawn_initial_powerups() # Ensure power-ups exist before 1,2,3 Go stop_n_go_manager.spawn_initial_powerups() # Ensure power-ups exist before 1,2,3 Go
# Spawn Static Tektons BEFORE countdown (Free Mode Only) # Spawn Static Tektons and random tiles BEFORE countdown (Free Mode Only)
# Exclude for Stop n Go and Tekton Doors # Exclude for Stop n Go and Tekton Doors
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors": if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors":
randomize_game_grid()
spawn_static_tektons() spawn_static_tektons()
# Tekton Doors: Randomize connections BEFORE countdown so colors show # Tekton Doors: Randomize connections BEFORE countdown so colors show
@@ -1620,6 +1621,12 @@ func randomize_game_grid():
return -1 # Empty return -1 # Empty
enhanced_gridmap.randomize_floor(1, density_callable) enhanced_gridmap.randomize_floor(1, density_callable)
# Sync with all clients immediately
if multiplayer.is_server():
var grid_data = enhanced_gridmap.get_floor_data(1)
rpc("sync_full_grid_data", grid_data)
print("[Main] Server: Randomized grid (80%% density) and broadcasted to clients.")
@rpc("authority", "call_local", "reliable") @rpc("authority", "call_local", "reliable")
func sync_full_grid_data_stop_n_go(floor0: PackedInt32Array, floor1: PackedInt32Array, cols: int, rows: int): func sync_full_grid_data_stop_n_go(floor0: PackedInt32Array, floor1: PackedInt32Array, cols: int, rows: int):
+1 -1
View File
@@ -76,7 +76,7 @@ script = ExtResource("1_xcpe3")
mesh_library = ExtResource("1_110wo") mesh_library = ExtResource("1_110wo")
cell_size = Vector3(1, 0.2, 1) cell_size = Vector3(1, 0.2, 1)
data = { data = {
"cells": P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 1, 8, 0, 2, 8, 0, 3, 8, 0, 4, 8, 0, 5, 8, 0, 6, 8, 0, 7, 8, 0, 8, 8, 0, 9, 8, 0, 10, 8, 0, 11, 8, 0, 12, 8, 0, 13, 8, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 0, 10, 0, 1, 10, 0, 2, 10, 0, 3, 10, 0, 4, 10, 0, 5, 10, 0, 6, 10, 0, 7, 10, 0, 8, 10, 0, 9, 10, 0, 10, 10, 0, 11, 10, 0, 12, 10, 0, 13, 10, 0, 65537, 1, 7, 65537, 2, 7, 65537, 3, 7, 65537, 4, 7, 65537, 5, 7, 65537, 6, 7, 65537, 7, 7, 65537, 8, 7, 65537, 9, 7, 65537, 10, 7, 65537, 11, 7, 65538, 1, 7, 65538, 2, 7, 65538, 3, 7, 65538, 4, 7, 65538, 5, 7, 65538, 6, 7, 65538, 7, 7, 65538, 8, 7, 65538, 9, 7, 65538, 10, 7, 65538, 11, 7, 65539, 1, 7, 65539, 2, 7, 65539, 3, 7, 65539, 4, 7, 65539, 5, 7, 65539, 6, 7, 65539, 7, 7, 65539, 8, 7, 65539, 9, 7, 65539, 10, 7, 65539, 11, 7, 65540, 1, 7, 65540, 2, 7, 65540, 3, 7, 65540, 4, 7, 65540, 5, 7, 65540, 6, 7, 65540, 7, 7, 65540, 8, 7, 65540, 9, 7, 65540, 10, 7, 65540, 11, 7, 65541, 1, 7, 65541, 2, 7, 65541, 3, 7, 65541, 4, 7, 65541, 5, 7, 65541, 6, 7, 65541, 7, 7, 65541, 8, 7, 65541, 9, 7, 65541, 10, 7, 65541, 11, 7, 65542, 1, 7, 65542, 2, 7, 65542, 3, 7, 65542, 4, 7, 65542, 5, 7, 65542, 6, 7, 65542, 7, 7, 65542, 8, 7, 65542, 9, 7, 65542, 10, 7, 65542, 11, 7, 65543, 1, 7, 65543, 2, 7, 65543, 3, 7, 65543, 4, 7, 65543, 5, 7, 65543, 6, 7, 65543, 7, 7, 65543, 8, 7, 65543, 9, 7, 65543, 10, 7, 65543, 11, 7, 65544, 1, 7, 65544, 2, 7, 65544, 3, 7, 65544, 4, 7, 65544, 5, 7, 65544, 6, 7, 65544, 7, 7, 65544, 8, 7, 65544, 9, 7, 65544, 10, 7, 65544, 11, 7, 65545, 1, 7, 65545, 2, 7, 65545, 3, 7, 65545, 4, 7, 65545, 5, 7, 65545, 6, 7, 65545, 7, 7, 65545, 8, 7, 65545, 9, 7, 65545, 10, 7, 65545, 11, 7, 65545, 12, 7, 65546, 1, 7, 65546, 2, 7, 65546, 3, 7, 65546, 4, 7, 65546, 5, 7, 65546, 6, 7, 65546, 7, 7, 65546, 8, 7, 65546, 9, 7, 65546, 10, 7, 65546, 11, 7, 65546, 12, 7, 65547, 1, 7, 65547, 2, 7, 65547, 3, 7, 65547, 4, 7, 65547, 5, 7, 65547, 6, 7, 65547, 7, 7, 65547, 8, 7, 65547, 9, 7, 65547, 10, 7, 65547, 11, 7, 65547, 12, 7, 65548, 1, 7, 65548, 2, 7, 65548, 3, 7, 65548, 4, 7, 65548, 5, 7, 65548, 6, 7, 65548, 7, 7, 65548, 8, 7, 65548, 9, 7, 65548, 10, 7, 65548, 11, 7, 65548, 12, 7, 65537, 12, 10, 65538, 12, 10, 65539, 12, 10, 65540, 12, 10, 65541, 12, 10, 65542, 12, 10, 65543, 12, 10, 65544, 12, 10, 0, 11, 524288, 0, 12, 524288, 0, 13, 524288, 1, 11, 524288, 1, 12, 524288, 1, 13, 524288, 2, 11, 524288, 2, 12, 524288, 2, 13, 524288, 3, 11, 524288, 3, 12, 524288, 3, 13, 524288, 4, 11, 524288, 4, 12, 524288, 4, 13, 524288, 5, 11, 524288, 5, 12, 524288, 5, 13, 524288, 6, 11, 524288, 6, 12, 524288, 6, 13, 524288, 7, 11, 524288, 7, 12, 524288, 7, 13, 524288, 8, 11, 524288, 8, 12, 524288, 8, 13, 524288, 9, 11, 524288, 9, 12, 524288, 9, 13, 524288, 10, 11, 524288, 10, 12, 524288, 10, 13, 524288, 11, 11, 524288, 11, 12, 524288, 11, 13, 524288, 12, 11, 524288, 12, 12, 524288, 12, 13, 524288, 13, 11, 524288, 13, 12, 524288, 13, 13, 524288) "cells": PackedInt32Array(65537, 1, 7, 65537, 2, 7, 65537, 3, 7, 65537, 4, 7, 65537, 5, 7, 65537, 6, 7, 65537, 7, 7, 65537, 8, 7, 65537, 9, 7, 65537, 10, 7, 65537, 11, 7, 65538, 1, 7, 65538, 2, 7, 65538, 3, 7, 65538, 4, 7, 65538, 5, 7, 65538, 6, 7, 65538, 7, 7, 65538, 8, 7, 65538, 9, 7, 65538, 10, 7, 65538, 11, 7, 65539, 1, 7, 65539, 2, 7, 65539, 3, 7, 65539, 4, 7, 65539, 5, 7, 65539, 6, 7, 65539, 7, 7, 65539, 8, 7, 65539, 9, 7, 65539, 10, 7, 65539, 11, 7, 65540, 1, 7, 65540, 2, 7, 65540, 3, 7, 65540, 4, 7, 65540, 5, 7, 65540, 6, 7, 65540, 7, 7, 65540, 8, 7, 65540, 9, 7, 65540, 10, 7, 65540, 11, 7, 65541, 1, 7, 65541, 2, 7, 65541, 3, 7, 65541, 4, 7, 65541, 5, 7, 65541, 6, 7, 65541, 7, 7, 65541, 8, 7, 65541, 9, 7, 65541, 10, 7, 65541, 11, 7, 65542, 1, 7, 65542, 2, 7, 65542, 3, 7, 65542, 4, 7, 65542, 5, 7, 65542, 6, 7, 65542, 7, 7, 65542, 8, 7, 65542, 9, 7, 65542, 10, 7, 65542, 11, 7, 65543, 1, 7, 65543, 2, 7, 65543, 3, 7, 65543, 4, 7, 65543, 5, 7, 65543, 6, 7, 65543, 7, 7, 65543, 8, 7, 65543, 9, 7, 65543, 10, 7, 65543, 11, 7, 65544, 1, 7, 65544, 2, 7, 65544, 3, 7, 65544, 4, 7, 65544, 5, 7, 65544, 6, 7, 65544, 7, 7, 65544, 8, 7, 65544, 9, 7, 65544, 10, 7, 65544, 11, 7, 65545, 1, 7, 65545, 2, 7, 65545, 3, 7, 65545, 4, 7, 65545, 5, 7, 65545, 6, 7, 65545, 7, 7, 65545, 8, 7, 65545, 9, 7, 65545, 10, 7, 65545, 11, 7, 65545, 12, 7, 65546, 1, 7, 65546, 2, 7, 65546, 3, 7, 65546, 4, 7, 65546, 5, 7, 65546, 6, 7, 65546, 7, 7, 65546, 8, 7, 65546, 9, 7, 65546, 10, 7, 65546, 11, 7, 65546, 12, 7, 65547, 1, 7, 65547, 2, 7, 65547, 3, 7, 65547, 4, 7, 65547, 5, 7, 65547, 6, 7, 65547, 7, 7, 65547, 8, 7, 65547, 9, 7, 65547, 10, 7, 65547, 11, 7, 65547, 12, 7, 65548, 1, 7, 65548, 2, 7, 65548, 3, 7, 65548, 4, 7, 65548, 5, 7, 65548, 6, 7, 65548, 7, 7, 65548, 8, 7, 65548, 9, 7, 65548, 10, 7, 65548, 11, 7, 65548, 12, 7, 65537, 12, 10, 65538, 12, 10, 65539, 12, 10, 65540, 12, 10, 65541, 12, 10, 65542, 12, 10, 65543, 12, 10, 65544, 12, 10)
} }
script = ExtResource("2_hbe1v") script = ExtResource("2_hbe1v")
columns = 14 columns = 14