Class Constants


  • public class Constants
    extends java.lang.Object
    A utility class containing constant values.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CHUNK_SIZE
      The width and length of a chunk (8x8 tiles).
      static int CLIENT_DEFAULT_ZOOM
      The default camera zoom value.
      static int CLIENT_TICK_LENGTH
      The number of milliseconds in a client tick.
      static double GAME_FIXED_ASPECT_RATIO
      The aspect ratio of the game when running in fixed mode.
      static int GAME_FIXED_HEIGHT
      The original height of the game when running in fixed mode.
      static java.awt.Dimension GAME_FIXED_SIZE
      Dimension representation of the width and height of the game in fixed mode.
      static int GAME_FIXED_WIDTH
      The original width of the game when running in fixed mode.
      static int GAME_TICK_LENGTH
      The number of milliseconds in a server game tick.
      static float HIGH_ALCHEMY_MULTIPLIER
      High alchemy = shop price * HIGH_ALCHEMY_MULTIPLIER
      static int ITEM_SPRITE_HEIGHT
      Height of a standard item sprite
      static int ITEM_SPRITE_WIDTH
      Width of a standard item sprite
      static int MAX_Z
      The max allowed plane by the game.
      static int OVERWORLD_MAX_Y
      The height of the overworld, in tiles.
      static int REGION_SIZE
      The width and length of a map region (64x64 tiles).
      static int ROOF_FLAG_BETWEEN
      Flag for roof removal to remove the roofs that are above any tile between the camera and the player.
      static int ROOF_FLAG_DESTINATION
      Flag for roof removal to remove the roofs above the player's destination tile.
      static int ROOF_FLAG_HOVERED
      Flag for roof removal to remove the roofs above the currently hovered tile.
      static int ROOF_FLAG_POSITION
      Flag for roof removal to remove the roofs above the player's current position.
      static int SCENE_SIZE
      The width and length of the scene (13 chunks x 8 tiles).
      static int TILE_FLAG_BRIDGE  
      static int TILE_FLAG_UNDER_ROOF  
    • Constructor Summary

      Constructors 
      Constructor Description
      Constants()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GAME_FIXED_WIDTH

        public static final int GAME_FIXED_WIDTH
        The original width of the game when running in fixed mode.
        See Also:
        Constant Field Values
      • GAME_FIXED_HEIGHT

        public static final int GAME_FIXED_HEIGHT
        The original height of the game when running in fixed mode.
        See Also:
        Constant Field Values
      • GAME_FIXED_SIZE

        public static final java.awt.Dimension GAME_FIXED_SIZE
        Dimension representation of the width and height of the game in fixed mode.
      • GAME_FIXED_ASPECT_RATIO

        public static final double GAME_FIXED_ASPECT_RATIO
        The aspect ratio of the game when running in fixed mode.
        See Also:
        Constant Field Values
      • CLIENT_DEFAULT_ZOOM

        public static final int CLIENT_DEFAULT_ZOOM
        The default camera zoom value.
        See Also:
        Constant Field Values
      • CHUNK_SIZE

        public static final int CHUNK_SIZE
        The width and length of a chunk (8x8 tiles).
        See Also:
        Constant Field Values
      • REGION_SIZE

        public static final int REGION_SIZE
        The width and length of a map region (64x64 tiles).
        See Also:
        Constant Field Values
      • SCENE_SIZE

        public static final int SCENE_SIZE
        The width and length of the scene (13 chunks x 8 tiles).
        See Also:
        Constant Field Values
      • MAX_Z

        public static final int MAX_Z
        The max allowed plane by the game.

        This value is exclusive. The plane is set by 2 bits which restricts the plane value to 0-3.

        See Also:
        Constant Field Values
      • ROOF_FLAG_POSITION

        public static final int ROOF_FLAG_POSITION
        Flag for roof removal to remove the roofs above the player's current position.
        See Also:
        Constant Field Values
      • ROOF_FLAG_HOVERED

        public static final int ROOF_FLAG_HOVERED
        Flag for roof removal to remove the roofs above the currently hovered tile.
        See Also:
        Constant Field Values
      • ROOF_FLAG_DESTINATION

        public static final int ROOF_FLAG_DESTINATION
        Flag for roof removal to remove the roofs above the player's destination tile.
        See Also:
        Constant Field Values
      • ROOF_FLAG_BETWEEN

        public static final int ROOF_FLAG_BETWEEN
        Flag for roof removal to remove the roofs that are above any tile between the camera and the player.
        See Also:
        Constant Field Values
      • OVERWORLD_MAX_Y

        public static final int OVERWORLD_MAX_Y
        The height of the overworld, in tiles. Coordinates above this are in caves and other such zones.
        See Also:
        Constant Field Values
      • CLIENT_TICK_LENGTH

        public static final int CLIENT_TICK_LENGTH
        The number of milliseconds in a client tick.

        This is the length of a single frame when the client is running at the maximum framerate of 50 fps.

        See Also:
        Constant Field Values
      • GAME_TICK_LENGTH

        public static final int GAME_TICK_LENGTH
        The number of milliseconds in a server game tick.

        This is the length of a single game cycle under ideal conditions. All game-play actions operate within multiples of this duration.

        See Also:
        Constant Field Values
      • ITEM_SPRITE_WIDTH

        public static final int ITEM_SPRITE_WIDTH
        Width of a standard item sprite
        See Also:
        Constant Field Values
      • ITEM_SPRITE_HEIGHT

        public static final int ITEM_SPRITE_HEIGHT
        Height of a standard item sprite
        See Also:
        Constant Field Values
    • Constructor Detail

      • Constants

        public Constants()