Mercurial > rinkhals
annotate gamelib/constants.py @ 457:fc648da2334c
Fix position cache removal, slightly optimise chicken range check.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 23 Nov 2009 16:12:37 +0000 |
parents | f04a2490c35f |
children | 45e03793d41e |
rev | line source |
---|---|
5 | 1 """Operation Fox Assault constants.""" |
2 | |
6
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
3 # Project metadata |
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
4 |
5 | 5 NAME = "Operation Fox Assault" |
6 | |
7 AUTHORS = [ | |
8 ("Adrianna Pinska", "adrianna.pinska@gmail.com"), | |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
9 ("Jeremy Thurgood", "firxen+rinkhals@gmail.com"), |
5 | 10 ("Neil Muller", ""), |
11 ("Simon Cross", "hodgestar+rinkhals@gmail.com"), | |
12 ] | |
6
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
13 |
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
14 # GUI constants |
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
15 |
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
16 SCREEN = (800, 600) |
c0abad23a055
Add start, quit and toggle fullscreen buttons to menu.
Simon Cross <hodgestar@gmail.com>
parents:
5
diff
changeset
|
17 FG_COLOR = (255, 255, 255) |
397
532f1ea476ff
Make foxes enter buildings, with a seperate count for them
Neil Muller <drnlmuller@gmail.com>
parents:
393
diff
changeset
|
18 PREDATOR_COUNT_COLOR = (255, 100, 0) # Approximately fox coloured |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
19 BG_COLOR = (0, 0, 0) |
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
20 |
90
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
21 # Mixer constants |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
22 FREQ = 44100 # same as audio CD |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
23 BITSIZE = -16 # unsigned 16 bit |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
24 CHANNELS = 2 # 1 == mono, 2 == stereo |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
25 BUFFER = 1024 # audio buffer size in no. of samples |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
26 FRAMERATE = 30 # how often to check if playback has finished |
23a8b2e49e9f
Added ability to initialize sound and play sounds, and handle sound not working / file being missing etc
David Fraser <davidf@sjsoft.com>
parents:
80
diff
changeset
|
27 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
28 # Default values that can be overridden by the levels |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
29 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
30 DEFAULT_STARTING_CASH = 1000 |
428
a356e57529ea
buildings cost wood
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
397
diff
changeset
|
31 DEFAULT_STARTING_WOOD = 0 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
32 DEFAULT_SELL_PRICE_CHICKEN = 10 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
33 DEFAULT_SELL_PRICE_EGG = 5 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
34 DEFAULT_SELL_PRICE_DEAD_FOX = 15 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
35 DEFAULT_TURN_LIMIT = 14 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
36 DEFAULT_GOAL_DESC = 'Survive for 2 weeks' |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
37 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
38 DEFAULT_MAX_FOXES = 50 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
39 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
40 # Game constants, still to be made configurable |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
41 |
131 | 42 LOGGING_PRICE = 50 |
438
16437cf4a2b8
Trees provide a modicum of cover.
Jeremy Thurgood <firxen@gmail.com>
parents:
433
diff
changeset
|
43 WOODLAND_CONCEALMENT = 10 |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
44 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
45 # Toolbar constants |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
46 |
447
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
47 TOOL_SELECT_CHICKENS = 1 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
48 TOOL_SELL_CHICKEN = 2 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
49 TOOL_SELL_EGG = 3 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
50 TOOL_SELL_BUILDING = 4 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
51 TOOL_REPAIR_BUILDING = 5 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
52 TOOL_PLACE_ANIMALS = 6 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
53 TOOL_LOGGING = 7 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
54 TOOL_SELL_EQUIPMENT = 8 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
55 TOOL_BUY_BUILDING = 9 |
f04a2490c35f
The sub-toolbar rewrite, the finally not crashing version
Neil Muller <drnlmuller@gmail.com>
parents:
438
diff
changeset
|
56 TOOL_BUY_EQUIPMENT = 10 |
139
1d73de63bd71
Add basic game over screen
Neil Muller <drnlmuller@gmail.com>
parents:
131
diff
changeset
|
57 |
1d73de63bd71
Add basic game over screen
Neil Muller <drnlmuller@gmail.com>
parents:
131
diff
changeset
|
58 NIGHT_LENGTH = 150 |
312
dd1ffee5ccf5
Use different score tables fot the different modes. Refactor game modes code as a result
Neil Muller <drnlmuller@gmail.com>
parents:
227
diff
changeset
|
59 |
433
8643893635e7
Seperate toolbar and gameboard
Neil Muller <drnlmuller@gmail.com>
parents:
428
diff
changeset
|
60 TILE_DIMENSIONS = (20, 20) |
8643893635e7
Seperate toolbar and gameboard
Neil Muller <drnlmuller@gmail.com>
parents:
428
diff
changeset
|
61 TOOLBAR_WIDTH = 140 |