I had played some Vive demos and tried developing for the Vive, and I discovered that one of the most fun interactions was throwing objects and seeing the world react. My original thought was to create a puzzle game involving throwing, but then I realized this idea fit basketball fairly naturally. So now I'm going to aim for a simple basketball game and hopefully add a lot of polish to the core gameplay.
Since I don't think I can fit the entire basketball court in the roomscale space, I thought I would just make use of a half-court space so that the player has freedom of movement in the entire "basketball" world. Where they could legally go in a real basketball game, they should be able to move here, which should help with the immersion.
Ideally, players can throw the basketball at the hoop to try to score points for their team, and I hope to add competent AI players for both sides to make an engaging experience. I also hope to add fun gimmicks to scoring.
In terms of ideas for working with the roomscale space, I am thinking that the hoops should dissolve and form up on the other side when there is a change in possession, so that the player won't have to "move" to the other side of the court, which they can't really do. With this idea, they can switch sides easily, and it's their responsibility to get in offensive or defensive position when the time comes.
Also, since players need to dribble all the time, I want to remove that burden and potentially unnecessary motion by making the basketball automatically dribble and bounce towards your controller. You would hold the trigger to pick up to aim the ball and release with force to throw it.
What it does
Currently, all you can do is bounce the basketball (although there's a "net", you can't throw it). I focused primarily on the feel of the basketball, and still wasn't able to get it right yet.
How I built it
There is a trigger collider attached to the controller, and when the player touches the ball, whether from catching or dribbling, it will automatically attach to the hand.
Then, when the player makes a downward motion, the basketball will un-parent itself and, with some extra force, be sent towards the floor matching the player's motion. When the basketball hits the floor, it will orient itself towards the player's current hand position and fly towards that position.
Challenges I ran into
It is very difficult to emulate the core feeling of bouncing a basketball. Despite focusing only on that experience, I still haven't succeeded.
Accomplishments that I'm proud of
I chose to design the game towards a more casual audience and focus on one of my favourite actions in virtual reality: throwing things. I've learned that it's important to make the core actions fun, so I focused on that, with the goal of adding gameplay around the fun dribbling and throwing.
While I didn't manage to make it in time for this submission, I'm glad to have been able to utilize haptics and sound, as well as basketball AI, to create an experience that is passably interesting.
What I learned
Sounds and haptics are huge parts of an experience, and getting them right is crucial to immersion. I am struggling with using TriggerHapticPulse(), but hope to understand it enough to shape it to fit my intended experience.
What's next for Basketball
More work on the dribbling experience, shooting, and then design a game around dribbling and shooting that encourages a player to dribble and move.