Inspiration
Earth is a stressful place, and sometimes I feel like hopping on a spaceship, heading off to the stars, and leaving it all behind. Sadly, I can’t hop onto spaceship in real life as of yet, so I made a game where I can.
What it does
Ad Lunam is a space exploration game, where you can fly your spaceship through a solar system and explore the different planets.
How I built it
Ad Lunam was made in the Unity editor, and the game was ported into VR using the Unity Mock HMD Loader Plugin, which displayed the game in stereoscopic (2 eyes) view. Since I don't have the money for a $1000 VR headset, I used a cheap Walmart VR Viewer and my phone.
By using the Unity Remote 5 app on my phone, I could take the gyroscopic input of the phone and use it to determine how my head was moving, and then turn the in game camera. This created a VR effect. Then, by using the keyboard, I could move around and interact, giving me all the functionality of an HTC Vive or Oculus without spending all the money.
In order to get the planets to orbit one another, I used the C# scripts from this repository.
Challenges I ran into
The toughest part of this was actually getting the VR to work. I was struggling to figure out how to get the phone and computer to communicate and extract that communication data using C#. Eventually, I got it to work, and it was only two lines of code:
Input.gyro.enabled = true;
transform.Rotate ((initialOrientationX -Input.gyro.rotationRateUnbiased.x)*6, (initialOrientationY -Input.gyro.rotationRateUnbiased.y)*6, (initialOrientationZ + Input.gyro.rotationRateUnbiased.z)*6);
Accomplishments that I'm proud of
This was my first time working on a real Unity game, and I am very proud of the results. Making the game itself was an ordeal, but the most rewarding part was being able to put on my $5 VR headset and play the game as if I was using an Oculus Rift.
What I learned
I learned how the Unity game engine works, and also how to budget time wisely. In addition, I learned how to simulate using a real VR Headset with just a phone and a cheap VR viewer, which I can apply to any first person Unity game I make in the future.
What's next for Ad Lunam
I hope to add procedural generation to the planets, and maybe some small procedurally generated animals as well.
I uploaded the non VR version of this game, so I'll add the link for it here and at the bottom. https://bearseascape.itch.io/ad-lunam



Log in or sign up for Devpost to join the conversation.