-
-
Notifications
You must be signed in to change notification settings - Fork 0
Game Configuration
Bounce can be configured either via code or using a config.properties file inside the config/ directory. This allows flexibility for both developers and server hosts.
If a config.properties file is present, it overrides the default settings defined in code.
Place this file inside the /config folder of your server directory.
The following properties can be defined in the config.properties file. They control how the game behaves on your server. Each property is optional — if omitted, a default value will be used.
| Property | Type | Description | Default | Constraints / Notes |
|---|---|---|---|---|
minPlayers |
int |
Minimum number of players required to start a game | 2 |
Must be ≥ 2 |
maxPlayers |
int |
Maximum number of players allowed in a game | 8 |
Should be ≥ minPlayers
|
lobbyTime |
int |
Lobby countdown before game starts (in seconds) | 30 |
Must be > GameConfig.FORCE_START_TIME
|
gameTime |
int |
Maximum duration of a game round (in seconds) | 300 |
Game ends when this time is reached |
Here is a sample configuration file showing the essential settings to run the game:
minPlayers=2
maxPlayers=8
lobbyTime=30
gameTime=300Note
If your configuration doesn't include some of the properties shown above, it will not break the parsing process.
In such cases, the default values from the InternalGameConfig class will be used instead.
Some values have validation rules to prevent issues:
-
lobbyTimemust be greater than GameConfig.FORCE_START_TIME