Saturday, 18 January 2014

Relax, Program, Study, Program....and then Program some more.

     The title says it all for me this past week. I've either been sitting in my room looking for ways to improve code and for things to add or I've been studying up and how to do things that would benefit my code. I've relaxed now and then, but have gone right back into coding and it can be quite stressful really.

     I had a great thing going when I was assigned new group members for GDW this year. I was removed from the Producer position (awesome - because now I didn't have to program, model, AND make sure everyone else was doing their programming and modelling and other stuff WHILE making sure it was all up to par and in on time). I'm now our group's 3D modeller and it feels wonderful. I'm still doing half of the programming work, which I have no problem with, and I spent the last week upgrading our game's ship model because....well take a look for yourself:


It's a big improvement from the last, believe me (and if you don't, go check out my first blog for a picture of the old one).

     Only problem so far is that my UVs aren't mapping the texture properly. For some reason, the bottom half of my ship looks perfect, but the top looks almost as if the texture slipped off to one side. Either way, it's not working properly and I plan on changing the whole system soon because I'm turning it into a VAO/VBO in the near future.

"A Vertex Buffer Object (VBO) is an OpenGL feature that provides methods for uploading vertex data (positionnormal vector, color, etc.) to the video device for non-immediate-mode rendering. VBOs offer substantial performance gains over immediate mode rendering primarily because the data resides in the video device memory rather than the system memory and so it can be rendered directly by the video device."

http://en.wikipedia.org/wiki/Vertex_Buffer_Object

In short terms: It's placing the texture data on the GPU's storage to be rendered on the GPU rather than the CPU. Simple, right?

     One cool thing that I learned this week, which I was actually not surprised about, but I was more shocked that I didn't think of it that way before is that mirrors in games are all rendered by placing a camera at the mirrors position and taking the image that would be rendered to the buffer, storing it as data, flipping it, and binding that image to the surface where the "mirror" would appear.
   
     Cool stuff, huh?

Anyways, once all that texture stuff is sorted out I will be ready to make our AI's load and function with GREAT SUCCESS!

With that said....thanks for reading!

Brayden out! :)

No comments:

Post a Comment