Sunday, November 27, 2011

Cat Mullets in Roms and Braid Advice

Well I've been assigned to do the spline camera control and key frame animation. So I finished the functionality of the spline controls, but the only problem is that I hard coded it into the game. I didn't start this way, I did the whole UML run down and started on my way making three classes: Keyframe; which holds the translation and rotation information of a Spatial node, MotionPath; which has a vector of keyframes and either LERPs and SLERPs, or uses catmull-rom and spline rotation to traverse the points, and finally a Cutscene class; which has a vector of MotionPaths so the motion paths can be played all at once.

I found this to be slow to code, and Tyler suggested, along with Colin that I just hard code it to see if it works. The creator of Braid according to Colin said that you should get the functionality working and then create a class around it. So the catmull-rom spline works, show below (you may have to refresh your page to see the animation):



But this is only splining between two points, none the less it's quite smooth. Now I've got to extend the functionality back to classes. Extending this to spline through more than 2 points makes me hit a lot of vector out of bound errors... which I know all too well, seen too many, and frankly still have no idea how to make my code robust enough so they don't appear. It also doesn't help that catmull-rom splines like to ask for points before and after the two points you are splining through...

I feel most inadequate ;_;

Oh I don't know why the scene is pink and blue, and the player character is falling off the constraint plane because that piece of code is commented out.

No comments:

Post a Comment