Tag Archives: Leap Motion

Bang The Chains!

Bang The Chains!

I’ve uploaded the final submission of VR Discs Of Golf to the Leap Motion 3D Jam. It’s probably not super applicable to you if you don’t have an Oculus Rift and Leap Motion controller, but I’ll be adding gamepad controls, Cardboard, and non-VR support after the 3D Jam so that everyone can play it.

Screenshot6

You can download it and vote for it here: VR Discs Of Golf submission page

Lessons Learned

It was a pretty fun project, and I learned quite a bit from it. Plus, I got to write some custom physics code for the discs. I’ll go ahead and dump whatever I can remember right now into this post for posterity.

“Free” Hardware

When I first heard about this 3D Jam just over a month ago, I was told that anybody who submitted a project would receive the Leap Motion controller for free. If I only consider the $80 cost, then I easily made less than 69¢ an hour. Of course, having a playable game is a much bigger payoff than the hardware.

I had decided to make a disc golf game while I was reading about the hardware, since I know a bunch of avid disc golfers and hadn’t really seen many disc golf games before. Unfortunately, after I received the controller I realized that the hand positions for disc golf are pretty much the worst they can be for motion tracking. So, the controls are a bit simplified for now.

Custom Physics Code

This was easily the highlight of the project. I haven’t written custom physics code in several years and it was great to get back to it. I read quite a few papers about disc physics and pulled together the parts that were sensible. Being the internet, there are a bunch of people who like to talk a lot about things that they don’t actually understand. Ultimately, I found myself taking much of my model from a few research papers, which I came across in various articles.

I prioritized the various aspects of the physics model and focused on the lift/drag model and gyroscopic precession first, since they have the most influence and were the easiest to test. Due to the time limit, I didn’t get to the more subtle aspects; spin decay, instability, magnus force, variable moment of pressure, etc. The game feels pretty good though, so I’m happy with what I got in for the 3D Jam.

Simplified Controls

The Leap Motion controller is a small box with 2 IR cameras in it that can track hand positions within a couple feet. When mounted on the front of the Oculus Rift, it can track your hands as you move them around in front of your face. Due to the angle that the cameras are facing, when you have your hands pointed away from you and closed it presents a very small image to process. Unfortunately, that’s the primary position for throwing a disc.

So, I’m still not entirely sure that the controller can’t detect disc throwing movements very well. I think that a major factor with the tracking issues I had is my old computer hitting its limits. I’m already researching new components to build a new machine soon.

In any case, since I needed the game to work on my machine, I simplified the controls to that you hold your hand(s) in positions that are very easy to identify for the controller. The controller seemed to do a very good job at recognizing when you open and close your hands, so I based most of the interface on opening and closing your hands to trigger actions, while using movement and rotation to fine tune the input.

I had a friend try it out earlier today and watched as he struggled to make it do what he wanted. Since I had to finish the game by midnight tonight, I was a little bummed. However, I tried a minor modification that turned out to work and the game is much better now. I basically separated the aiming and throwing phases of input which made each of them more robust. Phew!

Pre-release Means It’s Broken Somewhere

This no longer surprises me, but it still wastes my time. I never did update to the latest version of Oculus and Unity for the game, which I really wanted to do. The main reason is that I haven’t been able to get the latest version of the Oculus runtime working on my computer yet. I’m sure I’ll figure it out soon, but I didn’t want to waste time with it when the game worked with older versions. I doubt it would have made much of a difference, but I still don’t like feeling like there isn’t time to upgrade everything and take advantage of any bug fixes and optimizations.

VR Meteors Update

I’ve also done a little bit more work on VR Meteors this past month and am planning to upload the Oculus version to the share site soon. I’ve come across a few issues with the Android version that I’ll need to fix before I release a Cardboard build. I suspect that this will progress much faster now that the 3D Jam is done.

Facebooktwittergoogle_pluslinkedin

VR Discs Of Golf

VR Discs Of Golf

VR Discs Of Golf Title Screen

I suppose I can go ahead and announce that the project I’m making for the Leap Motion 3D Jam is a VR Disc Golf game. I basically have the disc physics and basket interaction at a playable state, so I’m going to stay committed to the premise. I still don’t know how accurate it really is, since I can’t find any type of recorded flight data online. That’s why I’ll need to bother some of my friends who disc golf to try it out for me.

I’ll be making the course out of geometric shapes and basic grid-style textures. It’ll be a little like Discs Of Tron, so that’s why I’m calling it VR Discs Of Golf. In fact, I’m pretty sure that this is a precursor to a Discs Of Tron remake for VR. I may even add moving obstacles and trick shots, so it’ll be kind of like disc mini-golf.

