Timbles, XNA, DirectX, and SlimDX

I’ve written some game code over the years. I joined SCi back in 1994 over the following 14 years I’ve written a fair few applications in C++ and utilised DirectX. When I started at SCi DirectX wasn’t out and we were still working with various graphics and audio libraries that gave you access to the plethera of hardware that was available. When DirectX was release in ’95 if was a godsend.

I haven’t written any game code on windows for a few years now and so coming back to it I spent a little moment thinking about what I wanted to achieve.

has now pretty much been replaced with . Replaced is a loose term there because of course DirectX is still available as a low level library – but have a large push on the XNA technologies. XNA allows you to develop game code in c# that targets windows, zune, and xbox 360. Now I know there will be a lot of pure programmers out there who would despair the concept of coding in c#, but hey, things move on. I’m getting a bit long in the tooth now and coding in C++ really doesn’t interest me anymore.

So I like the concept of XNA and C# – apart from two things – the minimum requirement and the platform dependence. You have to have a graphics card that has shader model 1.1 support. The laptop that I am typing this on – doesn’t!

I’m writing a 2d sprite based game. I want to use the graphics card to do all the work for me – why not, it can throw millions of textured polygons around the screen, so it will have no problem with my sprites – so why do I *need* shader model 1.1? Basically, that rules XNA out for me.

With regard platform dependence – I can target XNA using C++ if I use managed code. To be honest, after doing it, see my previous point – I can’t be arsed! Thinking about my target audience – really platform independance is not a major thing – the majority of them will be windows based. I intend to do a Mac version, but that can come later, and to be honest, porting from VB/c# to C++ or Objective-C – isn’t such a big issue.

DirectX can be used using managed directx. This is a way of accessing the libraries using c# or vb.net. It works well… I hade the prototype up and running pretty quickly using it – one problem – it’s discontinued in favour of XNA!

So that brings me to SlimDX. SlimDX is affectively a cross between XNA and Managed DirectX. It works a treat and doesn’t have the shader issue. So I have Timbles up and running in SlimDX very nicely!

This brings me back to another thing – the choice of language. As I mentioned earlier I coded the prototype in VB. After a little while of playing around, I made a decision: I’m going to leave the game in VB – why – well why not? The game is already up and running. I’m using the hardware for the audio and graphics. Thus the game logic doesn’t actually spend much time running in a update cycle. So why should I spend any time messing around trying to put it into another language. I actually prefer VB over c# – just because it’s simpler and there is nothing I can’t do in VB that I need c# for.

So the prototype has just moved to production code!

Technorati , ,
Wikipedia DirectX, XNA, Microsoft

Related Posts:

%d bloggers like this: