Getting started and common questions
Option A: Download ZIP (any OS)
Download from Download page and extract the archive.
Option B: Windows Installer
Download and run the installer from the Download page (skip to "How to run" if using installer).
Option C: Git clone (any OS)
git clone https://github.com/legoman0701/drift_race_test.git
cd drift_race_test
Windows (PowerShell):
# From the project root
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Linux / macOS:
# From the project root
python3 -m venv .venv
source .venv/bin/activate
Option A: Install from requirements.txt
pip install -r requirements.txt
Option B: Install in editable mode
pip install -e .
Troubleshooting: If Pygame-CE fails to build wheels, update pip and retry:
python -m pip install --upgrade pip
# Then try installing again
pip install -r requirements.txt
Note: On some systems, you may need to use python3 and pip3 instead of python and pip.
Important: Make sure your virtual environment is activated before running the game! See "How to install" for activation commands, or check "Can't activate venv?" below for alternatives.
python -m drift
python -m drift.app
Host a room:
python -m drift.app --mode host --code ABCD --name YourName
Join a room:
python -m drift.app --mode join --code ABCD --name YourName
Notes: Hosting acts as the server. Others join via the code shown in the UI. A relay is used to help with NAT traversal. On some systems, use python3 instead of python.
Run unins000.exe located in the game installation folder to uninstall the game.
# Deactivate and remove the virtual environment
Deactivate
Remove-Item -Recurse -Force .venv
Then simply delete the project folder.
Drift Race requires pygame-ce (Community Edition) for optimal performance. Regular pygame may cause significantly lower FPS.
# Uninstall regular pygame first
pip uninstall pygame
# Install pygame-ce
pip install pygame-ce
Make sure your virtual environment is active before running the game. This ensures you're using the correct dependencies.
Windows:
# Activate the virtual environment
.\.venv\Scripts\Activate.ps1
# Then run the game
python -m drift
Linux / macOS:
# Activate the virtual environment
source .venv/bin/activate
# Then run the game
python3 -m drift
Windows:
# Check which pygame version is installed
pip list | Select-String pygame
# Should show: pygame-ce (not pygame)
Linux / macOS:
# Check which pygame version is installed
pip list | grep pygame
# Should show: pygame-ce (not pygame)
Note: If you're still experiencing issues after these steps, make sure you have Python 3.11 or 3.12 installed, and that all requirements from requirements.txt are properly installed in your virtual environment.
If you can't activate your virtual environment or prefer not to, you can run commands directly using the full path to the Python and pip executables inside the venv.
# Install packages
.\.venv\Scripts\pip.exe install -r requirements.txt
# Run the game
.\.venv\Scripts\python.exe -m drift
# Install packages
.venv/bin/pip install -r requirements.txt
# Run the game
.venv/bin/python -m drift
Note: On some systems, the executables might be named python3 and pip3 instead of python and pip. If one doesn't work, try the other.