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,7 +7,7 @@ var player_id: String = ""
var game_address: String = "0.0.0.0"
var game_port: int = 8080
var game_mode: String = "snooker"
var game_mode: String = "freeball"
enum PlayerType {
Player1,
@@ -17,22 +17,25 @@ enum PlayerType {
enum GameModeType {
BALL_8,
BALL_9,
SNOOKER
SNOOKER,
FREE_BALL
}
const MATCH_TYPES: Dictionary = {
"8ball": GameModeType.BALL_8,
"9ball": GameModeType.BALL_9,
"snooker": GameModeType.SNOOKER
"snooker": GameModeType.SNOOKER,
"freeball": GameModeType.FREE_BALL
}
var GameMode: Dictionary = {
GameModeType.BALL_8: Ball8,
GameModeType.BALL_9: Ball9,
GameModeType.SNOOKER: Snooker
GameModeType.SNOOKER: Snooker,
GameModeType.FREE_BALL: FreeBall
}
var SelectedGameMode: GameModeType = GameModeType.SNOOKER
var SelectedGameMode: GameModeType = GameModeType.FREE_BALL
func _init() -> void: