feat: Introduce an enhanced gridmap addon with procedural generation, pathfinding, and initial core game scripts and assets.

This commit is contained in:
Yogi Wiguna
2026-02-23 12:31:42 +08:00
parent f72f641332
commit 92fd76f4b8
7 changed files with 67 additions and 39 deletions
+15 -1
View File
@@ -444,7 +444,11 @@ func _setup_client_game():
print("Client setup - my peer ID: ", my_id)
# INITIALIZE ARENA SIZE for Stop n Go locally to prevent out-of-bounds before sync arrives
if LobbyManager.game_mode == "Stop n Go" and stop_n_go_manager:
if LobbyManager.game_mode == "Stop n Go":
if not stop_n_go_manager:
stop_n_go_manager = load("res://scripts/managers/stop_n_go_manager.gd").new()
stop_n_go_manager.name = "StopNGoManager"
add_child(stop_n_go_manager)
stop_n_go_manager._apply_arena_setup()
# Pre-spawn ALL players known from LobbyManager (including Host ID 1)
@@ -1503,9 +1507,19 @@ func sync_full_grid_data(data: PackedInt32Array):
if not enhanced_gridmap:
print("[Main] Error: EnhancedGridMap not found!")
return
# Reapply deterministic Floor 0 before syncing Floor 1 items
if LobbyManager.game_mode == "Stop n Go":
if not stop_n_go_manager:
stop_n_go_manager = load("res://scripts/managers/stop_n_go_manager.gd").new()
stop_n_go_manager.name = "StopNGoManager"
add_child(stop_n_go_manager)
stop_n_go_manager._apply_arena_setup()
# Apply the synced data to Floor 1
enhanced_gridmap.set_floor_data(1, data)
enhanced_gridmap.update_grid_data()
enhanced_gridmap.initialize_astar()
print("[Main] Grid sync complete.")