Wednesday, January 14, 2015

The Programming Grind

It's amazing just how much there is to learn about programming for me still. I spent the entirety of the weekend trying to get some progress done on the programming end of things for Project Navalusu using the XBox controller. A lot of things have been learned in the process and I figured I'd share some of that to give you an idea of what I'm working around with.

I experimented with the control system I described in earlier posts that's reminiscent to the tank controls systems that are in titles like Resident Evil 4 and Golden Eye 64. It works somewhat well to simplify motion, making it so I can really get around using just the left analog stick. However, I found that when I had my turning axis already down pact, the ability to turn wasn't nearly as valuable so I input a system to allow you to move around from left to right by clicking in the left analog stick. I'm calling this "Strafe mode" for simplicity, and so far the only real change that it makes for the controls is making it behave similarly to the typical first person game. I'm considering making the strafe mode's axis be somewhat tied to the user's view from the Oculus Rift instead of the body's axis to make it more of a sort of lock on system and provide a bit more versatility.

There's a particular idea I've been tossing around to implement where in by your pointing direction with the joystick makes the body move and face that direction, but only when the analog stick is at the outer rim of the controls area, though that's been a bit of a pain to deal with due to dealing with the differences between Unity's rotate, rotation, quaternions, eulers and other such turn direction situations. This is far from helped by my complete and utter ineptitude from a mathematical standpoint (I actually opted against Math my last year of HS), something I'm now paying for in delayed progress. I managed to get something pretty decent going more or less, though it's probably going to be another week or so before I can really refine that, though I have a few much more pressing items on my agenda to deal with.

So far, I've been prototyping using a basic capsule character, an item which has served me well for the most part, though I'm finding that I'm starting to reach the point where in by I'm going to  need a character model to do some animations and actions directly so I'll be looking into either using some other basic model for prototyping or just making my own model in blender as a temporary measure. So far, I've been using transform.translate for the inputs in the system when it would probably be preferable that I use the rigidbody.addforce item to be more internally consistent with the way physics works (and to save a lot of headaches when full body VR controls do become a thing) I'll probably start modelling a bit of a personal building structure to be my sort of virtual reality home. These early stages of development are hardly anything to look at so I'd feel a bit awkward baring it out would be like showing the outlining phase of a drawing. While it's going to play a large role in the larger outcome, it's not much to look at.

I'll keep working on getting the controls done as much as I can since they are the thing I want to get right the most at this point so hopefully I can have something "playable" by the end of the month.

No comments:

Post a Comment