Class Constants
- Object
-
- Constants
-
public final class Constants extends ObjectConstants.
-
-
Field Summary
Fields Modifier and Type Field Description static intACCELERATIONAcceleration is the increase in speed per turn, which adds 1 unit to the speed per turn when the bot is increasing its speed moving forward.static intBOUNDING_CIRCLE_RADIUSThe radius of the bounding circle of the bot, which is a constant of 18 units.static intDECELERATIONDeceleration is the decrease in speed per turn, which subtracts 2 units to the speed per turn when the bot is decreasing its speed moving backward.static doubleINACTIVITY_ZAPThe amount of damage a bot receives per turn when the game's inactivity time limit is exceeded.static doubleMAX_BULLET_SPEEDThe maximum bullet speed is 19.7 units per turn.static doubleMAX_FIREPOWERThe maximum firepower, which is 3.static intMAX_GUN_TURN_RATEThe maximum gun turn rate, which is a constant of 20 degrees per turn.static intMAX_NUMBER_OF_TEAM_MESSAGES_PER_TURNThe maximum number of team messages that can be sent per turn, which is 10 messages.static intMAX_RADAR_TURN_RATEThe maximum radar turn rate, which is a constant of 45 degrees per turn.static intMAX_SPEEDThe maximum absolute speed, which is 8 units per turn.static intMAX_TURN_RATEThe maximum possible driving turn rate, which is max. 10 degrees per turn.static doubleMIN_BULLET_SPEEDThe minimum bullet speed is 11 units per turn.static doubleMIN_FIREPOWERThe minimum firepower, which is 0.1.static doubleRAM_DAMAGEThe amount of damage dealt to each bot involved in a collision when two bots ram into each other, which is 0.6 energy points per collision.static intSCAN_RADIUSThe radius of the radar's scan beam, which is a constant of 1200 units.static doubleSTARTING_GUN_HEATThe gun heat at the start of a round, which is 3.0.static intTEAM_MESSAGE_MAX_SIZEThe maximum size of a team message in bytes (32 KB), which is the serialized (compact JSON) size of the message object.
-
-
-
Field Detail
-
BOUNDING_CIRCLE_RADIUS
public static final int BOUNDING_CIRCLE_RADIUS
The radius of the bounding circle of the bot, which is a constant of 18 units.The bounding circle of a bot is a circle going from the center of the bot with a radius so that the circle covers most of the bot. The bounding circle is used for determining when a bot is hit by a bullet.
A bot gets hit by a bullet when the bullet gets inside the bounding circle, i.e. the distance between the bullet and the center of the bounding circle is less than the radius of the bounding circle.
- See Also:
- Constant Field Values
-
SCAN_RADIUS
public static final int SCAN_RADIUS
The radius of the radar's scan beam, which is a constant of 1200 units.The radar is used for scanning the battlefield for opponent bots. The shape of the scan beam of the radar is a circle arc ("pizza slice") starting from the center of the bot. Opponent bots that get inside the scan arc will be detected by the radar.
The radius of the arc is a constant of 1200 units. This means that that the radar will not be able to detect bots that are more than 1200 units away from the bot.
The radar needs to be turned (left or right) to scan opponent bots. So make sure the radar is always turned. The more the radar is turned, the larger the area of the scan arc becomes, and the bigger the chance is that the radar detects an opponent. If the radar is not turning, the scan arc becomes a thin line, unable to scan and detect anything.
- See Also:
- Constant Field Values
-
MAX_TURN_RATE
public static final int MAX_TURN_RATE
The maximum possible driving turn rate, which is max. 10 degrees per turn.This is the max. possible turn rate of the bot. Note that the speed of the bot has a direct impact on the turn rate. The faster the speed the less turn rate.
The formula for the max. possible turn rate at a given speed is: MaxTurnRate - 0.75 x abs(speed). Hence, the turn rate is at max. 10 degrees/turn when the speed is zero, and down to only 4 degrees per turn when the bot is at max speed (which is 8 units per turn).
- See Also:
- Constant Field Values
-
MAX_GUN_TURN_RATE
public static final int MAX_GUN_TURN_RATE
The maximum gun turn rate, which is a constant of 20 degrees per turn.- See Also:
- Constant Field Values
-
MAX_RADAR_TURN_RATE
public static final int MAX_RADAR_TURN_RATE
The maximum radar turn rate, which is a constant of 45 degrees per turn.- See Also:
- Constant Field Values
-
MAX_SPEED
public static final int MAX_SPEED
The maximum absolute speed, which is 8 units per turn.- See Also:
- Constant Field Values
-
MIN_FIREPOWER
public static final double MIN_FIREPOWER
The minimum firepower, which is 0.1. The gun will not fire with a power that is less than the minimum firepower, which is 0.1.- See Also:
- Constant Field Values
-
MAX_FIREPOWER
public static final double MAX_FIREPOWER
The maximum firepower, which is 3. The gun will fire up to this power, even if the firepower is set to a higher value.- See Also:
- Constant Field Values
-
MIN_BULLET_SPEED
public static final double MIN_BULLET_SPEED
The minimum bullet speed is 11 units per turn.The minimum bullet speed is the slowest possible speed that a bullet can travel and is defined by the maximum firepower: 20 - 3 x max. firepower, i.e. 20 - 3 x 3 = 11. The more power, the slower the bullet speed will be.
- See Also:
- Constant Field Values
-
MAX_BULLET_SPEED
public static final double MAX_BULLET_SPEED
The maximum bullet speed is 19.7 units per turn.The maximum bullet speed is the fastest possible speed that a bullet can travel and is defined by the minimum firepower. Max. bullet speed = 20 - 3 x min. firepower, i.e. 20 - 3 x 0.1 = 19.7. The lesser power, the faster the bullet speed will be.
- See Also:
- Constant Field Values
-
ACCELERATION
public static final int ACCELERATION
Acceleration is the increase in speed per turn, which adds 1 unit to the speed per turn when the bot is increasing its speed moving forward.- See Also:
- Constant Field Values
-
DECELERATION
public static final int DECELERATION
Deceleration is the decrease in speed per turn, which subtracts 2 units to the speed per turn when the bot is decreasing its speed moving backward. This means that a bot is faster at braking than accelerating forward.- See Also:
- Constant Field Values
-
INACTIVITY_ZAP
public static final double INACTIVITY_ZAP
The amount of damage a bot receives per turn when the game's inactivity time limit is exceeded. A bot that has not fired or been hit by a bullet formaxInactivityTurnsconsecutive turns will lose this much energy every turn until it acts again.- See Also:
- Constant Field Values
-
RAM_DAMAGE
public static final double RAM_DAMAGE
The amount of damage dealt to each bot involved in a collision when two bots ram into each other, which is 0.6 energy points per collision.- See Also:
- Constant Field Values
-
STARTING_GUN_HEAT
public static final double STARTING_GUN_HEAT
The gun heat at the start of a round, which is 3.0. The gun cannot fire until its heat drops to zero, cooling at the rate defined by the game setup's gun cooling rate.- See Also:
- Constant Field Values
-
TEAM_MESSAGE_MAX_SIZE
public static final int TEAM_MESSAGE_MAX_SIZE
The maximum size of a team message in bytes (32 KB), which is the serialized (compact JSON) size of the message object. Messages exceeding this size are rejected.- See Also:
- Constant Field Values
-
MAX_NUMBER_OF_TEAM_MESSAGES_PER_TURN
public static final int MAX_NUMBER_OF_TEAM_MESSAGES_PER_TURN
The maximum number of team messages that can be sent per turn, which is 10 messages.- See Also:
- Constant Field Values
-
-