feat(game): add free ball mode and improve ball state handling

* add Free Ball game mode and lobby selection
* refactor base mode ball state tracking for reaped/sunk balls
* add player ownership tracking and colored-ball support
* add initial 9-ball mode implementation
* update 8-ball and snooker modes to use base ball handling
* replicate ball linear velocity for multiplayer synchronization
* improve ball collision sound propagation and physics settings
* reenable game music and initialize game signals
* improve lobby input focus and mode selection behavior
* adjust cue impulse origin and default game mode
This commit is contained in:
2026-08-10 21:22:52 -05:00
parent 26dcfe0d1b
commit e3bdb21cd2
19 changed files with 234 additions and 62 deletions

View File

@@ -7,8 +7,17 @@ func _ready() -> void:
func setup_signals() -> void:
Globals.game_state.balls_stopped_moving.connect(_balls_stopped_moving)
Globals.game_state.process_ball.connect(_process_ball)
Globals.game_state.reap_ball.connect(_reap_ball)
Globals.game_state.process_ball.connect(_process_ball)
func _reap_ball(ball: Node3D) -> void:
if ball.name == "white_ball":
Globals.game_state.white_ball_needs_hard_reset.emit()
return
mode.reap_ball(ball)
rpc("reap_ball", str(ball.get_path()))
func _process_ball(ball: Node3D) -> void:
if ball.name == "white_ball":
@@ -18,11 +27,3 @@ func _process_ball(ball: Node3D) -> void:
mode.process_ball(ball)
rpc("reap_ball", str(ball.get_path()))
func _reap_ball(ball: Node3D) -> void:
if ball.name == "white_ball":
Globals.game_state.white_ball_needs_hard_reset.emit()
return
mode.reap_ball(ball)
rpc("reap_ball", str(ball.get_path()))