https://github.com/ondiekelijah/google-dino-game-py
https://github.com/ondiekelijah/google-dino-game-py
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ondiekelijah/google-dino-game-py
- Owner: ondiekelijah
- Created: 2025-01-30T11:30:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-01-30T11:58:19.000Z (3 months ago)
- Last Synced: 2025-01-30T12:29:01.936Z (3 months ago)
- Language: Python
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Building Chrome's Dinosaur Game with Python and Pygame
## Prerequisites
### Required Software
- Python 3.x (Download from [python.org](https://python.org](https://www.python.org/downloads/)))
- pip (Python package installer, comes with Python)
- Code editor of your choice (VS Code recommended)
- Git installed and set up (Optional) (Download from [Git](https://python.org](https://www.python.org/downloads/](https://git-scm.com/downloads))))## Setting Up Your Development Environment
Navigate to your projects directory
### Clone the Starter Repository
```bash
git clone https://github.com/ondiekelijah/gdg-on-campus.git dino-game-project
```
### Navigate into the folder```bash
cd dino-game-project
```
All commands and project files mentioned in this guide should be executed/created inside this folder. Once inside the folder, you can open your terminal (Command Prompt on Windows or Terminal on Mac/Linux) and proceed with the next steps.### Creating a Virtual Environment
```bash
# Windows
python -m venv dino-game-env# Linux/Mac
python3 -m venv dino-game-env
```### Why Virtual Environments are Important
Virtual environments are crucial for Python development because they:
1. Keep project dependencies isolated from other projects
2. Prevent conflicts between different package versions
3. Make your project more portable and easier to share
4. Allow you to maintain a clean and organized development environment### Activating the Virtual Environment
```bash
# Windows
source dino-game-env/Scripts/activate# Linux/Mac
source dino-game-env/bin/activate
```### Installing Required Packages
```bash
pip install pygame
```## Project Structure
Create a new directory for your project with the following structure:
```
dino-game/
├── dino-game-env
├── main.py
├── README.md
└── requirements.txt
```### Creating Requirements File
```bash
pip freeze > requirements.txt
```## Starting the Script
```bash
# Make sure your virtual environment is activated
python main.py
```# Reference
- https://github.com/steeeved/Dino-Game