Friday, July 9, 2010

Week Two / Day Four

I literally write this as I am finishing up today. Considering I had to take Monday off and woke up an hour late this morning, along with no desire to stop, I just kept working. Today was a bit different than most other days. While I didn't write a ton of code or anything, I did get a lot figured out.

When I started this morning I really didn't have a solid understanding of OpenGL's matrix transformations. While I could use them to do simple work, whenever I tried to stitch them together they never worked quite how I expected. When you perform transformations with matrices, you are actually creating one matrix. Starting with the identity matrix you apply translation, scaling and rotation matrices in order to create a new matrix that is multiplied by each piece of geometry in your scene. Matrix multiplication is not transitive, and OpenGL uses a reversed call pipeline with the transformations, so I was getting six types of twisted. After drawing some diagrams and reading a few more tutorials I finally 'get' it.

Once I had all that squared away, I worked for about another hour or so before I started to realize I was really wasting time. I reached a point in working with my test bed app where I wasn't actually exploring new technologies, I was spending so much time hard coding junk in that wasn't going to be reusable at all. So, instead of barging on brute forcing things worthlessly I spent a few hours figuring out a few of the core mechanics required for my final engine to be at the point the test bed is currently at. I now have a decent framework for the engine that handles some of more abstract backend work that I was tediously hard coding. I'm not quite to the point I was at with the test bed with what you see and can do, but when I've written the back end for it and reach that point the engine itself will be far more capable and ready for improvement than the testbed.

I've reached my first odd point. I still haven't heard back from O'Reilly, so I think I'm going to start looking for other solutions in implementing a PVRTC loader. I really would like to finish that book so I can work on other areas besides rendering and graphics. I have a pretty solid idea of the look I'm trying to achieve, so once I have the know how I should be able to get it polished up and move on to other areas. But, other than that I'll continue working on the engine design, figuring things out piece by piece and implementing as I go. I'm changing a lot of the ideas I originally had for my "first game" I'd ever write, mostly backend work and tool development, but I'm on a pretty strict time frame right now so here's hoping for the next game.

Lastly, Lennon suggest posting a screenshot of my current work. Here is where the test bed was at when I stopped working with it earlier today. It doesn't look like much, but touch control, accelerometer control and lots of relational transformations are bringing you the scene you see:

Happy coding.

No comments:

Post a Comment