Get ready to sweat and smash in this action-packed VR workout game! With a racket in each hand, you'll face a barrage of flaming tennis balls flying toward you. Your goal? Hit as many as you can with speed and precision! Track your performance with real-time stats, including your average score and personal best. Built to keep you moving and improve your skills, this immersive VR experience combines fitness and fun in an unforgettable challenge!
🌟 Intro to the Game
🎮 Intro Script 🚀
This is what some of you will see when you begin to play the game. There will be more details when played in the correct environment. This part focuses on scene navigation, displaying the best score, and initiating gameplay with user input. Here's an overview of its key features:
🎾Key Features:
🌟 Best Score Display:
Fetches the player’s best score from the PlayerPrefs to show it in the intro scene. If it's the player's first time, a welcome message is displayed.
🕹️ Input Handling for Game Start:
The game listens for user input via the L/R Index Triggers (or the B key on the keyboard) to transition to the next scene, where the workout session begins.
Scene Transition: Once the user interacts, the script loads the Workout_Loading scene, starting the VR workout experience.
🔄 Developer’s Reset Feature:
A cheat code has been implemented for developers, allowing them to reset the best score by pressing a combination of buttons ( X + A on VR controllers or the C key on the keyboard). This resets the score and reloads the intro scene.
👾Technical Breakdown:
Scene Management: Utilizes SceneManager to navigate between different scenes (Workout_Loading and Workout_Intro).
User Experience: Ensures that players see a personalized message and easily transition into the main game.
Debugging and Development Tools: The cheat feature is specifically designed to aid the development and testing process.
This script enhances user engagement by managing score visibility and smooth scene transitions, making the VR experience more dynamic and interactive. ✨
🏋️‍♂️ Loading ScReen 🎮
⏳ Loading ScRipt 🌀
This Loading Script ensures a smooth transition between scenes in your VR workout game. It handles the background loading of the main workout scene while the player sees the intro or loading screen.
🎾Key Features:
🔄 Asynchronous Scene Loading:
The script utilizes SceneManager.LoadSceneAsync to load the main workout scene ("Workout_Main") in the background. This prevents any delays or freezes during scene transitions, providing a seamless experience for the player.
🚀 Smooth Scene Transition:
By loading the scene asynchronously, the game doesn't interrupt the player’s experience and allows for a more efficient flow from the intro to the main gameplay.
👾Technical Breakdown:
Asynchronous Loading:
AsyncOperation handles the loading process, ensuring the game can move to the next scene without freezing or pausing the game.
This script is crucial for maintaining performance and user engagement as it allows for a smooth and responsive gameplay experience. ✨
💥Main Game Screen🎮
This VR workout game 🏋️‍♂️ challenges players to catch flying objects 🎯 using hand-tracking ✋ and haptic feedback 🤖. It tracks scores 📊, updates success rates 📈, and compares performance to previous bests 🏅, all within immersive scenes 🎮 and dynamic gameplay ⚡.
Catch Me script
Gameplay Mechanics 🎮💥
This script handles the interaction between the player’s hands and the flying objects in the VR workout game. It tracks catches using both hands, manages the scoring system, and triggers haptic feedback to enhance immersion. The CatchMeScript ensures objects are destroyed upon collision with the player's hands, updating the player's success rate.
🏃‍♂️ Real-time Hand Tracking: Accurate detection of hand collisions with flying objects.
🤚 Dual Hand Play: Tracks catches for both right and left hands separately.
⚡ Instant Feedback: Vibrations for haptic feedback and real-time performance tracking.
🔄 Score Management: Displays shots, hits, and success percentage.
🚪Wall Script ➡️
 The Wall Script manages the interactions between the flying objects and the walls in the VR workout game. It detects collisions and, when an object tagged as "CatchMe" hits the wall, it destroys that object to maintain the game's dynamics. 
The script also tracks the total number of shots fired and determines when the maximum shot count is reached. Upon reaching the shot limit, the script invokes the Endgame function, which calculates the player's performance by comparing their score to the best score and updates it if necessary. Finally, it transitions the player to the Endgame scene for the conclusion of the round.
📊App Manager Script🎯
💨Object Generation & Physics 🌀
The AppManager script dynamically generates flying objects at random intervals and positions. Each object is given a force to simulate realistic physics, allowing for a variety of flight paths. The script tracks the number of shots fired and ensures the game progresses smoothly toward the maximum shot count.
🏃‍♂️ Dynamic Object Spawning: Randomly generates objects at different positions.
💪 Realistic Physics Simulation: Objects are given random forces to simulate realistic movement.
⏱️ Timed Progression: Objects are generated at random intervals, creating an unpredictable and engaging experience.
🏅Score Board🏅
The Endgame Script in my portfolio manages the game's final phase, displaying key performance metrics such as the player's hit percentage, best score, and hand-specific catch scores. It retrieves and updates these values from PlayerPrefs, ensuring a personalized experience. The script also facilitates scene transitions, allowing the player to restart the game or return to the intro scene using specific controller inputs or keyboard shortcuts. This functionality adds flexibility for gameplay and testing.
🎯End Game Script🥅
Key Technologies:
PlayerPrefs: Used to store and retrieve player scores and settings between sessions.
TextMeshPro: A Unity component for rendering high-quality text, used here to display scores and percentages.
Scene Management: SceneManager.LoadScene is used to switch between scenes in Unity, particularly for restarting the game or resetting progress.
OVR Input: Used to handle inputs from VR controllers (like the Oculus Touch controllers), allowing users to trigger game actions (e.g., restarting the game or resetting the score).
Come take a look!
You can find this project and many more in my Github repositories!
Back to Top