Sunday, June 15, 2008

Completed MilkShape Model to OpenGl Program Quest! Level 3!

Wow, leveled up again! Yeah, yeah, because I documented 10 days of work in just one night, that's why. Well, let me continue where we left off last time. This is the last work of I the Bard the Documenter (is there such a word? good thing for software engineers, we can freely invent words) before I Sensui the Ronin will take over. The bard tells the story, the ronin kills the monsters.

So we are at loading the MilkShape Model in an OpenGl Program, right? Right. But before tackling that problem, there should be an OpenGl program in the first place -- that problem assumes knowledge of OpenGl-C++ program integration. Fortunately for me, I already killed that monster a long time ago. I already wrote a number of OpenGl programs before, so no problem.

Well for those who are not familiar with OpenGl, it is just a graphics library specification, composed of graphics function calls. Those who are interested, visit: http://nehe.gamedev.net/. There are a lot of tutorials in there. That's where I started when I decided to learn OpenGl.

Hmmm, so to load the model in the program... refer to tutorial #31 by Brett Porter in the link above! I have now the excuse not to discuss this stuff in length. =) The tutorial lacks animation loading details and animation in general. Brett Porter has another tutorial regarding animation in this link: http://web.archive.org/web/*/http://rsn.gamedev.net/tutorials/ms3danim.asp. This is more detailed and very helpful if you want to understand loading and implementing animation.

The only thing that the tutorials lacked is that it can't handle multiple animation sequences. We'll we can't expect a tutorial to do everything for us. =) So using the custom file that contains the animation name and sequence bounding frames that i mentioned in the last post and the concepts in Brett's tutorial, I reimplemented how the joint transformations are updated based on the current animation sequence's (being executed) bounding frames. I also implemented code to smoothen the transition between animation sequences, say run and jump. Also, keyboard keys were tied to a particular action/animation sequence.

So at the end of it all, Sensui the Ronin presents you with these screenshots and a video file. The water mark in the video is from the software I used to capture my screen activity. It's called Instant Demo Software.



























So what's the next monster to kill? Level/dungeon loading. Character navigation in levels/dungeons. Collision detection. Fragging effects. Don't worry, there's still a lot to kill.

For now, sleep, Sensui, sleep.

3 comments:

Unknown said...

nice work.i'm developing a 3d fps game nowadays :) cool animation :)

Unknown said...

this is my game :
http://www.youtube.com/watch?v=qrBzGimOqXc

Anonymous said...

could you leave code for your game ?