zombie-escape 1.12.0__tar.gz → 1.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/PKG-INFO +41 -15
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/README.md +40 -14
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/__about__.py +1 -1
- zombie_escape-1.13.1/src/zombie_escape/__main__.py +7 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/colors.py +22 -14
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/entities.py +756 -147
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/entities_constants.py +35 -14
- zombie_escape-1.13.1/src/zombie_escape/export_images.py +296 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/__init__.py +2 -1
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/constants.py +6 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/footprints.py +4 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/interactions.py +19 -7
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/layout.py +103 -34
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/movement.py +85 -5
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/spawn.py +139 -90
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/state.py +18 -9
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/survivors.py +13 -2
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/utils.py +40 -21
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/level_blueprints.py +256 -19
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/locales/ui.en.json +12 -2
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/locales/ui.ja.json +12 -2
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/models.py +14 -7
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/render.py +149 -37
- zombie_escape-1.13.1/src/zombie_escape/render_assets.py +889 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/render_constants.py +27 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screens/game_over.py +14 -3
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screens/gameplay.py +72 -14
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screens/title.py +18 -7
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/stage_constants.py +51 -15
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/zombie_escape.py +24 -1
- zombie_escape-1.12.0/src/zombie_escape/render_assets.py +0 -594
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/.gitignore +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/LICENSE.txt +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/pyproject.toml +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/__init__.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/assets/fonts/Silkscreen-Regular.ttf +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/assets/fonts/misaki_gothic.ttf +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/config.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/font_utils.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay/ambient.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/gameplay_constants.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/input_utils.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/level_constants.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/localization.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/progress.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/rng.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screen_constants.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screens/__init__.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/screens/settings.py +0 -0
- {zombie_escape-1.12.0 → zombie_escape-1.13.1}/src/zombie_escape/world_grid.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zombie-escape
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.13.1
|
|
4
4
|
Summary: Top-down zombie survival game built with pygame.
|
|
5
5
|
Project-URL: Homepage, https://github.com/tos-kamiya/zombie-escape
|
|
6
6
|
Author-email: Toshihiro Kamiya <kamiya@mbj.nifty.com>
|
|
@@ -57,7 +57,8 @@ This game is a simple 2D top-down action game where the player aims to escape by
|
|
|
57
57
|
- **Pause:** `P`/Start or `ESC`/Select
|
|
58
58
|
- **Quit Game:** `ESC`/Select (from pause)
|
|
59
59
|
- **Restart:** `R` key (on Game Over/Clear screen)
|
|
60
|
-
- **Window/Fullscreen
|
|
60
|
+
- **Window/Fullscreen:** `[` to shrink, `]` to enlarge, `F` to toggle fullscreen
|
|
61
|
+
- **FPS Overlay:** Launch with `--show-fps` (implied by `--debug`)
|
|
61
62
|
- **Time Acceleration:** Hold either `Shift` key or `R1` to run the entire world 4x faster; release to return to normal speed.
|
|
62
63
|
|
|
63
64
|
## Title Screen
|
|
@@ -72,6 +73,9 @@ At the title screen you can pick a stage:
|
|
|
72
73
|
- **Stage 4: Evacuate Survivors** — start fueled, find the car, gather nearby civilians, and escape before zombies reach them. Stage 4 sprinkles extra parked cars across the map; slamming into one while already driving fully repairs your current ride and adds five more safe seats.
|
|
73
74
|
- **Stage 5: Survive Until Dawn** — every car is bone-dry. Endure until the sun rises while the horde presses in from every direction. Once dawn hits, outdoor zombies carbonize and you must walk out through an existing exterior gap to win; cars remain unusable.
|
|
74
75
|
|
|
76
|
+
Stages 6+ unlock after clearing Stages 1–5. On the title screen, use left/right to select later stages.
|
|
77
|
+
Open the Stage 6+ description: [docs/stages-6plus.md](docs/stages-6plus.md)
|
|
78
|
+
|
|
75
79
|
**Stage names are red until cleared** and turn white after at least one clear.
|
|
76
80
|
|
|
77
81
|
An objective reminder is shown at the top-left during play.
|
|
@@ -93,30 +97,52 @@ Open **Settings** from the title to toggle gameplay assists:
|
|
|
93
97
|
|
|
94
98
|
### Characters/Items
|
|
95
99
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
#### Characters
|
|
101
|
+
|
|
102
|
+
| Name | Image | Notes |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| Player | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/player.png" width="64"> | Blue circle with small hands. |
|
|
105
|
+
| Zombie (Normal) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/zombie-normal.png" width="64"> | Chases the player once detected. |
|
|
106
|
+
| Car | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/car.png" width="64"> | Driveable escape vehicle with durability. |
|
|
107
|
+
| Buddy (Stage 3) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/buddy.png" width="64"> | A green survivor you can rescue. |
|
|
108
|
+
| Survivors (Stage 4) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/survivor.png" width="64"> | Civilians to evacuate by car. |
|
|
109
|
+
|
|
110
|
+
- **Player:** Controlled with the WASD or arrow keys. When carrying fuel a tiny yellow square appears near the sprite so you can immediately see whether you're ready to drive.
|
|
111
|
+
- **Zombie:** When out of sight, the zombie's movement mode will randomly switch every certain time (moving horizontally/vertically only, side-to-side movement, random movement, etc.).
|
|
112
|
+
- **Car:**
|
|
101
113
|
- The car has durability. Durability decreases when colliding with internal walls or hitting zombies.
|
|
102
114
|
- If durability reaches 0, the car is destroyed and you are dumped on foot; you must track down another parked car hidden in the level.
|
|
103
115
|
- When you're already driving, ramming a parked car instantly restores your current car's health. On Stage 4 this also increases the safe passenger limit by five.
|
|
104
116
|
- After roughly 5 minutes of play, a small triangle near the player points toward the objective: fuel first (Stage 2 before pickup), car after fuel is collected (Stage 2/3), or car directly (Stage 1/4).
|
|
105
|
-
-
|
|
106
|
-
- **Outer Walls:** Walls surrounding the stage that are nearly indestructible. Each side has at least three openings (exits).
|
|
107
|
-
- **Inner Walls:** Beige walls randomly placed inside the building. Inner wall segments each have durability. **The player can break these walls** by repeatedly colliding with a segment to reduce its durability; when it reaches 0, the segment is destroyed and disappears. Zombies can also wear down walls, but far more slowly. The car cannot break walls.
|
|
108
|
-
- **Flashlight:** Each pickup expands your visible radius by about 20% (grab two to reach the max boost).
|
|
109
|
-
- **Steel Beam (optional):** A square post with crossed diagonals; same collision as inner walls but with triple durability. Spawns independently of inner walls (may overlap them). If an inner wall covers a beam, the beam appears once the wall is destroyed.
|
|
110
|
-
- **Fuel Can (Stages 2 & 3):** A yellow jerrycan that only spawns on the fuel-run stages. Pick it up before driving the car; once collected the on-player indicator appears until you refuel the car.
|
|
111
|
-
- **Buddy (Stage 3):** A green circle survivor with a blue outline who spawns somewhere in the building and waits.
|
|
117
|
+
- **Buddy (Stage 3):**
|
|
112
118
|
- Zombies only choose to pursue the buddy if they are on-screen; otherwise they ignore them.
|
|
113
119
|
- If a zombie tags the buddy off-screen, the buddy quietly respawns somewhere else instead of ending the run.
|
|
114
120
|
- Touch the buddy on foot to make them follow you (at 70% of player speed). Touch them while driving to pick them up.
|
|
115
|
-
-
|
|
121
|
+
- If you bash an inner wall or steel beam, the buddy will drift toward that spot and help chip away at it.
|
|
122
|
+
- **Survivors (Stage 4):**
|
|
116
123
|
- They stand still until you get close, then shuffle toward you at about one-third of player speed.
|
|
117
124
|
- Zombies can convert them if both are on-screen; the survivor shouts a line and turns instantly.
|
|
118
125
|
- They only board the car; your safe capacity starts at five but grows by five each time you sideswipe a parked car while already driving. Speed loss is based on how full the car is relative to that capacity, so extra slots mean quicker getaways.
|
|
119
126
|
|
|
127
|
+
#### Items
|
|
128
|
+
|
|
129
|
+
| Name | Image | Notes |
|
|
130
|
+
| --- | --- | --- |
|
|
131
|
+
| Flashlight | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/flashlight.png" width="64"> | Each pickup expands your visible radius by about 20% (grab two to reach the max boost). |
|
|
132
|
+
| Fuel Can (Stages 2 & 3) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/fuel.png" width="64"> | Must be collected before driving the car in fuel-run stages. |
|
|
133
|
+
| Steel Beam (optional) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/steel-beam.png" width="64"> | Same collision as inner walls but with triple durability. |
|
|
134
|
+
|
|
135
|
+
#### Environment
|
|
136
|
+
|
|
137
|
+
| Name | Image | Notes |
|
|
138
|
+
| --- | --- | --- |
|
|
139
|
+
| Outer Wall | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/wall-outer.png" width="64"> | Nearly indestructible; each side has exits. |
|
|
140
|
+
| Inner Wall | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/wall-inner.png" width="64"> | Breakable by the player; zombies chip away slowly. |
|
|
141
|
+
|
|
142
|
+
- **Walls:** Outer walls are gray; inner walls are beige.
|
|
143
|
+
- **Outer Walls:** Walls surrounding the stage that are nearly indestructible. Each side has at least three openings (exits).
|
|
144
|
+
- **Inner Walls:** Beige walls randomly placed inside the building. Inner wall segments each have durability. **The player can break these walls** by repeatedly colliding with a segment to reduce its durability; when it reaches 0, the segment is destroyed and disappears. Zombies can also wear down walls, but far more slowly. The car cannot break walls.
|
|
145
|
+
|
|
120
146
|
### Win/Lose Conditions
|
|
121
147
|
|
|
122
148
|
- **Win Condition:** Escape the stage (level) boundaries while inside the car.
|
|
@@ -28,7 +28,8 @@ This game is a simple 2D top-down action game where the player aims to escape by
|
|
|
28
28
|
- **Pause:** `P`/Start or `ESC`/Select
|
|
29
29
|
- **Quit Game:** `ESC`/Select (from pause)
|
|
30
30
|
- **Restart:** `R` key (on Game Over/Clear screen)
|
|
31
|
-
- **Window/Fullscreen
|
|
31
|
+
- **Window/Fullscreen:** `[` to shrink, `]` to enlarge, `F` to toggle fullscreen
|
|
32
|
+
- **FPS Overlay:** Launch with `--show-fps` (implied by `--debug`)
|
|
32
33
|
- **Time Acceleration:** Hold either `Shift` key or `R1` to run the entire world 4x faster; release to return to normal speed.
|
|
33
34
|
|
|
34
35
|
## Title Screen
|
|
@@ -43,6 +44,9 @@ At the title screen you can pick a stage:
|
|
|
43
44
|
- **Stage 4: Evacuate Survivors** — start fueled, find the car, gather nearby civilians, and escape before zombies reach them. Stage 4 sprinkles extra parked cars across the map; slamming into one while already driving fully repairs your current ride and adds five more safe seats.
|
|
44
45
|
- **Stage 5: Survive Until Dawn** — every car is bone-dry. Endure until the sun rises while the horde presses in from every direction. Once dawn hits, outdoor zombies carbonize and you must walk out through an existing exterior gap to win; cars remain unusable.
|
|
45
46
|
|
|
47
|
+
Stages 6+ unlock after clearing Stages 1–5. On the title screen, use left/right to select later stages.
|
|
48
|
+
Open the Stage 6+ description: [docs/stages-6plus.md](docs/stages-6plus.md)
|
|
49
|
+
|
|
46
50
|
**Stage names are red until cleared** and turn white after at least one clear.
|
|
47
51
|
|
|
48
52
|
An objective reminder is shown at the top-left during play.
|
|
@@ -64,30 +68,52 @@ Open **Settings** from the title to toggle gameplay assists:
|
|
|
64
68
|
|
|
65
69
|
### Characters/Items
|
|
66
70
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
#### Characters
|
|
72
|
+
|
|
73
|
+
| Name | Image | Notes |
|
|
74
|
+
| --- | --- | --- |
|
|
75
|
+
| Player | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/player.png" width="64"> | Blue circle with small hands. |
|
|
76
|
+
| Zombie (Normal) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/zombie-normal.png" width="64"> | Chases the player once detected. |
|
|
77
|
+
| Car | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/car.png" width="64"> | Driveable escape vehicle with durability. |
|
|
78
|
+
| Buddy (Stage 3) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/buddy.png" width="64"> | A green survivor you can rescue. |
|
|
79
|
+
| Survivors (Stage 4) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/survivor.png" width="64"> | Civilians to evacuate by car. |
|
|
80
|
+
|
|
81
|
+
- **Player:** Controlled with the WASD or arrow keys. When carrying fuel a tiny yellow square appears near the sprite so you can immediately see whether you're ready to drive.
|
|
82
|
+
- **Zombie:** When out of sight, the zombie's movement mode will randomly switch every certain time (moving horizontally/vertically only, side-to-side movement, random movement, etc.).
|
|
83
|
+
- **Car:**
|
|
72
84
|
- The car has durability. Durability decreases when colliding with internal walls or hitting zombies.
|
|
73
85
|
- If durability reaches 0, the car is destroyed and you are dumped on foot; you must track down another parked car hidden in the level.
|
|
74
86
|
- When you're already driving, ramming a parked car instantly restores your current car's health. On Stage 4 this also increases the safe passenger limit by five.
|
|
75
87
|
- After roughly 5 minutes of play, a small triangle near the player points toward the objective: fuel first (Stage 2 before pickup), car after fuel is collected (Stage 2/3), or car directly (Stage 1/4).
|
|
76
|
-
-
|
|
77
|
-
- **Outer Walls:** Walls surrounding the stage that are nearly indestructible. Each side has at least three openings (exits).
|
|
78
|
-
- **Inner Walls:** Beige walls randomly placed inside the building. Inner wall segments each have durability. **The player can break these walls** by repeatedly colliding with a segment to reduce its durability; when it reaches 0, the segment is destroyed and disappears. Zombies can also wear down walls, but far more slowly. The car cannot break walls.
|
|
79
|
-
- **Flashlight:** Each pickup expands your visible radius by about 20% (grab two to reach the max boost).
|
|
80
|
-
- **Steel Beam (optional):** A square post with crossed diagonals; same collision as inner walls but with triple durability. Spawns independently of inner walls (may overlap them). If an inner wall covers a beam, the beam appears once the wall is destroyed.
|
|
81
|
-
- **Fuel Can (Stages 2 & 3):** A yellow jerrycan that only spawns on the fuel-run stages. Pick it up before driving the car; once collected the on-player indicator appears until you refuel the car.
|
|
82
|
-
- **Buddy (Stage 3):** A green circle survivor with a blue outline who spawns somewhere in the building and waits.
|
|
88
|
+
- **Buddy (Stage 3):**
|
|
83
89
|
- Zombies only choose to pursue the buddy if they are on-screen; otherwise they ignore them.
|
|
84
90
|
- If a zombie tags the buddy off-screen, the buddy quietly respawns somewhere else instead of ending the run.
|
|
85
91
|
- Touch the buddy on foot to make them follow you (at 70% of player speed). Touch them while driving to pick them up.
|
|
86
|
-
-
|
|
92
|
+
- If you bash an inner wall or steel beam, the buddy will drift toward that spot and help chip away at it.
|
|
93
|
+
- **Survivors (Stage 4):**
|
|
87
94
|
- They stand still until you get close, then shuffle toward you at about one-third of player speed.
|
|
88
95
|
- Zombies can convert them if both are on-screen; the survivor shouts a line and turns instantly.
|
|
89
96
|
- They only board the car; your safe capacity starts at five but grows by five each time you sideswipe a parked car while already driving. Speed loss is based on how full the car is relative to that capacity, so extra slots mean quicker getaways.
|
|
90
97
|
|
|
98
|
+
#### Items
|
|
99
|
+
|
|
100
|
+
| Name | Image | Notes |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| Flashlight | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/flashlight.png" width="64"> | Each pickup expands your visible radius by about 20% (grab two to reach the max boost). |
|
|
103
|
+
| Fuel Can (Stages 2 & 3) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/fuel.png" width="64"> | Must be collected before driving the car in fuel-run stages. |
|
|
104
|
+
| Steel Beam (optional) | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/steel-beam.png" width="64"> | Same collision as inner walls but with triple durability. |
|
|
105
|
+
|
|
106
|
+
#### Environment
|
|
107
|
+
|
|
108
|
+
| Name | Image | Notes |
|
|
109
|
+
| --- | --- | --- |
|
|
110
|
+
| Outer Wall | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/wall-outer.png" width="64"> | Nearly indestructible; each side has exits. |
|
|
111
|
+
| Inner Wall | <img src="https://raw.githubusercontent.com/tos-kamiya/zombie-escape/main/imgs/exports/wall-inner.png" width="64"> | Breakable by the player; zombies chip away slowly. |
|
|
112
|
+
|
|
113
|
+
- **Walls:** Outer walls are gray; inner walls are beige.
|
|
114
|
+
- **Outer Walls:** Walls surrounding the stage that are nearly indestructible. Each side has at least three openings (exits).
|
|
115
|
+
- **Inner Walls:** Beige walls randomly placed inside the building. Inner wall segments each have durability. **The player can break these walls** by repeatedly colliding with a segment to reduce its durability; when it reaches 0, the segment is destroyed and disappears. Zombies can also wear down walls, but far more slowly. The car cannot break walls.
|
|
116
|
+
|
|
91
117
|
### Win/Lose Conditions
|
|
92
118
|
|
|
93
119
|
- **Win Condition:** Escape the stage (level) boundaries while inside the car.
|
|
@@ -2,7 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
def _clamp(value: float) -> int:
|
|
7
|
+
return max(0, min(255, int(value)))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# Basic palette.
|
|
6
11
|
WHITE: tuple[int, int, int] = (255, 255, 255)
|
|
7
12
|
BLACK: tuple[int, int, int] = (0, 0, 0)
|
|
8
13
|
RED: tuple[int, int, int] = (255, 0, 0)
|
|
@@ -13,8 +18,6 @@ LIGHT_GRAY: tuple[int, int, int] = (200, 200, 200)
|
|
|
13
18
|
YELLOW: tuple[int, int, int] = (255, 255, 0)
|
|
14
19
|
ORANGE: tuple[int, int, int] = (255, 165, 0)
|
|
15
20
|
DARK_RED: tuple[int, int, int] = (139, 0, 0)
|
|
16
|
-
TRACKER_OUTLINE_COLOR: tuple[int, int, int] = (170, 70, 220)
|
|
17
|
-
WALL_FOLLOWER_OUTLINE_COLOR: tuple[int, int, int] = (140, 140, 140)
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
@dataclass(frozen=True)
|
|
@@ -32,10 +35,6 @@ class EnvironmentPalette:
|
|
|
32
35
|
outer_wall_border: tuple[int, int, int]
|
|
33
36
|
|
|
34
37
|
|
|
35
|
-
def _clamp(value: float) -> int:
|
|
36
|
-
return max(0, min(255, int(value)))
|
|
37
|
-
|
|
38
|
-
|
|
39
38
|
def _adjust_color(
|
|
40
39
|
color: tuple[int, int, int], *, brightness: float = 1.0, saturation: float = 1.0
|
|
41
40
|
) -> tuple[int, int, int]:
|
|
@@ -56,6 +55,7 @@ DEFAULT_AMBIENT_PALETTE_KEY = "default"
|
|
|
56
55
|
NO_FLASHLIGHT_PALETTE_KEY = "no_flashlight"
|
|
57
56
|
DAWN_AMBIENT_PALETTE_KEY = "dawn"
|
|
58
57
|
|
|
58
|
+
|
|
59
59
|
# Base palette used throughout gameplay (matches the previous constants).
|
|
60
60
|
_DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
61
61
|
floor_primary=(43, 57, 70),
|
|
@@ -72,10 +72,14 @@ _DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
72
72
|
# Dark, desaturated palette that sells the "alone without a flashlight" vibe.
|
|
73
73
|
_GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
74
74
|
floor_primary=_adjust_color(
|
|
75
|
-
_DEFAULT_ENVIRONMENT_PALETTE.floor_primary,
|
|
75
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_primary,
|
|
76
|
+
brightness=0.8,
|
|
77
|
+
saturation=0.75,
|
|
76
78
|
),
|
|
77
79
|
floor_secondary=_adjust_color(
|
|
78
|
-
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary,
|
|
80
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary,
|
|
81
|
+
brightness=0.8,
|
|
82
|
+
saturation=0.75,
|
|
79
83
|
),
|
|
80
84
|
fall_zone_primary=_adjust_color(
|
|
81
85
|
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary,
|
|
@@ -88,10 +92,14 @@ _GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
88
92
|
saturation=0.75,
|
|
89
93
|
),
|
|
90
94
|
outside=_adjust_color(
|
|
91
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outside,
|
|
95
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outside,
|
|
96
|
+
brightness=0.8,
|
|
97
|
+
saturation=0.75,
|
|
92
98
|
),
|
|
93
99
|
inner_wall=_adjust_color(
|
|
94
|
-
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall,
|
|
100
|
+
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall,
|
|
101
|
+
brightness=0.8,
|
|
102
|
+
saturation=0.75,
|
|
95
103
|
),
|
|
96
104
|
inner_wall_border=_adjust_color(
|
|
97
105
|
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border,
|
|
@@ -99,7 +107,9 @@ _GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
99
107
|
saturation=0.75,
|
|
100
108
|
),
|
|
101
109
|
outer_wall=_adjust_color(
|
|
102
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall,
|
|
110
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall,
|
|
111
|
+
brightness=0.8,
|
|
112
|
+
saturation=0.75,
|
|
103
113
|
),
|
|
104
114
|
outer_wall_border=_adjust_color(
|
|
105
115
|
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
|
|
@@ -181,8 +191,6 @@ __all__ = [
|
|
|
181
191
|
"YELLOW",
|
|
182
192
|
"ORANGE",
|
|
183
193
|
"DARK_RED",
|
|
184
|
-
"TRACKER_OUTLINE_COLOR",
|
|
185
|
-
"WALL_FOLLOWER_OUTLINE_COLOR",
|
|
186
194
|
"DAWN_AMBIENT_PALETTE_KEY",
|
|
187
195
|
"INTERNAL_WALL_COLOR",
|
|
188
196
|
"INTERNAL_WALL_BORDER_COLOR",
|