Wednesday, February 20, 2013

Stupid Polgon

Some days it seems it isn't worth coding. Some days it appears I am quite incapable of coding, or maybe it is a case of some days mixed in with tiredness. Either way yesterday was one of those days, or nights to be more precise.

My day went well and I pounded out a lot of stuff for my day job. Then I went home and did some house mods in the kitchen to get the dishwasher installed, this turned out to be a pain and took a couple of hours. Eventually however I got to sit down with me cuppa and my laptop. Time for some coding.

The task I had set myself was to get the polgons in place for my court flooring. If I did it in 3D I can easily move it as Kal (Shaq) runs along. Doing it in 3D will give me the depth and more importantly free parallax effect I so desire to make this look good and dynamic as we scroll along.

Now I could of course get art to create an animation that does the same thing, but alas in this day and age this technique appears to be forgotten, and explaining it especially to someone whose second language is English (and I don't speak any other languages) is simply too problematic to deal with. So doing it this route is the best as it give me a lot of control and all I need from thr artist is a nice wooden floor texture.

So it was quite late when I started working on placing a nice Quad onto my game screen and then texturing it. It went well enough on the initial creation, where I simply try to get a quad created and not crashing my runtime code. Then I wanted to see the Polgon featuring Kals face. I simply couldn't get it to show up. Still I persevered for way too long and eventually I managed to rotate it across the screen. So I presume the Quad was behind my camera. However after another hour of trying to get the stupid thing to show up on the game screen properly positioned I had to call it defeat and headed to bed.

Stupid polygons...

This morning however I booted up the laptop to look at it and immediately realised I had been changing the rotation parts of the matrix and not the translation.. Oh how frustrating, but oh how satisfying to see my polygons on the screen.

Some days I should go to bed earlier...

Da Voodoochief

No comments:

Post a Comment