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.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
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors":
randomize_game_grid()
spawn_static_tektons()
# Tekton Doors: Randomize connections BEFORE countdown so colors show
@@ -1620,6 +1621,12 @@ func randomize_game_grid():
return -1 # Empty
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")
func sync_full_grid_data_stop_n_go(floor0: PackedInt32Array, floor1: PackedInt32Array, cols: int, rows: int):