view mamba/constants.py @ 166:bea4857487de

Game state and level list
author Stefano Rivera <stefano@rivera.za.net>
date Wed, 14 Sep 2011 00:38:08 +0200
parents 9afea431af36
children 986e72d2cb4d
line wrap: on
line source

from pygame.locals import K_ESCAPE, K_q

# Display constants
SCREEN = (800, 600)
EDIT_SCREEN = (1000, 600)
TILE_SIZE = (20, 20)

# Miscellaneous constants
NAME = "Unamed Mamba game"
FPS = 60

# Sound constants
FREQ = 44100   # same as audio CD
BITSIZE = -16  # unsigned 16 bit
CHANNELS = 2   # 1 == mono, 2 == stereo
BUFFER = 1024  # audio buffer size in no. of samples

# Keyboard constants
ESCAPE_KEYS = (K_ESCAPE, K_q)

# For easy access later
DEFAULT_FONT = 'DejaVuSans.ttf'
FONT_SIZE = 16

# Colours
FOCUS_COLOR = 'yellow'
COLOR = 'black'

# Default command-line options
DEFAULTS = {
    'debug': False,
    'sound': True,
    'level': None,
    'edit': False,
    'save_location': None,  # Determined by a function in options
}