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

@@ -104,11 +104,13 @@ func set_tracking_of_cue(path: String) -> void:
func set_tracking_of_ball(path: String) -> void:
path = str(path).trim_prefix(str(multiplayer_synchronizer.root_path) + "/")
var position_pth = NodePath( path + ":position" )
var rotation_pth = NodePath( path + ":rotation" )
var position_pth = NodePath( path + ":position" )
var rotation_pth = NodePath( path + ":rotation" )
var linear_velocity_pth = NodePath( path + ":linear_velocity" )
synchronizer_config.add_property(position_pth)
synchronizer_config.add_property(rotation_pth)
synchronizer_config.add_property(linear_velocity_pth)
synchronizer_config.property_set_replication_mode(
position_pth, SceneReplicationConfig.REPLICATION_MODE_ON_CHANGE
@@ -116,14 +118,20 @@ func set_tracking_of_ball(path: String) -> void:
synchronizer_config.property_set_replication_mode(
rotation_pth, SceneReplicationConfig.REPLICATION_MODE_ON_CHANGE
)
synchronizer_config.property_set_replication_mode(
linear_velocity_pth, SceneReplicationConfig.REPLICATION_MODE_ON_CHANGE
)
func remove_tracking_of_ball(path: String) -> void:
path = str(path).trim_prefix(str(multiplayer_synchronizer.root_path) + "/")
var position_pth = NodePath(path + ":position")
var rotation_pth = NodePath(path + ":rotation")
var position_pth = NodePath( path + ":position" )
var rotation_pth = NodePath( path + ":rotation" )
var linear_velocity_pth = NodePath( path + ":linear_velocity" )
if synchronizer_config.has_property(position_pth):
synchronizer_config.remove_property(position_pth)
if synchronizer_config.has_property(rotation_pth):
synchronizer_config.remove_property(rotation_pth)
if synchronizer_config.has_property(linear_velocity_pth):
synchronizer_config.remove_property(linear_velocity_pth)