Welcome to the MotionRacer This endless runner-style game features a dynamic car racing experience where you navigate through a highway filled with obstacles and collect power-ups.
In this game, you control a car that drives on a three-lane highway. The goal is to avoid obstacles, collect power-ups, and achieve the highest score possible. The game speed increases over time, making it more challenging as you progress.
- Endless Racing: Enjoy a continuous racing experience with gradually increasing difficulty.
- Dynamic Obstacles: Encounter a variety of obstacles on the road that you need to avoid.
- Power-Ups: Collect power-ups to gain temporary advantages like shields and speed boosts.
- Scoring System: Earn points based on distance traveled and obstacles avoided.
- Leaderboards: Compete with other players and share your high scores.
- Controls: Use touch controls to switch lanes and maneuver your car and gestures as well
- Objective: Avoid obstacles, collect power-ups, and survive as long as possible to achieve a high score.
Follow these steps to set up and run the MotionRacer on your local machine:
- C++ Compiler: Ensure you have a C++ compiler installed (e.g., GCC or Clang).
- CMake: Required for building the project. Install it from CMake’s website.
- SFML: The Simple and Fast Multimedia Library (SFML) is used for graphics, window management, and input handling.
- Mediapipe: Required for handtracking and gesture recognition.
- Download SFML:
- Visit the SFML download page and download the SFML SDK for Windows.
-
Extract the SDK:
-
Extract the downloaded file to a directory of your choice (e.g., C:\SFML).
- Set Up SFML in Your Development Environment:
Install SFML via Homebrew:
brew install sfml
Install SFML via apt :
sudo apt-get install libsfml-dev
The easiest way to install MediaPipe is through pip:
pip install mediapipe
If you want to customize or contribute to MediaPipe, you can build and install it from source:
git clone https://github.com/google/mediapipe.git
cd mediapipe
Make sure you have the following dependencies installed:
pip install opencv-contrib-python
Before running make sure to use your ipaddress in hand_tracking_server.py file and Car.cpp file (intializeSocket() function) To view your IP Adress in local machine:
- Viewing Internal (Local) IP Address
Open the Command Prompt:
Press Win + R, type cmd, and hit Enter. Run the following command:
ipconfig
Look for the IPv4 Address under your active network connection. This is your local IP address.
Open the Terminal:
For macOS: Press Command + Space, type Terminal, and hit Enter. For Linux: Open the Terminal from your system menu. Run the following command:
ifconfig
or
ip addr show
Look for the inet field under your active network interface (usually eth0, wlan0, or en0). The address shown is your local IP.
Before running the cpp Project. You have to run the hand_tracking_server.py file on your command prompt for establishing connection. You may even have to change your port number in rare cases.
Clone the Repository:
git clone https://github.com/mythrhyth/handMotionRacer.git
cd handMotionRacer
If you encounter errors related to SFML:
Ensure SFML is correctly installed and the environment variables are set up properly. Check the SFML documentation or community forums for help with specific issues. If the build fails:
Make sure you have all necessary development tools and libraries installed. Review any error messages for missing dependencies or misconfigurations. Additional Notes Configuration Files: Ensure that any configuration files or assets required by the game are present in the assets/ directory or as specified in the source code. Dependencies: The game depends on SFML, so ensure it's properly linked during the build process.
For support, email [email protected] [email protected] [email protected] [email protected]