Top-down zombie survival game built with pygame.
Project description
Zombie Escape
The city is overrun with zombies! You fled the horde, taking refuge in an abandoned factory.
Inside, it's a maze. They won't get in easily. But you have no weapons. Night has fallen. The power's out, plunging the factory into darkness.
Your only tool: a single flashlight. A car... somewhere inside... it's your only hope.
Pierce the darkness and find the car! Then, escape this nightmare city!
Overview
This game is a simple 2D top-down action game where the player aims to escape by finding and driving a car out of a large building infested with zombies. The player must evade zombies, break through walls to find a path, and then escape the building in a car.
Controls
- Player/Car Movement:
W/↑(Up),A/←(Left),S/↓(Down),D/→(Right) - Enter Car: Overlap the player with the car.
- Quit Game:
ESCkey - Restart:
Rkey (on Game Over/Clear screen) - Window Scale (title/settings only):
[to shrink,]to enlarge
Settings (Title Screen)
Open Settings from the title to toggle gameplay assists:
- Footprints: Leave breadcrumb trails so you can backtrack in the dark.
- Fast zombies: Allow faster zombie variants; each zombie rolls a random speed between the normal and fast ranges.
- Car hint: After a delay, show a small triangle pointing toward the fuel (Stage 2 before pickup) or the car.
- Flashlight pickups: Enable flashlight spawns that expand your visible radius when collected.
- Steel beams: Adds tougher single-cell obstacles (5% density) that block movement; hidden when stacked with an inner wall until that wall is destroyed.
Game Rules
Stages
At the title screen you can pick a stage:
- Stage 1: Find the Car — locate the car and drive out.
- Stage 2: Fuel Run — find a fuel can first, pick it up, then find the car and escape.
- Stage 3: Rescue Buddy — find your stranded buddy, grab fuel, pick them up with the car, then escape together.
An objective reminder is shown at the top-left during play.
Characters/Items
- Player: A blue circle. Controlled with the WASD or arrow keys.
- Zombie: A red circle. Will chase the player (or car) once detected.
- 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.).
- Car: A yellow rectangle. The player can enter by making contact with it.
- The car has durability. Durability decreases when colliding with internal walls or hitting zombies.
- If durability reaches 0, the car is destroyed, and the player is ejected.
- When the car is destroyed, a new car will respawn at a random location within the stage.
- 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), or car directly (Stage 1).
- Walls: Outer walls are gray; inner walls are beige.
- Outer Walls: Walls surrounding the stage that are nearly indestructible. Each side has at least three openings (exits).
- 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. The car cannot break walls.
- Flashlight: Picking one up boosts your visible radius by 35%.
- 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.
- Fuel Can (Stage 2): A yellow jerrycan. Pick it up before driving the car.
- Buddy (Stage 3): A green circle survivor who spawns somewhere in the building and waits.
- Zombies only choose to pursue the buddy if they are on-screen; otherwise they ignore them.
- If a zombie tags the buddy off-screen, the buddy quietly respawns somewhere else instead of ending the run.
- Touch the buddy on foot to make them follow you (at 70% of player speed). Touch them while driving to pick them up.
Win/Lose Conditions
- Win Condition: Escape the stage (level) boundaries while inside the car.
- Stage 2 also requires that you have collected the fuel can before driving out.
- Stage 3 requires both fuel and having picked up your buddy with the car before driving out.
- Lose Condition:
- The player is touched by a zombie while not inside a car.
- In Stage 3, if your buddy is caught (when visible), it's game over.
- (Note: In the current implementation, the game does not end immediately when the car is destroyed. The player can search for another car and continue trying to escape.)
How to Run
Requirements: Python 3.10 or higher
Install using pipx:
pipx install zombie-escape
Alternatively, you can install using pip in a virtual environment:
pip install zombie-escape
Launch using the following command line:
zombie-escape
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
Acknowledgements
Significant assistance for many technical implementation and documentation aspects of this game's development was received from Google's large language model, Gemini (accessed during development), and from OpenAI's GPT-5. This included generating Python/Pygame code, suggesting rule adjustments, providing debugging support, and creating this README. Their rapid coding capabilities and contributions to problem-solving are greatly appreciated.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zombie_escape-0.9.1.tar.gz.
File metadata
- Download URL: zombie_escape-0.9.1.tar.gz
- Upload date:
- Size: 15.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
decb61269a286fe1c94a0dd0ade7f6be1e906a4d754aaf0e32cf60396b8ddd57
|
|
| MD5 |
a1b30a308179eee654c7cf955af9d46f
|
|
| BLAKE2b-256 |
36c2c7d810011143b1cb1a4261988b537c97c8b735f4caaab57407bafeddc1d3
|
File details
Details for the file zombie_escape-0.9.1-py3-none-any.whl.
File metadata
- Download URL: zombie_escape-0.9.1-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92c272c95e1c47dc51883be8def8c8544e6d260114ceae024b8e767371698068
|
|
| MD5 |
50c7ed9f98f25dfd87a9f6802575129f
|
|
| BLAKE2b-256 |
326ead873494071ec3948f02677983bf7baeadd4160b64a5d8a0311872e2f8a1
|