Unfortunately, I don’t know if the Leap Motion is going to be accurate or fast enough to do a realistic throw motion for the game. It may be that my computer is finally starting to show its age, and can’t quite keep up the with Leap Motion’s processing demands. It may also be that the angle of the hand when making a disc throwing motion is about the most inaccurate angle for the cameras, so that’s my fault for not trying the interface before I wrote the physics code. It’ll still be cool, but it will be more of a gesture-based interface. While I think about the interface and how I’m going to handle it, I’ve gone back to finishing up a release version of VR Meteors.

VR Meteors

VR Meteors Title Screen

VR Meteors keeps getting closer to a release date. I put in the high score and initials screens today. I also added a shield effect when you get hit. Of course, it’s all delightfully programmer art, but it gets the job done.

At this point, I only have a few things left to do. I’ll add a background sound and audio options to the settings. I’m going to implement the single button play style that I had for the Gear VR into the Cardboard build. Now that I have a better understanding of the rendering system, I’ll see about being able to switch between the colored and outline graphics on-the-fly. Then I’ll do a tuning and polish pass and go through the publishing steps for Google Play and the Oculus Share site.

Since publishing a game is a pretty significant step and legitimizes my company, I’m really getting excited about it. I’m pretty nervous too, since this will effectively be my “first impression”. I’m just trying to deliver an enjoyable experience that is quick and easy to play, while not trying to do anything extraneous. I’ll add more stuff in later updates as I get the systems written. At least it’s free, so there shouldn’t be any complaints about the price. It is the internet though, so I won’t be surprised if there are.

 

Facebooktwittergoogle_pluslinkedin

Leap Motion 3D Jam & Stuff

Leap Motion 3D Jam & Stuff

This week has been busy and fun. I feel like I have all the pieces to finish VR Meteors. I just need to put them in place now. I have plenty of plans for extra features and some restructuring, which will wait until after I put the game out into the wild. Here’s a screenshot of the title screen to show that I’m super cereal.

VR Meteors Title Screen

Getting VR Meteors online will also free me up to work on a project for this month, which is the Leap Motion 3D Jam. I just got my Leap Motion controller this week and have a couple ideas that I’m going to try. I’ll have to see how well the controller works, and the best hand positions, before I can decide which one to develop.

For those who don’t know, the Leap Motion controller is a small device which houses an IR camera that tracks hand movements. This allows for interaction with 3D objects by moving your hands around in the air. Typically, you would place it on your desk and it would track your hands as you move them around above the device. However, for my interests, they have a mount that allows you to stick the camera on the front of a VR headset so that you can track your hands in a virtual environment.

Other Stuff

Some other things that I’ve been working on this week are: menus, input, paths and splines, 3D text models, and various framework tasks.

Menus

For the menus, I’m trying to figure out how to separate the menu system and package it in a way that it’s easy to import into new projects. I drew a simple vector based frame to use for the various controls and have been working on setting up a template for the various UI elements in Unity so that the layout and sizing works the way that I want. I still have quite a bit of work to do before it’s truly flexible. Fortunately, VR Meteors is my primary development project, so it works for that.

Xbox360ContollerMenu OUYAContollerMenu

I’ve also made a couple of screens for the Xbox 360 and OUYA gamepads that display the controllers and highlight the buttons when you press them. I’ll be putting this at the beginning of my games to try and remove the need for me to explain the controls to people when they try the games. Especially since I won’t be able to do that when people download them soon.

Input

Wow, I don’t know exactly how Unity’s input system could be more cumbersome and less useful. Even if it didn’t exist, it would be more obvious from the beginning that you would want to write your own. I’ve been working on a new input manager to handle various controllers on all the platforms that I’m trying to support. Even the same controller on another platform has different button mappings, and the axis and button handling are separated seemingly arbitrarily. Fun times.

Since I’m primarily focused on VR using a gamepad, I haven’t yet tried to figure out how to handle keyboard, mouse, tilt, and touch controls. I’m sure that will be a whole new can of worms when I start working on some mobile app ideas.

Paths And Splines

When I was working on VR You Make Me Sick to go along with my talk last weekend, I wrote some simple path control code to make the targets move. I have now adapted that to move any transform in Unity along a path, circle, and now splines. I have a basic spline calculation that I came up with just playing around. I’m going to implement a proper Bézier Curve calculation as well, for more precise control. I’ve also learned how to use the gizmo system in Unity in the process, which will be handy.

3D Text Models

I learned how to create 3D text models in Blender, so I decided to use them as logos for now. I went to the Google Fonts site and downloaded a few different fonts that I felt fit the style of the games and modeled the titles to use for the title screens. I still need to figure out textures for them, but I think they’ll do the job until I can get some real art done.

That’s enough writing for now. I’ll be working on the finishing touches for VR Meteors this weekend and you should see it online next week sometime. Then I’ll get to work on the 3D Jam.

Facebooktwittergoogle_pluslinkedin