The Virtual Running Game is an interactive and engaging simulation where players can experience a virtual running track through keyboard interactions. The game includes a front-facing video to simulate the runner's view and a side video to enhance realism. The gameplay involves increasing the runner's speed by pressing the right arrow key and running for a total duration of 30 seconds.
- Front-facing and side-facing video simulations.
- Dynamic video speed adjustments based on player interaction.
- Speed and distance tracking.
- Game duration of 30 seconds with results displayed at the end.
- Custom starting screen with "GET READY... GET SET... AND RUN!" sequence.
- Python: Core programming language.
- Pygame: Used for game development and video playback.
- OpenCV: Used for video processing.
- Custom Font: JlsdatagothicRnc.otf for in-game text.
- Python 3.x
- Pygame
- OpenCV
- A system capable of running multimedia applications smoothly.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create and activate a virtual environment:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Place the video and font files:
- Place your video files in the
static/video
directory. - Place your custom font file in the
static/font
directory.
- Place your video files in the
-
Run the game:
python stop_and_go.py
-
Game Start:
- The game starts when the player presses the
space
key. - Any other key press before pressing
space
will not start the game.
- The game starts when the player presses the
-
Gameplay:
- The player increases the runner's speed by pressing the
right
arrow key. - The player's speed and total distance covered are displayed on the screen.
- The game runs for a total of 30 seconds.
- The player increases the runner's speed by pressing the
-
Game End:
- After 30 seconds, the game displays the total distance covered and the maximum speed achieved for 7 seconds.
- The game then returns to the starting screen, ready for a new session.
-
Game Initialization:
- The game begins with a starting screen showing a video with "GET READY... GET SET... AND RUN!".
-
Running Simulation:
- Press the
space
key to start the game. - Increase your speed by repeatedly pressing the
right
arrow key.
- Press the
-
Viewing Results:
- After 30 seconds, view your total distance and maximum speed displayed on the screen for 7 seconds.
-
Restarting the Game:
- After viewing the results, the game returns to the starting screen, ready for another run.
- Ensure your system has the necessary hardware to handle video processing for an optimal experience.
- The game speed adjustments are based on the intervals between your key presses, creating a dynamic running experience.
Contributions to the Virtual Running Game are welcome! Feel free to open issues or submit pull requests to enhance the game further.
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright (c) Ademord Studio 2024