For some reason, after the coming of the new year I've been thinking about my skills in the one thing that I considered to do well in my life: programming. I've been programming since 13, and the admiration of elders and peers, even bosses and coworkers about my programming "achievements" had convinced me, once and for all, that I was a gifted programmer, or at least that I had the potential to be.
After 13 years, I realize that, sadly, it isn't so.
Sure, if I compare myself to the hordes out there that call themselves "programmers" then I guess I'm pretty good. I can write programs more involved than "Hello World" without literally destroying the world :). But when I compare myself to the more advanced posters in this forum and on #gamedev irc, the results are utterly disheartening. Even more so because those posters are on my age, even younger. It isn't an exxageration to say that, when I post code snippets on irc, every time the conclusion is that the code is awful and I'm trying to do things a bit(or a lot) over my head. Especially on irc, I've had some debates with several posters about technical matters that I now realize were a waste of time; I guess I wanted to convince myself that I was somehow a part of the "good programmers" on this forum, so I pretended that my opinion was as valuable and valid as their own. That was a mistake. I should have just listened, instead of arguing.
Now, even if I compare my skills, not with anyone in particular, but with what they should have been given the years I've been programming, the results are again not so great. Even though I've passed the Algorithms and Data Structures classes in my uni with good grades(years ago), I realize that my 'formal' education in them is pretty much zero. I've never read a book outside of school about them, and basically all I do is look up in the internet when I fail to find a library that implements a data structure for me. I know very little abour RB trees, graphs, and so on. Same for things like design patterns. I've dedicated at most about 2 hours on the GoF book, and I only use it when I can't remember something. I don't know many of the patterns, and the ones I know I suspect I don't know very well, because of my laziness. And let's just not speak about OO principles, which would be completely unknown to me if Washu hadn't hinted their existing a couple of years ago.
Now, in light of all this, I've reached some decisions. I will stop giving advices on the forums on serious matters; I can probably advise people how to fix their OpenGL lighting, but I don't think it would be helpful to spread my erroneous beliefs in matters such as design or data structures. And I'll try to avoid those useless technical arguments with members better than me, I'll just listen. Lastly, I've bookmarked some important books and other material for this year, mainly about CS,algorithms and data structures, and slowly, I will try to study them in my spare time so I actually become better.
End of rant. Now, about the good stuff. I've made quite a progress on God Complex since the last update. I can now load the environments in the game, render the characters, and have some gameplay(not AI yet,basically the human-controlled character can make some moves). I am trying to make the game as data-driven as possible, so the definition of characters is done in text files. For reference, here is the file that defines zeus, zeus.chr:
name = zeusclass = Fighterskeleton = c:\zeus\zeus_all\skel.xsf#MESHESmesh = body c:\zeus\zeus_all\zeus.001.xmf#MATERIALSmaterial = c:\gods\zeus.mat#ANIMATIONSanim = stance c:\zeus\zeus_all\stance.xafanim = run c:\zeus\zeus_all\run.xafanim = walk c:\zeus\zeus_all\walk.xafanim = punch_strong c:\zeus\zeus_all\punch_strong.xafanim = uppercut c:\zeus\zeus_all\uppercut.xafanim = kick_strong c:\zeus\zeus_all\kick_strong.xafanim = duck_enter c:\zeus\zeus_all\Duck.xafanim = duck_idle c:\zeus\zeus_all\Duck_idle.xafanim = jump_enter c:\zeus\zeus_all\jump_Enter.xafanim = jump_idle c:\zeus\zeus_all\jump_Idle.xafanim = jump_kick c:\zeus\zeus_all\jump_and_kick.xafanim = kick_sweep c:\zeus\zeus_all\kick_sweep.xafanim = duck_punch c:\zeus\zeus_all\duck_punch.xafanim = punch_light c:\zeus\zeus_all\punch_light.xafanim = kick_light c:\zeus\zeus_all\kick_light.xafanim = hit c:\zeus\zeus_all\hit.xaf
Here is a material file(zeus.mat):
texture = 0 c:\zeus\zeus_all\zeus.bmptexture = 1 c:\zeus\zeus_all\zeus_normal_map.bmptexture = 2 c:\zeus\zeus_all\zeus_gloss.bmpglsl = c:\gods\phong.glsl
And lasty, the phong.glsl file, which defines the vertex and pixel shaders to load, as long as setting some uniform values for the program.
vs = c:\gods\phong.vsps = c:\gods\phong.psuniform = diffuseMap 0uniform = normalMap 1uniform = glossMap 2
All this result that by doing LoadFighter("zeus.chr"), you get Zeus all done and ready for action :)
I had some trouble with normalmapping earlier this week. Especially on Zeus, there were some very weird shadows on the mesh, and there were problems with other characters, basically sometimes the bumpmaps seemed "inversed". At last, I found the problem deep inside Cal3D itself. Cal3D supplied the tangent vectors, and it was supposed to set tangent.w to 1 if the texcoords were not mirrored, and to -1 if they were. However, it just set it to 1. I fixed that, and now the lighting seems consistent.
Without further delay then, here is a screenshot:
And here's a video I uploaded on youtube:
">Linky
Any comments are welcome :)