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:

5 Replies to “Timbles, XNA, DirectX, and SlimDX”

  1. XNA has not come close to replacing DirectX… every major Xbox game, every major PC game is coded using DirectX… there’s exactly one Xbox game using Schizoid and a handful more on the way…

    Maybe one day but right now XNA is a niche developer tool for the small and hobby market that want to target XBLCG.

  2. Thanks ZMan. I may choose my words loosely – but having been around game development since the inception of DirectX – I know how it feels – the start of the end. Over the coming years less and less games will target DirectX directly and more a more game studios will develop in c# targeting XNA or whatever its successor is.

  3. Chris – I hope you are right man… I’ve made big bets on managed code and gaming over the last few years I would LOVE to have predicted this before anyone else and ridden the wave.

  4. I think it will take time – but I think you have seen the future of windows development and therefore DirectX. Sooner or later the concept of DirectX has to go away – it will just be the graphics component of windows/xbox/zune etc…

    As more and more of the intensive cpu work moves to hardware, there is less and less reason to spend time in it in code. I suspect that of all the game out there, many of them could have the vast majority of their code running under c# and the engine would be better for it.

    The big problem is still cross compatability – and that is the main reason that games are sticking to c/c++

  5. Agreed, .Net is the way of the future, C++ has some uses, but ultimately, it’s archaic, and a pain in the ass to be blunt.

    XNA however, is becoming very XBox\WP7 oriented, and PC users are slowly getting screwed.

    You might disagree, however, explain, how can a DX wrapper, like XNA, not provide DirectInput for it’s end users? They clearly have access to it. So, why isn’t it exposed so we can use it directly in some manner. (Namely gamepad support..)

    The answer is simple, to sell more XBox controllers to PC users.

    Guess what, the XBox controller blows, play SF4 PC using one, you can’t perform half of the moves in the game due to the DPads crummy design. (I had one, ditched it after about five minutes using it.. Haven’t regretted it yet..)

    My PS2 controller + USB adapter slaughters the XBox controller in almost all respects, though I do wish I had the same triggers.

    Then, we have the whole exclusive content issue, which is really on my nerves, how about MS exclusive content, and not screwing the ppl who made you rich, assholes.

    Anyways, XNA probably is the future, but, the future is looking grim if PC users don’t start standing up and demanding proper support.

Comments are closed.

%d bloggers like this: