Post show ramblings after the Game Developers Conference…

All in all i think it was a really good show this year.  I met with lots of interesting people doing lots of interesting projects.  I also heard ramblings that the show next year might be in San Francisco rather than San Jose.  It was awfully crowded, so maybe a change of venue might be in order, but really i don’t know if it’s going to happen or not..

The expo itself was decently sized this year with lots of good booths.  Renderware had a large booth once again, but it seemed a little more enclosed this time, so i didn’t actually go in there.  Nokia’s N-Gage booth (which was huge and popular last year) was smaller and much less popular this year..  Part of that probably has to do with it’s sub-prime location this year compared to last year, part, but not all..  ATI and nVidia’s booths both had interesting presentations happening throughout the day, and the AMD64 booth was quite popular as well.  The Intel booth was huge as always, and they once again had the ‘contests’ where 6 people would play an online game for 5 minutes, and the winner would get the game (this year the game was ‘Call of Duty’)..  I played once and came in third place (i sucked), but did get a stuffed intel bunny-man doll.

My talk seemed to be received very well too.  I covered most of the basic areas for managed code in gaming, showed some demos, failed in showing other demos (doh!), and got some good questions..  One demo in particular really stood out for the crowd and i was asked many questions on that one after the talk and throughout the show.  It’ll be released in an upcoming DirectX SDK Update..

I loved the award shows Wednesday night, we announced XNA, and i think it was an all around great show.

Game Developers Conference…

So next week is the Game Developers Conference which is always an exciting time around here.  The ‘main’ conference runs next week from Wednesday through Friday, although there are tutorials and sessions on Monday and Tuesday as well, just no show floor, etc.

I will be giving a talk on managed code in gaming during one of these sessions Tuesday morning, which should be pretty exciting.. It’s always great to get the chance to actually talk with the customers and find out issues they may be having and answering questions.  Everytime i’ve given a talk i’d say the Q&A session at the end is always the best time.  People always come up with some great questions, and most times it gives a good insight into the types of things they’re trying to accomplish, and how they expect things to work.

As for the rest of the show, i’m pretty excited about that as well.  There are always lots of interesting things to see on the expo floor, there are literally hundreds of different sessions to see, booths for everything, and an all around great vibe.  I’m looking forward to a great show.

It’s a revolution…

Ok, I hate to admit it, but the fact is I totally love the Dance Dance Revolution Ultramix game for the XBox..  It’s addicitive, upbeat, and best of all you get a workout!  How many ‘video games’ can you play and work up a sweat after an hour or so?  I remember the first time i tried it, “Castles In The Sky” is the first song that is selected, and i went about flailing around like an idiot for 45 seconds or so before I was rudely reminded that I sucked.  I thought to myself, “Holy crap, this is horrible, who would subject themselves to this?!?!”

Here we are now a couple months later and well, I guess i’d be the one subjecting myself to that.  I discovered i could hear the beats, follow the rythm and all of a sudden i could beat every song in the game.  I moved off of the ‘Light’ setting (that’s the version of ‘easy’) and upgraded to Standard, and once i beat all the songs there, i moved up to heavy..  I still haven’t beaten all of the songs in that mode yet, but i’ve beaten enough.. Then, just when i bask in the glory of complete domination, bam!  new songs to download from Xbox live.   Unfortunately the songs you get from XBL are pretty easy, but it’s still nice to get some new songs, even if i did have to pay $10 for them..

The only complaint i have is you can’t import your audio tracks from the hard disk and make up your own beats.  You can make up your own beats for the songs that ship with the game, so they have the ability.  Probably a revenue thing since they can charge for the new songs.  I won’t complain too much.

Now i just need to watch out for my son.  He’s almost to the point where he can beat me on the easy settings (and can sometimes)..  Kids with never-ending energy!

Books, Books, and more Books..

For me personally, it’s great to see a number of books coming out using Managed DirectX (even if I am the one writing some of them).  Like Dave already mentioned in his blog he has a book on .NET gaming coming out around the same time as this years GDC (Game Developers Conference).  It has a lot of useful information regarding using C# in gaming situations, which isn’t something my first book covered (outside of the simplistic ‘Dodger’ game).  It takes you from basic 2D ‘sprite’ based games on through a simple implementation of the Space Wars game in 3D.

In all honesty, i hope the book does well, even if he went with a different publisher than I did.. =)  Aside from the fact that i think the ManagedDX technology is ‘top notch’, i believe his book leads directly to the start of my second book, which also covers ‘beginning’ game programming, but it’s strictly 3D game programing, and is probably more of an ‘intermediate’ book.  I don’t have any firm dates on the release of that one right now (editing, etc), but it looks like early summer..

So, what do i recommend if you’re a C# developer looking to become the next big game developer, but you’ve never written a line of game code in your life?  Well, first, pick up my KickStart MDX book, then pick up Dave’s book on beginning game programming.  Once you’ve mastered the skills in those, move on to my second book which has a wide breadth of coverage for fully 3D games (including a puzzle game, a tank wars game, and a kart racers game).  If you’re still instatiable for more knowledge after that, well then you’ll have to wait until late this year when my last book (for now) comes out. =)

It’s an exciting time to be a game developer.  Especially if you’re ready to start writing managed code..

Test Driven Development…

Recently during the ‘first official meeting of the Managed DirectX fanclub‘ (as Dave called it), Craig mentioned something he’s been doing recently called ‘Test Driven Development

