https://github.com/vinamrasaurav/crazy-robber
A Python/Pygame stealth game where you navigate a thief through procedurally generated levels while avoiding watchmen. Collect coins and reach the exit without getting caught.
https://github.com/vinamrasaurav/crazy-robber
ai astar-pathfinding bfs game python
Last synced: over 1 year ago
JSON representation
A Python/Pygame stealth game where you navigate a thief through procedurally generated levels while avoiding watchmen. Collect coins and reach the exit without getting caught.
- Host: GitHub
- URL: https://github.com/vinamrasaurav/crazy-robber
- Owner: VinamraSaurav
- License: mit
- Created: 2025-03-22T22:04:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-22T22:22:57.000Z (over 1 year ago)
- Last Synced: 2025-03-22T23:24:32.525Z (over 1 year ago)
- Topics: ai, astar-pathfinding, bfs, game, python
- Language: Python
- Homepage:
- Size: 107 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚨 Crazy Robber 🚨
**Crazy Robber** is an exciting 2D game where you control a clever robber navigating through a maze-like city, avoiding watchmen, collecting treasures, and escaping safely. The game features dynamic obstacles, increasing difficulty, and a score-based system.
---
## 🛠️ **Features**
✅ Smooth and interactive player movement.
✅ Randomly moving watchmen as dynamic obstacles.
✅ Collectible treasures to increase the score.
✅ Collision detection with police cars and boundaries.
✅ Game over screen with final score and replay option.
✅ Clean and modular code structure.
---
## 🎮 **How to Play**
1. **Move the Robber:** Use the arrow keys (`↑`, `↓`, `←`, `→`) to move the robber across the map.
2. **Avoid Watchmen:** Dodge the watchmen moving randomly on the screen.
3. **Collect Treasures:** Pick up treasures to increase your score.
4. **Escape or Survive:** The goal is to collect as many treasures as possible while avoiding the police.
---
## 🖥️ **Installation and Execution**
1. **Clone the repository:**
```bash
git clone
cd crazy-robber
```
2. **Install dependencies:**
Make sure you have `pygame` installed. If not, install it using:
```bash
pip install pygame
```
3. **Run the game:**
```bash
python main.py
```
---
## 📦 **Folder Structure**
```
/crazy-robber
├── assets/ # Contains images, sounds, and game assets
├── main.py # Entry point of the game
├── game.py # All components of game are assembled here
├── pathfinding.py # Algorithms used like bfs and a star
├── robber.py # Player character (robber) logic
├── watchman.py # Police car (dynamic obstacle) logic
├── coin.py # Treasure collectible logic
├── utils.py # Helper functions
├── constants.py # Game config
├── wall.py # Static obstacles
├── grid.py # Grid login
├── metrics.py # Game analysis logic
├── README.md # Project documentation
└── requirements.txt # List of dependencies
```
---
## 🛠️ **Technologies Used**
- Python 🐍
- Pygame 🎮
- Object-oriented programming (OOP) principles
---
## 🚀 **Future Improvements**
- ✅ Add more challenging levels with different city layouts.
- ✅ Introduce power-ups for temporary invincibility or speed boosts.
- ✅ Include a main menu and settings screen.
- ✅ Add sound effects and background music.
---
## 📝 **License**
This project is licensed under the MIT License.
Feel free to modify and enhance it as you like! 🎉