Friday, July 2, 2010

Day Five: End of Week 1

Today was a fairly successful day. It was going well enough that I worked an extra hour, and probably could have gone a bit longer if I wasn't tempted with mojitos from upstairs. Earlier this morning I finished coding the 3D version of the arrow application, named HelloCone. Once I had this running I messed around with the rotations a bit to try and get a feel for manipulating objects in OpenGL in the 'proper' manner.

OpenGL is based on seperate matrices, such as the model matrix, the projection matrix and the view matrix. The API is optimized for performing matrix operations on these separate matrices. Therefore, the best performance comes from representing all your data in terms of matrices and operations on those matrices. I learned about a few new concepts today, such as different buffer objects with provide standard methods of inputing data into the OpenGL pipeline. I've also learned a bit about Quaternions, which are vectors used for interpolating between different points in space, allowing smooth animation translation over multiple axis. The current project I'm working through in the book introduces a knew application model with better isolation of modules comprising the program. I'm getting closer to being able to start a fresh project in XCode to begin piecing together my game engine, except I'm hoping there are a few more useful concepts I will get from the book. Looking ahead at the next sections shows I be upgrading from wireframes to triangular models, adding lighting and performing model injection into the engine. Within a week I should have enough knowledge to begin building the core elements of the modeling and rendering engines.

Later in the afternoon I decided to take a break from the graphics work. The book had introduced touch elements which I'll be using quite a bit, but aren't necessarily that difficult to implement. I don't think I'll be using gestures in the first game, or at least not the first version, so that simplifies touch implementation quite a bit. However, I have been struggling for a few days to get the accelerometer to really work. Well, today I got it tied into an OpenGL view and have a little line demo that points in the direction the iPhone is oriented. I've also implemented some smoothing that is almost perfect for what I need, as well as a calibration method in case someone doesn't feel like playing my game straight up and down.

All in all it was another successful day. I'm sure I won't be able to stay away from working at all this weekend, so hopefully I'll have some extra updates or at least a standard update at the beginning of week two.

Happy 4th of July!

No comments:

Post a Comment