It *sounds* like a lot more upfront work, but the process intrigues me.  Anything that can help eliminate bugs, and regressions has got to be a good thing.  I’m curious what other people’s experience in this field is.  Craig even mentioned than he found he was even more productive, which was at least somewhat surprising given the extra work involved.

Of course, it makes me wonder.. If I have to write the test before i implement the method and i’m designing a library, i can’t even make the test compile until i’ve defined the method.  It’s like a catch-22! =)

To shader or not to shader, that is the question…

So i’m finishing up my second book (an introduction to 3d game development), which is intended to be a ‘beginners’ book, and i find myself continually arguing amongst myself about whether or not i should use shaders in the last ‘sample game’.  Couple this with the fact that my ‘advanced’ book which will be out a few short months after this beginner book is virtually entirely shader driven, with next to nothing using the fixed function pipeline.

The argument i’m having with myself is the potential that the shader code in the beginners book would be too difficult to be classified as ‘beginner’, while at the same time i don’t want to simply ‘ignore’ the shaders because they can be quite powerful.  Right now i’m leaning towards some basic shaders for the last game, just as a small ‘introduction’ that hopefully won’t catch anyone off guard.

I’d rather have someone complain about too much (or too difficult) information than not enough.

Wow, the feedback has been awesome..

I love it when you see people excited and they are giving the feedback, and the feedback that’s been coming in has been great.  A consistent theme among the feedback has been the doc’s (isn’t it always?).

Rest assured this is an area we are working on.  You probably noticed an improvement in the Summer 2003 SDK Update that was released last year, and those improvements are continuing today.  The next release will have even more and better doc’s.  Another common point brought up was the samples that ship with the DirectX SDK, which is also something that is being addressed.

The idea of ‘community’ intrigues me.  There is a small ‘community’ site on GotDotNet but i’m not sure of the traffic it gets.

I’ve noticed a few bug reports interspersed within the comments as well.  If you have a bug, please email it to so we can make sure it gets addressed in a timely fasion.

If there are any other specific items you are seeing that is either stopping your adoption of Managed DirectX, or is enhancing your use of it, this is something that I would love to hear about.  Keep the feedback coming, and thanks!

What would stop you from using Managed DirectX?

This is a question that is interesting in more ways than one.  One of the more common answers to this question i hear is naturally centered around performance, even though many times the person with the ‘fear’ of the performance hasn’t actually tried to see what types of performance they could get?  I would love to hear about specific areas where people have found the performance to be lacking, and the goals they’re trying to accomplish when hitting these ‘barriers’.

But above and beyond that, what other reasons would you have for not using Managed DirectX.  Do you think the working set is too high?  Do you not like the API design?  Do you just wish that feature ‘XYZ’ was supported, or supported in a different way?

At the same time, what about the users who are using Managed DirectX currently.  What do you like, and why?

You can consider this my highly unscientific survey on the current state of the Managed DirectX runtime. =)

The speed of Managed DirectX

It seems that at least once a week i’m answering questions directly regarding the performance of managed code, and Managed DirectX in particular.  One of the more common questions i hear is some paraphrase of “Is it as fast as unmanaged code?”.

Obviously in a general sense it isn’t.  Regardless of the quality of the Managed DirectX API, the fact remains that it still has to run through the same DirectX API that the unmanaged code does.  There is naturally going to be a slight overhead for this, but does it have a large negative impact on the majority of applications?  Of course not.  No one is suggesting that one of the top of the line polygon pushing game coming out today (say, Half Life 2 or Doom 3) should be written in Managed DirectX, but that doesn’t mean that there isn’t a whole slew of games that could be.  I’ll get more to that later.

I’m also asked quite a bit things along the lines of “Why is it so slow?”  Sometimes the person hasn’t even ran a managed application, they just assume it has to be.  Other times, they may have run numerous various ‘scenarios’ comparing against the unmanaged code (including running the SDK samples) and have found that in some instances there is large differences.

Like I’ve mentioned earlier in this blog, all of the samples in the SDK use the dreaded ‘DoEvents’ loop, which can artificially slow down the application due to allocations and the subsequent large amounts of colllections.  The fact that most of the samples run with similar frame rates as the unmanaged API is a testament to the speed of the API to begin with.

The reality is that for many of the developers out there today, they simply don’t know how to write well performing managed code.  This isn’t through any shortcoming of the developer, but rather the newness of the API, combined with not enough documentation on performance, and how to get the best out of the CLR. Luckily, this is changing, for example, see Rico Mariani’s blog (or his old blog). For the most part, we are all newbies in this area, but things will only get better.

It’s not at all dissimilar to the change from assembler to C++ code for games.  It all comes down to a simple question.  Do the benefits outweigh the negatives?  Are you willing to sacrifice a small bit of performance for the easier development of managed code?  The quicker time to market?  The greater security?  The easier debugging?

Like i said earlier, there are certain games today that aren’t good fits for having the main engine written in managed code, but there are plenty of titles that are.  The top 10 selling PC games a few weeks ago included two versions of the Sims, Zoo Tycoon (+ expansion), Age of Mythology, Backyard Basketball 2004, Uru: Ages beyond myst, any of which could have been written in managed code.

Anyone who’s take the time to write some code in one of the managed languages normally realizes the benefits pretty quickly.