Skip to main content

1st VR Project Blog2 - Bowling on Oculus Quest!

Hello everyone,

This week we are finishing our VR Bowling game. In order to make it look fancier we wanted to add some textures, background, add animated hands instead of cubes... But first things first, we still need to solve last week's problem: The score counter issue.

As we explained on the most recent post, we struggled on counting the score, which should equal the amount of pins knocked down. At first, we considered that a pin was knocked down if its position dropped under a certain height. That gave us a lot of problems and it seemed like it was counting every pin several times. To solve it, we created an array where the pins were listed as they fell, and before adding them to the score we made sure that they weren't already in the list. This way we managed to have a functional score counter.

To check the code you can have a look at it on our github repo, to make it easier and quicker to understand we've prepared a flow chart where you can see the main idea behind the code:



Okay, this looks good!

But let's try to get closer to actual bowling adding a 2nd ball...

Again, if you want to see the code behind it, check our github repo, for a quick over view here's the logic flow chart's evolution:




As you can see, we now have 2 tries to knock as many pins as we can.

Now that the game is up and running we can focus on the esthetics. We added a wooden texture to the alley to give it a classier look, changed the background sky to a more suitable one and last but not least, we changed the cubes we were using until now as hands to a white hand shaped 3d animated model that allows the player to have a way more immersive experience.

This is how the final result looks like:




You can check our code on github: https://github.com/Yasin-0109/VR-BOWLING

That's it for today's blog, we will be doing another project in VR for the next 2 weeks so keep checking the blog to stay updated!

Comments