pac-dude/core/src/com/me/pacman/Constants.java

45 lines
1.6 KiB
Java

package com.me.pacman;
import com.me.pacman.entity.Direction;
public final class Constants {
public static final String TITLE = "Pac-Dude";
public static final String VERSION = "v0.1.0";
public static final boolean DEBUG = false;
// Pixels
public static final int TILE_SIZE = 8;
// The size of the original Pac-Man game in 8x8 pixel tiles
public static final int GAME_WIDTH_TILES = 28;
public static final int GAME_HEIGHT_TILES = 36;
// The game window width and height - arbitrary units (in this case, matches up with the pixel
// counts of the original Pacman.
public static final int GAME_WIDTH = GAME_WIDTH_TILES * TILE_SIZE;
public static final int GAME_HEIGHT = GAME_HEIGHT_TILES * TILE_SIZE;
// Pac-man level rendering position offset in game coordinates
public static final int LEVEL_OFFSET_X = 0;
public static final int LEVEL_OFFSET_Y = 2 * TILE_SIZE;
// 100% speed in tiles (8 pixel / tile) per second. roughly 75 pixels/second
// 75 pixels/second aligns with the per-frame pixel movement steps in:
// https://github.com/masonicGIT/pacman/blob/master/pacman.js
// and is close to the 75.75757625 pixels/second claimed in:
// https://pacman.holenet.info/#LvlSpecs
public static final float FULL_SPEED = 9.375f;
// Ghost spawn directions, should remain constant assuming they always exit the ghost house
// from the top
public static final Direction[] GHOST_SPAWN_DIRS = {
Direction.LEFT, // Blinky
Direction.UP, // Pinky
Direction.DOWN, // Inky
Direction.DOWN, // Clyde
};
}