Castle Defense VR

Castle Defense VR is a game built for the HTC Vive using Unreal Engine 4, where the player would use a bow and arrow to prevent his or her castle from being over taken by monsters!



Here is a screenshot of the game:

The biggest challenge was getting the bow and arrow mechanics to work decently. Here were some things I had to think about:

How does the physics of a bow work?

How fast should an arrow travel after being shot when the bow string is pull back at a certain distance?

How do I make sure the arrow fires from the correct position relative to the bow and at the right direction?

How do I properly draw the bow string?

What scale should I make the bow and arrow so that it looks real in VR?


After a lot of reserach, watching tutorials, and trial and error, I found that the velocity at which an arrow travels relative to the bow string draw length is exponential, and not scalar.

However, it varies across different bows. Neverthess, after tried several expoential powers, the power of 2.2 felt the most proper, and so I went with that one.


Furture plans:

I hope to eventually make a full blown VR game based off of this project and release it on Steam in the coming months!