Tuesday, December 30, 2008

Skeletal Animation with XNA

My Bad
Well, I am still working on skeletal animation. I was able to find out that skeletal animation is supported in the .x and .fbx model file formats. However, it is not directly supported by either the DirectX or XNA API's. But there is a demo application that shows you the code necessary to load an animated model file containing bones and keyframed animations (the keyframes are only manipulating the bones, in a skeletal animation file).

So, what do you know I bought a book:

update: there is a newer version of the book out for XNA 3.0. I haven't picked it up yet to see whats new or changed but you may want to start with that if your interested in skeletal animation in XNA.

Thought it might be a little helpful to unravelling the mysteries of skeletal animation in XNA. So far it has been pretty much just a straight forward rip off of the demos from the XNA community site. With perhaps a small smidgen of useful detail on how the code works and what things you need to do to get it working.

The book uses three separate projects although for a Microsoft developer whats another project. To an indie, it's a lot of overhead you don't need especially if you are only going to have two or three classes in each project. Another set of endlessly nested project configuration settings and adding project references. Although, bringing them in under a single solution could work to mitigate the risk of wasting too much time hopping between instances of Visual Studios and making sure your using the latest compiled version of the libraries.

But I am guessing once I have it all working I won't have to touch it again for a long while. Provided there are no problems loading the exported model files.

Saturday, December 13, 2008

XNA Tutorials!

Dime a Dozen
There really is a lot of support for XNA as far as tutorials, demos, and thousands of examples, perhaps tens of thousands of examples.

Here's just a couple I came across that I will be skimming to see how things are done.
Reimer's XNA Tutorial -can't really stand the ads though

And you can find a lot of good examples from XNA's site

That is all, just thought I'd share those. If anyone has any links to some good XNA resources, perhaps a game engine in XNA that would be cool to see.

Friday, December 12, 2008

3D Model Importers/Exporters Vanish!

Super Sleuth
So, an artist friend of mine and I were fixing to make a small single room game. Low poly models, basic collision detection, small number of effects. Just keeping it simple. I planned and started using jME. We wanted just very basic animation. So we needed to settle on a file format. I said COLLADA, since he was working 3dsmax9. So he eventually conceded to trying to get the plugin, after finding out that .obj is only for geometry. So he download the installer and what a surprise it didn't find his 3dsmax version.

Moving On
So we tried to find a MD5 importer/exporter but the plugin for Max didn't work. So on and on we went trying to get at least something to export from Max and load into jME. And nada niltch couldn't find a single decent plugin. I know from using a few plugins a while back with previous versions of Max it was a pain in the arse. And when exporting there was always a 50/50 chance something in the scene would cause the exporter to break. I recently started working with blender very nice free modeler and game oriented as well. I found that their support for exporting seemed to be pretty good. Although I now know that the updating of those export scripts is very sketchy at best.

Switching Gears
So I decided we'll switch to using XNA Game Studios which has a lot of support and makes DirectX childs play. No the matter became finding an appropriate .x exporter for Max well. While searching for 3dsmax plugin support I found very little at all and couldn't get a hold of the Panda Exporter it seems the site has completely vaporized, and most if not all the forums I checked mentioned that one.

Some Light Shines Through
So my friend was able to find a plugin with a funny little name, kwxport seems to be good from the first glance over. Kind of messed up the wind order and with backfacing turned on in the DirectX Viewer but that shouldn't be a problem since I can control which order it used. But I'm sure that this issue can be fixed.

Here's the nice low-poly hollow man:

It would be nice to know if there are some good exporters out there still for max. That and I've always been curious as to exactly which file formats work the best in commercial or even just quality indie games. So if you know of any please enlighten me?

Wednesday, December 10, 2008

Tower Of Defense to the Max Yo! (Defense Grid)

While aimlessly browsing youTube the the other night, for XNA games demos. I stumbled across a magnificently designed, and exceptionally beautiful looking Tower Of Defense game in development. I hail the designer for choosing to incorporate a semi-smarter AI than the run of the mill TOD especially on top of the amazing looking textures and detailed maps.

In my opinion this will mark a large development for the popular genre of casual strategy games, known as Tower of Defense. Especially since it is available for download from Steam and Direct2Drive. So for Steam I think this will be a good addition to the small list of notable games using the service.

