Mercurial > rinkhals
annotate gamelib/constants.py @ 392:bb75979b58e6
Move game_over logic from gameboard to level, for later reworking
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 01 Nov 2009 21:08:43 +0000 |
parents | 463802281182 |
children | 8104e82afd7a |
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) |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
18 BG_COLOR = (0, 0, 0) |
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
19 |
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
|
20 # 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
|
21 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
|
22 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
|
23 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
|
24 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
|
25 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
|
26 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
27 # 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
|
28 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
29 DEFAULT_STARTING_CASH = 1000 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
30 DEFAULT_SELL_PRICE_CHICKEN = 10 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
31 DEFAULT_SELL_PRICE_EGG = 5 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
32 DEFAULT_SELL_PRICE_DEAD_FOX = 15 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
33 DEFAULT_TURN_LIMIT = 14 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
34 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
|
35 |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
36 DEFAULT_MAX_FOXES = 50 |
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 # 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
|
39 |
131 | 40 LOGGING_PRICE = 50 |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
41 BUY_PRICE_FENCE = 50 |
66
edc15ce8fa30
Implement fence selling (a bit hackish, but fine for now).
Simon Cross <hodgestar@gmail.com>
parents:
64
diff
changeset
|
42 SELL_PRICE_FENCE = 25 |
77
65958516c7d9
Implement separate fence repair cost (currently 25 groats).
Simon Cross <hodgestar@gmail.com>
parents:
66
diff
changeset
|
43 REPAIR_PRICE_FENCE = 25 |
227
b9782f622006
Allow selling of broken fences.
Simon Cross <hodgestar@gmail.com>
parents:
164
diff
changeset
|
44 SELL_PRICE_BROKEN_FENCE = 5 |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
45 |
389
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
46 # Toolbar constants |
463802281182
Add basic level support (level choosing needs work)
Neil Muller <drnlmuller@gmail.com>
parents:
383
diff
changeset
|
47 |
52
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
48 TOOL_SELL_CHICKEN = 1 |
0d4799866bcf
Sell chickens and buy fences.
Jeremy Thurgood <firxen@gmail.com>
parents:
6
diff
changeset
|
49 TOOL_SELL_EGG = 2 |
64
99fbb652ce8d
Refactor buildings so that new ones can be added just by adding a class to buildings.py.
Simon Cross <hodgestar@gmail.com>
parents:
60
diff
changeset
|
50 TOOL_SELL_BUILDING = 3 |
378
71f5897ac5ef
Fences are now buildings, with appropriate (but ugly) UI changes.
Jeremy Thurgood <firxen@gmail.com>
parents:
346
diff
changeset
|
51 TOOL_REPAIR_BUILDING = 4 |
105
7910b4e01dba
Add chicken moving tool and start of animal placement.
Simon Cross <hodgestar@gmail.com>
parents:
90
diff
changeset
|
52 TOOL_PLACE_ANIMALS = 5 |
131 | 53 TOOL_LOGGING = 6 |
164
ab90040013a7
Implement equipment selling.
Simon Cross <hodgestar@gmail.com>
parents:
158
diff
changeset
|
54 TOOL_SELL_EQUIPMENT = 7 |
139
1d73de63bd71
Add basic game over screen
Neil Muller <drnlmuller@gmail.com>
parents:
131
diff
changeset
|
55 |
1d73de63bd71
Add basic game over screen
Neil Muller <drnlmuller@gmail.com>
parents:
131
diff
changeset
|
56 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
|
57 |
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
|
58 |