We were obsessed. Countless hours moving a mouse frenetically.
That’s the time when the “blaming the gear” habit started off, at a young age… Like “Oh, I didn’t make it because the mouse wasn’t reacting. It got stuck!”
Remember the old mice, before optical ones came around? Dust would get into the hole and the ball wouldn’t roll properly. And get stuck.
Except, most of the times, it didn’t. But it was always a good excuse. We were competitive…
We were playing that game, the first one I played on the Commodore Amiga. It was called Marble Madness.
Never heard of it? There’s a video of a speed run of it here.
Oh, I’m pretty sure I never finished it. I failed at the last level. Pretty pathetic, I know…
But here’s the thing.
I’ve messed up with you brain. Yes, that’s right.
I’ve told you about an old-style game from the 80’s, using primitive graphics and mouse control. So you’ve got this old school gaming image in your head.
And now, I’m gonna ask you to make a jump to today. Forget the 8-bit generation, the mouse and monitor. Just… keep the ball in mind.
Here comes “Mind the Ball”!
Here’s how it works.
You put your VR headset on and get transported to a virtual factory. Around you, you can see boxes, an assembly line, even an observation platform. For the manager, you know. There are a few cupboards and other storage furniture.
But never mind that.
In front of you, you can see a platform. And on it, in a receptacle, a shiny sliver ball.
And there, on your left, two floating stars.
Now, what’s that?
On the floor, you notice a big target! Next to it, big red letters say: “Goal”.
What is that crazy place?
How can you get out of here?
It will all become clear, be patient…
As you explore, you find notes written on the walls and floor.
Thanks to them, you quickly understand that you need to throw the ball to collect the two stars and reach the goal.
How do you do that?
By placing different structures in the world, like ramps, then throwing the ball on them to let it roll to victory.
Now, back to reality.
Mind the Ball is a puzzle game, a Rube Goldberg type of challenge, where build a structure to solve the puzzle and win the level.
I created that game as part of Udacity’s nano degree. It was my first game for the HTC Vive and building it was a lot of fun!
I enjoyed messing around with the environment and trying different game physics. I had a great time building various challenges for each level, making the most of trampolines, fans and teleporters.
It’s a bit of a move from Marble Madness, we’ve gone a long way in the last 33 years! The ball is still there, and you’ve got to reach a goal. What’s this obsession with balls?
It reminds me that we built a physical version of Marble Madness, with legos and a metallic ball. And that version is much closer to Mind the Ball. I digress…
If you want to get started in designing experiences and games for high end VR systems, like the HTC Vive, read on. It might interest you.
Here’s the final result, which you can witness in the video below.
The player can access objects from their inventory and place them in the virtual world. Then, they can grab them and move them around with their motion controller.
By placing objects in the right place, they can then throw the ball from the designated platform onto ramps to collect both stars and reach the goal.
Simples!
Now, here’s some background on Rube Goldberg machines.
Rube Goldberg was an American cartoonist and inventor (among other roles).
He’s known for his cartoons of complicated machines used to perform simple tasks.
And he inspired a series of games, like the board game Mouse Trap, but also video games like The Incredible Machine.
And closer to home, a Fantastic Contraption, a very successful traditional video game, became a VR experience, with obvious links to our game here.
Building crazy machines is a lot of fun and taps into our creative spirit, as we enjoy solving puzzles in creative ways.
And because VR immerses you fully in a 3D world, it’s a great medium to build crazy machines and watch them do their work.
Ok, here the machines are not that crazy, but the three dimensionality of the experience makes a real difference to the enjoyment and feel.
Here’s a break down of the process to create it.
The basic elements of the game I started with were 5 different blocks:
Then, you have the stars, starting platform and the goal. Plus a few obstacles to make it more interesting for the player.
With that in hand I first sketched 3 different levels (puzzles) for the player to solve. As usual, pen and paper did the job.
Here, since the 3D models and environment were already provided through the course, the sketches were enough to get started building the game.
Here are the elements needed to get the game working:
I won’t go into the details of the code here. But you’ll notice that having simple behaviors for each object makes the whole game much more manageable. You separate it into chunks that you implement individually, before bringing everything together and testing the system.
And the beauty of game engines is that you can test each element in isolation as you go along. You can also test it with friends as your game progresses.
Here I didn’t do any beta testing since the rules of the game were pretty strict for the course.
For a commercial game, of course, the story would be different. You’d need at least to test the difficulty of the game, to check if the progression of puzzles is right or needs to be adjusted (if too easy or too hard).
As you can see in the video, the teleport system is not strictly a teleport, but more of a dash-forward one. When the player presses the touchpad of the Vive controller, a laser comes out of the controller, with a cylinder to show the destination of the dash. When the touchpad is released the player dashes forward to its new destination.
Today, the dashing system moves the whole “room” the player stands in to a different location. And the issue is, unless the player is in the center of the room, it will feel that the dash is “off” by a meter or two. Why?
Because the center of the room is teleporter to the laser targeted destination. So if the player is two meters away from the center of the room, he’ll end up two meters away from the destination after dashing. Which will feel off.
Because a teleport system fades out your position to then fade in the new position, being off center isn’t too bad. But when you dash, it’s much more noticeable.
The advantage of a dash is that the player is less disoriented than with a teleport. When teleported, their brain needs a second to get used to their new position.
To solve this problem, you’d have to offset the position of whole “room” being teleported by the relative position of the player to the center of the room.
Something to implement for my next game…
The menu system is pretty simple. You click on the right or left hand side of the trackpad to scroll through the different elements of the menu (inventory). And if you press the trigger button, the element gets placed in the world.
You can then manipulate the element by grabbing them with the controller, by pressing the trigger button.
The same mechanism works for grabbing the ball. The difference is when the player releases the trigger, the ball gets thrown with the velocity of the motion controller. It mimicks throwing a ball with your hand with a certain force.
The bouncy material is easy to create with Unity and it’s a matter of altering the right physics material.
Object triggers and code handle the behaviors of the fan and teleporters. It took a bit of fiddling to get it right, but it wasn’t much hassle.
Finally the game management elements to load level, keep track of stars collected and preventing cheating are pieces of code handling those game mechanics.
Oh yes, and at the end I also added a few sounds to make the world more realistic (e.g. trampoline, teleporter). And some music to keep the player energized.
That was my first application for the HTC Vive. And it took me back 30 years ago.
Coming from mobile VR, developing for the Vive is a mind-blowing experience!
When you’re walking around your creation, picking up and playing with your objects, it feels like you’re sent back to the first day you tried high-end VR. You feel like a kid again. You’re in awe.
You get a sense of limitless potential.
It was a lot of fun building Mind the Ball and it reinforces my conviction that 6 DOF (Degrees Of Freedom) is the future of VR. But to get there, we’ll still need all the help we can get. And that includes making it accessible to a majority of people through mobile VR.
Please share your comments