Monday, February 28, 2011

Testing out XNA

As I had stated in a previous posting, I have started a new side project. This time it will be a game that will be written using XNA 4.0. Hopefully this game can turn into something that can be shipped on PC and for Xbox Live Indie Games. For this post I am going to talk a bit about my initial experience with XNA and what my thoughts are about how it stands as a platform for creating games.

Microsoft XNA Game Studio 4.0 is a suite of tools developed by Microsoft for creating games for Xbox 360, Windows PC, and Windows Phone. XNA is a very easy to use set of tools that will easily enable someone to quickly create games that can run on any of these three platforms. I have only started toying with XNA but I can already see why it has become so popular, it is incredibly easy to use, just download the tools and install everything and you are ready to start. XNA has an extremely easy to use content system where you can load in nearly any type of content from 2D images to audio files, 3D models, or loading up sprite fonts for drawing text and have something drawing on screen in just minutes. Also since XNA is a managed language it is fairly simple and forgiving to programmers who are just learning how to code since they don't have to worry too much about the intricacies of memory management (but coming from a mainly C++ background it still pains me inside to call new and not have a matching delete...). I would easily recommend XNA to someone who has some coding experience in the past and wants to start working on some games with graphics. XNA does a ton of the back end heavy lifting off of the developers so that they can focus much more on making a game rather than resource management or other things.

The picture above is is from my little test program where I have just been following along with some tutorials and learning the basics of how XNA works. I have to recommend that anyone looking to start up with XNA check out the tutorials on RB Whitaker's site. I have been following these tutorials and these are very easy to follow, well written, and overall very enjoyable to use (which I cannot say about most other programming tutorials). There are still some tutorials on the site that have not been updated to XNA 4.0 but it is clearly posted on each tutorial if it is XNA 4.0 compliant or not. My little test program is just a mish-mash of the different tutorials I checked out with a few other things I was tinkering with on my own. That is why there is a space shuttle sprite, a planet, some alpha blending spheres and a rotating 3D helicopter... It looks like a bunch on crazy stuff on screen but I have learned a ton from it.

For my actual game project I will start working more on that now since I have a feel for XNA and how to work with it. My project will also be using the Farseer Physics Engine for the more physics based elements of the game. I have implemented this into my project and have a few things moving around and colliding which was not too much work. I will probably make a post about Farseer later once I have a better understanding of how it works and if I find any issues with it. My goal now is to get some sprites into my game and attached properly to the physics objects so they look like they are colliding with each other properly. I want to do this before my vacation to Brazil which starts in about a week. I am confident that I can accomplish this goal.

Monday, January 17, 2011

End of a project

This will be my last post about the ray tracer for a while since I will no longer be working on it. I have been slowly working on it for a while now and I have gotten to a point where I am happy with what I have accomplished but I need to move on to something new. This something new will be an XNA game that will hopefully be able to ship as an XBox Live Indie Game someday.

As you can see from the image I was able to get a 3D polygonal model loaded up and rendering. I used the ms3d format for the model since it is a very simple and easy to use model format. also the texture is a 24 bit uncompressed tga for similar ease of use reasons. Getting the ray tracer to this point was a lot of fun. I would recommend that anyone who has any interest in writing a ray tracer should give it a go. At very least you could spend a day and get some reflective spheres drawing and looking awesome! If you have any questions about how it all works or what I did feel free to ask anything in the comments.

For the next project I think its going to be a 2D platformer type game (probably 2D rendered on 3D planes). As for specifics of the gameplay and design that is still being worked out but I will have time to take care of all that while I am working on the initial tech for the game. Also I will be working with the house mates for design and content on the game. I am hoping that this will be a very fun project to work on in my free time.