Saturday, December 10, 2011

I love the smell of napalm in the morning.

(Writing on the go, no doodles... yet!)
(Edit, Got a doodle in, scroll down for it, or, you know, read it and then see the picture)

Success, however you choose to measure it, is a fickle beast.  It certainly is no friend of mine.  Most often when I achieve success it isn't enough, and that is where I find myself again today.  After hours upon hours of struggling and using my most abundant resource, stubbornness, almost to exhaustion I finally found a solution to the issue.

The success is in the that my camera system is now fully operational, it works smooth as silk and there are no graphical glitches or processing slow down.  Good news for David, and the system as a whole.  It is now more flexible and powerful than ever.  So why am I not pleased with success?

It doesn't feel mine.  The methods I had built before were of my own doing, my own math and created by me and for me.  The problem was that my old ways were inefficient and messy.  And the fact of the matter is the new system I implemented, which is based off of previously existing systems in XNA (well, not just in XNA, in most graphics programs as a whole), is far better than what I had before, despite my affinity for my own hard work and code.

Work harder, not smarter, a maxim I am still learning to this day.  And it's an unfortunate truth that programmers, like anyone else who creates, get very attached to their creations and can be loathe to abandon all of their hard work even if a better solution is available.

As is, I ended up using an XNA class called RenderTexture2D, which is a separate buffer to draw too, and then used that entire buffer as a single texture and drew that texture according to the dimensions of the camera.  Buffer work is not something I've had a whole lot of experience with, but the solution I came to using the separate buffers feels almost too easy for the incessant slaving away that I've put into the camera system in the past few days.  And what I came up with today was almost too easy, and it took no more than an hour to research and implement.

I'm not sure if finding this solution makes me a good developer because I found the solution, or a bad developer because it took me so long to find this solution.

I guess that remains to be seen.

-Kevin

No comments:

Post a Comment