Change target FPS and rescale things to match
[tabakrolletjie.git] / tabakrolletjie / constants.py
1 """ Game constants.
2 """
3
4 import os
5
6 TITLE = "Space Turnips"
7
8 # Debug
9 DEBUG = os.environ.get("TABAK_DEBUG", "").lower() in ("1", "y", "yes")
10 DRAW_FPS = os.environ.get("TABAK_DRAW_FPS", "").lower() in ("1", "y", "yes")
11 # Intervals to average fps over
12 FPS_FRAMES = 50
13
14 # 704 is 768 minus space for window decorations :)
15 SCREEN_SIZE = (1024, 704)
16
17 # Frame per second
18 FPS = 30
19
20 # Night length in ticks
21 NIGHT_LENGTH = 1500
22
23 # Pymunk categories
24 OBSTACLE_CATEGORY = 1 << 0
25 LIGHT_CATEGORY = 1 << 1
26 MOULD_CATEGORY = 1 << 2
27 FITTINGS_CATEGORY = 1 << 3
28 TURNIP_CATEGORY = 1 << 4
29
30 # Font definitions
31 FONTS = {
32     'sans': 'DejaVuSans.ttf',
33     'bold': 'DejaVuSans-Bold.ttf',
34 }
35
36 # Sound stuff
37 FREQ = 44100
38 BITSIZE = -16
39 CHANNELS = 2
40 BUFFER = 1024
41 DEFAULT_VOLUME = 1.0
42
43 NO_SOUND = os.environ.get("TABAK_NO_SOUND", "").lower() in ("1", "y", "yes")
44
45 # Color constants
46 COLOURS = {
47     "red": (255, 0, 0),
48     "green": (0, 255, 0),
49     "blue": (0, 0, 255),
50     "cyan": (0, 255, 255),
51     "yellow": (255, 255, 0),
52     "magenta": (255, 0, 255),
53     "white": (255, 255, 255),
54 }