No Free Time

May 13, 2008

C# Debug/Release and Performance

Filed under: .net, xna — Tags: , — andrewmyhre @ 3:52 am

I’ve been listening to this webcast today:

GDC 2008: Understanding XNA Framework Performance

I learned an interesting little fact:

“Debug vs Release setting in the IDE when you compile your code in Visual Studio makes almost no difference to performance… the generated code is almost the same. The C# compiler doesn’t really do any optimisation. The C# compiler just spits out IL… and at the runtime it’s the JITer that does all the optimisation. The JITer does have a Debug/Release mode and that makes a huge difference to performance. But that doesn’t key off whether you run the Debug or Release configuration of your project, that keys off whether a debugger is attached.”

Incidentally RoeCode’s XNA game engine series is now at part 18 and is looking pretty nice. I’ve totally slacked off of looking at XNA but I’m totally going to start playing with this again now.

January 13, 2008

Building a Game Engine in XNA

Filed under: .net, xna — Tags: , — andrewmyhre @ 8:54 pm

No, not me. Blogger roecode has just started writing this series, XNA Game Engine Development. I’m in awe. I’ve fantasized about writing a game engine ever since I knew what such a thing was, but without any exposure to other game developers it’s pretty difficult to learn. I’m only as proficient* in ASP.Net because the community has been out there blogging their faces off about it - for instance the completely benevolent genius that is 4GuysFromRolla, and the excellent series of articles they produced in 2006 about the ASP.Net 2.0 Membership system - a series which, by the way, helped in large part to inspire me to be a .Net ‘evangelist’, and take myself seriously as a professional developer.

I digress, but only to make the point that it’s articles like this XNA Game Engine Development series that are going to inspire others by making it all less mysterious. I mean, I wouldn’t have the first clue what needs to be set up when creating a DirectX session. Even in an XNA Game project - there are tutorials on the Microsoft websites, but none of the code is intended to be taken as being production-level code. What are the best practises when creating your architecture? What do you need to tell your DirectX device, and what should you ask of it? Stuff that’s basically ‘in-the-know’.

So if you have any interest in game development, check out roecode’s tutorial series. It’s in development and there are currently 3 parts out. This is the kind of community content that, if anything, is going to push XNA as a serious contender in game development. Now I know that as a platform for professional development, it just doesn’t compare to C++ for low-level control, but man… this is really handing a lot of power to the hobbyists. And Microsoft have always taken the view that it doesn’t matter if their code is bloated and inordinately resource-hungry, because they rely on what must surely be Microsoft’s patron saint - Moore’s Law. Where the fuck would Windows XP be if we’d never improved upon the 486? Anyway, they’re probably hedging their bets that, pretty soon, XNA is going to perform a lot more closely to C++**, and they’ll be positioned quite nicely.

Which is really all to say - cheers roecode, I await further updates most eagerly.

Here are parts one, two and three of the series.

*Note: I’m mildly proficient

**Yes, I know that C++ will always generally outstrip C#, I mean eventually the differences just won’t be so significant.

Older Posts »

Blog at WordPress.com.