Defense Grid - is a must for any TOD gamer, and definitely a tempting purchase for other gamers casual and hardcore alike!

Wednesday, December 3, 2008

My Game Making Future?

What does the future have in store for you?
I never thought I would actually be interested in reading blogs. Even when I first heard the term blog, and thought to myself, "is this person deficient, do they know how to speak english?". And later finding out that blog was short for web log. "How corny" was what came to my mind. And yes it still is, every damn time I say "I'm writing a blog post".

The Revalation
I believe that things happen for a reason and in the right sequence but we still have to grab a hold of the opportunities that are shoved in our faces. It's recognizing what is an opportunity and whether it can't hurt to grab on to it and hold on tight. See, recently I've been reading a Game Design Theory and Practice, Second Edition by Richard Rouse III. Starting a couple days before thanksgiving, and before I spent the weekend at my friends house just playing video games. I inevitably started thinking that I don't really make games I expirement with programming concepts. Ever pushing myself to understand all space partitioning algorithms or to write that next gen physics engine.

Self Denial
I realize that my belief that I have to create the next best technology in game engines, that perfect AI, or infinite content generation, is a total bust. I don't have to make the best engine or best OO design for my game. Trying to make it the most extendable or reusable. See there is a sin in OO programming that so many fall into. Or at least that I have fallen into, see I find myself anticipating abstraction for even the smallest number of repeated code. I try abstracting when I have as little as two pieces of code which have the same sequence of operations. It's not always productive to bother abstracting it when you only use it in a couple places and won't use it more often as you add more code. Also, I find myself trying to build abstraction layers for things that won't realize those abstractions.

And so all of this had lead me to start thinking in terms of creating games rather than neat little pieces of code that could be used in a game. That and I don't want to keep creating an engine that won't be suitable for a game or a Game Creator that didn't start making games at its earliest version.

The Press
I found this article very enlightening and inspirational as well as hopefull. It made me realize that if I want to create the next gen graphics engine, or physics engine. It couldn't hurt to actually own a studio that makes less technically advanced games and build up to that AAA titled. And of course "bedroom coders" as he calls them is what the video gaming industry is built on and it's definitely better to be in that group than to be a code monkey for a corporate giant or a limited studio who is known only for ports and movie games.

Tuesday, December 2, 2008

Back to Work: In 3D

The Sad Part:
Vacation time is over and now its back to the normal work week. And of course it means getting up as early as possible to be able to have more hours in the evening to spend on side projects. But at least there is another vacation right around the corner Christmas. Of course for me that means running around the South Jersey area from Mall to Mall window shopping for that perfect gift for my family and girlfriend.

The Goodies:
So, I've been getting back into 3D programming a little bit over the past couple weeks. For Java there are some good choices for your 3D programming needs. There is LWJGL and then JOGL which is now supported by SUN. Both are open source. And of course I believe that the Java Monkey Engine is probably what you should start with if you are thinking of getting into 3D programming with Java.

On the flip side of the coin for those C/C++ gurus there is always SDL which integrates with OpenGL so that you have the simplicity of SDL with the power of OpenGL at your finger tips. The downfall of course is that OpenGL is not object oriented and does not provide common model file format of course theres always COLLADA packages you could check out. There is of course DirectX, but remember DirectX 10 is Vista only, you will have to use DirectX 9.0c if you want to do development on XP.

Of course if you are into new 3D technologies you can make the easy switch to XNA. With a very large support community and a lot of good libraries and articles to add physics, ai, and animations to your game quickly. And of course the really cool added bonus of being able to deploy your game and playtest it on your own Xbox.

Good Alternatives
If you want a good supporting community, lots of plugins, and of cross-platform, graphics API agnostic, there is always Ogre3D. You want to use Python, no problem you can create you game using pyOgre. Or even Ruby yes there is a ruby Ogre project. And of course yes you can use Ogre in Java now with Ogre4j. And of course there is a dot net wrapper MOGRE.

Take the wheel:
There are of course a ton of 3D engines, game engines, toy graphics apis, and anything else you could possible conjure into your mind. Check out DevMaster's 3D engine list.

And there is always Google. Enjoy!