War in Space Day 24

warinspace24

As you can see, the old triangle ships have been replaced by better looking ships. But this does not mean that I got around to modeling them myself – I decided that my meager digital content production skills would lead to way too much time wasted trying to do it myself, so I got a free model from here, as kindly provided by Skonk at xnafusion.com under the CC license.

For the collision detection, I had a look at the custom model importer example, but decided to roll my own. If you look at the output of Maya when saving a polygon created with the CreatePolygon tool, you find that it just saves the polygons in the correct order in the file, so one just has to parse all polygon coordinates in the right order.

There is one thing that’s not immediately clear about writing a XNA custom pipeline extension. I assumed it would be enough to write a ContentImporter and a ContentProcessor to get the data to the application, but that’s not enough. What happens is that XNA also requires a ContentTypeReader/Writer pair. If you don’t provide this, you will be able to load the content, but it will just be an empty instance and not filled with the correct data.

I used this article, which is a translation from a Ziggyware article, but it seems like the original is not available at the moment.

Leave a Reply

Your email address will not be published.