Velocity Dash is a high-octane, minimalist infinite runner built with Python and Pygame. While the mechanics are simple, the focus is on juicy Visual Effects (VFX) and smooth movement physics. Whether you're a developer looking to study Pygame VFX or a player looking for a quick challenge, this project is designed to be lightweight and easy to get running. 🚀
Don't worry if you've never touched Python before. Follow these steps exactly and you'll be playing in under 2 minutes.
-
Prerequisites
- Make sure you have Python 3.10+ installed.
- Windows: Download from https://python.org. Crucial: check the box that says "Add Python to PATH" during installation.
- macOS / Linux: Usually pre-installed. Check with:
python3 --version
- Make sure you have Python 3.10+ installed.
-
Setup & Run
Open your terminal (or CMD) and run these commands:Windows
# Create and enter a virtual environment python -m venv venv venv\Scripts\activate # Install requirements pip install pygame # Launch the game python main.py
macOS / Linux
python3 -m venv venv source venv/bin/activate pip install pygame python3 main.py
Action — Key
- Start Game — ENTER ⏯
- Move Left / Right — A / D ⬅️➡️
- Jump / Double Jump — W
⤴️ - Dash (Fast Move) — SPACE ⚡️
- Ground Slam — S (while in mid-air)
⤵️ - Pause / Resume — P ⏸/
▶️ - Exit — ESC ❌
Goal: Keep running, land on platforms, and avoid falling off-screen. Score increases over time.
The project is modular. If you want to tweak the gameplay, you don't need to dig through hundreds of lines of code—just open settings.py:
- Physics: Adjust
GRAVITY,JUMP_POWER, orPLAYER_SPEED. - Visuals: Change
THEMES(colors) orPLAYER_SHAPES. - Performance: If the game lags, set
PERFORMANCE_MODE = Trueinmain.pyto cap the VFX count.
Want to send the game to a friend who doesn't have Python? You can bundle everything into a folder:
-
Install PyInstaller:
pip install pyinstaller
-
Run the helper script:
- Double-click
runner.bator run it from CMD:runner.bat
- Double-click
-
Check the
dist/VelocityDash_Final/(ordist/DayiRunner_Final/) folder for your executable.
- "No module named pygame": Your virtual environment isn't active. Run
venv\Scripts\activate(Windows) orsource venv/bin/activate(macOS / Linux), thenpip install pygame. - "Black Screen": This usually happens with certain display scaling or fullscreen settings. Open
main.pyand ensurepygame.SCALEDis used in theset_modefunction instead ofFULLSCREEN, or remove fullscreen flags. - No Sound / mixer errors: The game includes a silent fallback mode for missing assets, but if you see mixer initialization errors, update audio drivers or try a smaller buffer. Ensure
pygame.mixer.pre_init(...)runs beforepygame.init()(the code usually does).
- Feel free to fork this, add new obstacles, or improve the VFX.
- License: MIT — free to use, modify, and distribute.
- Assets: If you add custom sprites or audio to the
assets/folder, the game will automatically detect and use them.
- Lower resolution or set
PERFORMANCE_MODE = Trueinmain.pyto improve performance on low-end machines. - If building with PyInstaller, run
runner.batin a terminal to see log output. If antivirus flags the executable, temporarily whitelist the output folder during testing.
If you want, I can:
- Add an MIT LICENSE file to the repo. 🧾
- Create a small placeholder
assets/pack (one image + one sound) so the game has default visuals and audio. 🖼️🔊 - Produce a one-line runnable script to auto-create & activate venv, install pygame, and launch the game. ⌨️
Tell me which of the above you'd like next and I will prepare it.