Skip navigation

I’ve been working with XNA for a couple of weeks in a hobbyist capacity as a break in the monotony of business programming.  I like talking and writing about programming so I though I would start a series detailing the challenges that I’ve faced (and hopefully how I overcame them).

First, before we begin, I want to state that I am a professional software engineer with abou 10 years of software development experience behind me.  When I got my degree in CS, they were still teaching students C++.   For the last 4 years I’ve done almost nothing but C# .NET development.  I work for an ISV doing product development.  I also took a lot of math in college (linear algebra, a course called “math for computer graphics”, and the CS department’s CG course).  I’ve played with Direct3D and OpenGL before, but not to much extent.

I feel that’s important to mention because as I stated in my discussion of the obstacles the amateur game programmer faces, game programming doesn’t necessarily lend itself to amateur programmers because even professionals like me find it challenging.  That isn’t to say “if I can’t do it, nobody can!”  More like, don’t be discouraged.  If you find this hard, well, you’re not alone.

So, let’s begin!

First off  – why XNA?

I got interested again in finally churning out an amateur video game when XNA 4.0 came out mostly because the idea of a (mostly) singular code base that could produce a game that is playable on a PC or console hardware was highly intriguing.  Managed Direct3D has been around for a while so graphics programming .NET is not a revolutionary step – but a managed API is.  Managed D3D struck me as lipstick on a pig.

I work on a product that got its start in the mid-90’s as a C++ core with an MFC UI.  Around 2000, we launched an ASP.NET front-end.  To do it, we had to write a lot of .NET 1.1 code.  To expedite the process we did a lot of copy and paste and a lot of syntax find-and-replace.  Because C# is a successor to C++ we got away with it, and to be fair, .NET 1.1 was barely better than C++.  It gave us garbage collection and a non-generic STL – remember, generics were introduced to .NET in C# 2.0 – so a syntax port was about as good as we could do.

These days, there’s a stark difference between C++ and C#.  I’ve gotten so used to the features of modern C# – specifically LINQ – that writing C++ is like building a house without power tools.  Whereas with .NET 1.1 code you could pretty much cross-port C++ into C# and C# back into C++ with barely more than syntax touchups, modern .NET code is a different beast.

The reason that I share this campfire story is because that is essentially what managed DirectX/3D feels like.  I’m not going to talk about what it actually is or isn’t because I barely went further than the guided tour before I got tired of writing C++ code in C#.

It seems like Microsoft agreed with me because XNA is what managed DX should have been – a modern .NET API for graphics programming that exploits (some) of .NET’s platform evolution over the C++ dinosaur. 

Finally, 4.0 grabs me where 3.0 didn’t, mostly because after my experience with .NET 1/1 vs. .NET 2.0, and my own experience with developing APIs (which I’ve been doing for the last 2 years since I write mostly platform code), I figured that Microsoft’s first stab at XNA would need work.  As an aside, one of the challenges of product development – probably the biggest challenge – is getting customers to bite on version 1.0.  There are always brave souls and sysadmins who will install betas and initial releases, but the guys with the money usually wait for a second release so the vendor has time to fix all the bugs first.  Microsoft may be one of the world’s biggest software vendors but their code is still written by people and nobody on the planet is immune to the 1.0 rule.

So, the journey begins…

Next: First steps

Advertisements

2 Comments

  1. i cant even write a tic tac toe game with all the time in the world and i’ve been programming for almost a year

  2. I am not an engineer or qualified person at all. I am totally self taught. and I have more or less 2 games programmed in C++. One using the SDL engine, and one programmed directly in directx9. I have a game 80% finished in XNA but seeing as microsoft is gonna drop it like a brick I really want to port it over to Directx. Now directx is ok until you get to the 3D stuff, now that is where I am a little stuck.

    so you cand make games if you stick at it and work hard like I have done. It is not out of reach for everyone.


One Trackback/Pingback

  1. By Studying - Which College To Choose on 28 Mar 2011 at 1:22 pm

    […] building games might be an avenue in the future Oh, sure, I mean how hard can it be. Reply With […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: