Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Microsoft XNA: Ready for Prime Time? : Page 7

How far can XNA take you in game development? Find out what seven experts in the game development industry have to say.


advertisement
XNA in Education
Beyond hobbyists and professionals, Microsoft has also been partnering with dozens of universities and game development institutes to bring XNA to the curriculum of future game developers. Mitchell explains further, "The academic community has always been a primary customer of XNA Game Studio Express in addition to hobbyists and indie game developers. Computer science enrollment in many countries around the world is on the decline and in certain regions, we're seeing reports reaching 60 percent or more decline year-over-year. While this technology isn't the silver bullet that will help to reverse that trend, it is being used by more than 80 universities globally as part of overhauling dated curriculum and lab environments. Additionally, to help these and other universities successfully adopt and integrate XNA Game Studio Express into their curriculum, we're investing even more resources towards creating an XNA Academic Program that will work with partners in the academic community to develop re-usable curriculum, game samples, lab exercises, textbooks, support resources, and more."

With support for the Xbox 360 using a simple off-the-shelf commercial console, XNA is well positioned to provide a cheap and efficient offering to game development faculties and academies looking to reach beyond PC gaming in preparing students for the gaming industry. Mitchell also adds, "The game industry's reaction has been overwhelmingly positive. The more people we can get excited about our industry and pursue careers as game developers, content creators, audio engineers, etc., the better."

Michael Austin: "In a hit-driven industry where a majority of games lose money, mitigating risk becomes very important."
Williams can certainly relate with students discovering console development through XNA, sharing some old dreams.

"The first time we had one of our engine demos up and running on an Xbox 360 was very exciting, when we realized how easy it was going to be for anyone to do this on their own. I can only imagine how stoked I would've been if somebody had released something like this while I was in high school, programming games in my spare time. To be honest, I'm not sure how often I would've been able to pull myself away from making games and playing them on my console with friends at home, and actually head into class."

"(Disclaimer! Not that this is bad for education, or anything. ;) Quite the opposite! I think managed code and XNA is a great way to learn game development, without all the trials and tribulations you suffer from beginning to learn C++ from the ground up.)"

Won't New XNA Grads get Pigeonholed?
XNA still has a long way to go before it gets widely adopted by professionals, if it even does. If the gaming industry does not follow this path and a new horde of XNA-proficient game development grads start looking for jobs, are these developers then at risk of hurting their career before it even starts? Mitchell is not worried. "There are many readily transferable skills that game developers using XNA Game Studio Express can apply at a game studio. XNA Game Studio Express is based on Visual Studio .NET, which is the leading development tool used by more game developers than any other IDE. The concepts applied using the XNA Framework will also transfer over quite well to C++ game projects. The HLSL programming in the XNA Framework is identical to HLSL they'd develop for any other game outside of XNA Game Studio Express. This goes on and on. I think it is rather short-sighted of folks to rule out a person's experiences and skills purely based on the fact they are based on managed code rather than C++."

Jamie Fristrom: "The hard part about the MMO is the server, right? No reason you can't do your client in XNA. And no reason why you can't do the server in C#."
Williams also sees XNA as a positive force in education, saying, "You want to learn game development practices in school. It's more important that you learn how to program and solve problems in general than it is that you learn how to implement systems that handle memory leaks and dangling pointers in C++. Better that you can dive right in and learn what sorts of issues you face in making a real game—making a design fun and polished—than it is to learn low-level C++ stuff. In the end, any sharp programmer can pick up that low-level stuff over time. The skills you learn and knowledge you gain in a game development course are ideally higher level. And even more important is that your programming and problem solving skills be transferable across technologies. In the course of a career in game development, you're practically guaranteed to touch all kinds of different technologies—various platforms, tools, frameworks, engines, middleware, and home-brewed systems. You need to be able to use them all to your best advantage, and roll with the needs of a particular project. Using XNA and managed code lets you more rapidly learn the truly important and difficult parts of game development, without throwing in speed bumps dealing with low-level, annoying problems when you're just starting out. So, 'pigeon-holing' isn't an issue, and as someone who hires game developers, I'd be happy to see candidates coming in with experience on XNA. Ultimately, XNA, managed code, and C# are all just a fraction of the concepts students will be exposed to going through a current computer science or game design program."

Koster is also happy that new game development students are starting fresh without so much focus on C++, hoping that this will have a lasting impact on the industry itself, elaborating, "In general, the game industry needs to do this. The industry is reliant on C++ right now, but many of the young developers are using other languages including Flash, Java, and so on. Much of the computer programming field is onto things other than C++. Even though it seems like most young programmers are curious about game development, the teaching of C++ seems to be on a bit of a decline. So anything that gives them an onramp is good for the industry."

Fristrom sees this as a positive move, and also offers advice to future game developers. "I think it's great—I wish I had that when I was going to school. Game developers are not at risk. Technology changes all the time and part of the challenge of being a game developer is you have to keep up. One thing that does concern me about engineering schools these days is they are getting too far from the metal—programmers, whether they're in games or not, should understand how pointers work and how to make dynamic data structures out of them, whether or not they actually have to explicitly use pointers in their day-to-day work. So for game engineers working in XNA I'd hope they also take some classes in C!" he says.

Austin believes that university and institutes have to primarily cultivate certain qualities in future game developers, independently of technical skills, and that XNA's enhanced level of productivity can help reach that goal. "I think that the way to inspire passion and energy in students is to get up and running fast and make it as easy as possible to learn what it takes to have a complete game. That experience transcends platform or programming languages."

Why Should Professional Game Developers Care About XNA?
Prototyping, fast iteration, higher productivity: Is this still enough to sway the bulk of the gaming industry away from C++ and into the world of managed code? Fristrom explains why his peers should follow his lead in embracing XNA for commercial game development.

Raph Koster: "For years now, a large portion of the code of many massively multiplayer games has effectively been managed code written in script."
"You can get a proof-of-concept up and running quickly and cheaply, so you can decide as early as possible whether to devote more resources to it or kill it. You get all the benefits from using the Common Language Runtime: faster build times, garbage collection, array bounds checking, pointers-free code. Did I mention faster build times? That's huge. Also, fewer bugs, more productivity. You get all the benefits from using a very parseable language—better refactoring tools and auto-completion. It's like the editor is writing your code for you. All this stuff makes you happy. Happy programmers are productive programmers."

Austin offers a practical example. "I recently wanted to test out some procedural geometry ideas for a game I was working on. What usually has been my bottleneck in the past is dealing with the infrastructure to create a windowed graphics application and support classes. With C#, in a day I had a model viewer that read in from an external source, and had sliders to test out various parameters on a fairly complex system. For me, C# is so valuable in prototyping and tools; it's almost irrelevant whether or not you could write a full, performant next-gen game exclusively in it."

However, the larger the game studio is, the harder it will be for them to migrate to or even adopt XNA. If you're sitting on an investment in dozens of man-year (or more) worth of game engine and framework code based on C++, moving to any new technology often means a much lower ROI on your existing code base.

Fristrom knows smaller studios have an advantage here. They can turn around faster, adopt new technologies more easily, and also attract the developers eager to pioneer new techniques and approaches. "Well, the established studios are basically entrenched, right? Their engines are millions of lines of C++ code. Even if a coder in the trenches wanted to switch, getting their whole studio to switch would be nigh impossible," says Fristrom. However, he says he's talked to a few programmers who wanted to join Torpex simply because they are using C# for game development.

But in the end, Fristrom believes professional studios and game developers will have no choice but to evolve beyond C++ and embrace managed languages like C# in XNA, stating, "You know, what the anti-C# reservations really remind me of was back when the industry started switching from assembly to C. You'd hear some macho programmers boast, "I write everything in assembly! C is just too slow!" And then their studio would languish or die. And [ID Software's] Doom comes along and John Carmack says that there are only two assembly language functions in the whole game. That opened a lot of eyes. Maybe we're not quite there yet, but at some point, writing in C++ is going to be considered a premature optimization."

Williams agrees with Fristrom and elaborates further. "It's a pattern that's repeated itself a bunch of times. C was lambasted when people first started talking about using it in game development too! Back in the day, it was assembly or death. Even today, you can squeeze out more performance in most routines by writing them in assembly than in C++, if you're willing to put the time in. But man, who wants to?"

Nitschke agrees with Fristrom and Williams, asking "Do you know anyone still doing pure assembler programming? Probably not and in 10 years you will find it hard to find pure C++ programmers too. If you look at non-game developers you see a strong shift toward .NET [that happened] in recent years. It took a couple of years too, but it is ridiculous how long it takes for game developers." He adds jokingly, "We are talking about game developers here. You have to fear the managed code; it may eat your family."

Williams is confident about the viability of new technologies and languages like XNA and C# because in the end, you have to manage your priorities on what is more important, and more costly, saying, "Higher-level languages, and higher-level systems usually win in the end because developer time is more precious in the long run than processor time."

Mitchell believes this will change over time, saying the fear of managed languages will disappear "as more professional game developers get hands-on experience with the XNA Framework and find the [performance] limits out for themselves and as more commercial game titles are developed and released using XNA Game Studio Express and its professional counterpart." They'll basically have to see it for themselves.

XNA Limitations
When it comes to what XNA can't do, Mitchell is quick to focus on limitations by design rather than technical limitations, saying "XNA Game Studio Express is quite capable of many things as noted but there are definitely areas we weren't able to address fully to our satisfaction in this initial release. There is no networking support in the XNA Framework on the Xbox 360 yet, but it is planned for a future update. There's also no ability to share broadly outside of the XNA Creators Club, but as I mentioned, that is a solution that will come with our third milestone set of deliverables."

Jamie Fristrom: "When we're doing GPU programming in HLSL, that's no different than what we'd do without XNA, really."
Koster also sees the limited feature set as its main limitation. "I want it to be more open," he says. "The current method of implementing and monetizing it really seems like a bit of a tentative step in some ways. Until it's just another tool in the arsenal, it will be perceived as "that thing for hobbyists" by the industry as a whole."

As a manager, Williams has a different perspective on where a new technology like XNA might be a problem at first: human resources. "There isn't yet a large pool of experienced managed code game developers or XNA experts, which matters when you're looking at putting game dev teams together," he says.

Having done a fair bit of development with XNA, from porting Rocket Commander to the XNA Racing Game starter kit and the nine or so full games he wrote for his book, Nitschke also sees many shortcomings in XNA. He basically feels there are too many important features missing. "For a game developer, it is very important to have the ability to use existing libraries and code bases, which will be the main problem for most game developers today. If you develop for Windows it won't matter because you still can use Visual Studio Professional, the System.Net namespace for networking, other sound libraries, and whatever else you need, but you won't have any Xbox 360 support then. I think the most important missing feature right now is networking and the ability to interact with the Internet, calling Web services and so on. But having low-level access to a sound API would be helpful too; for example, in XNA you can't play MP3s from audio CDs or any other music file format except if you convert them to .wav and live with the ridiculously big file sizes."

Williams agrees with Nitschke, expanding on some of the limitations they encountered when porting Torque to XNA. "On a technical level, managed code isn't a free ride. Initializing resources is costly, and you need to be smart about managing memory (though in a very different way than you do in C++…it's more about minimizing the creation of new objects, rather than worrying about how they're allocated and freed). This limits some games as in many situations you end up wanting to preload all your resources at startup, which is not ideal given the Xbox 360's limited memory. Managed code definitely executes more slowly than C++, though that's not a huge barrier for many games. In short, like any technology, there are myriad limitations and drawbacks that need to be balanced against the advantages and benefits in the context of a particular project."

Fristrom does not see immediate technical limitations, but Torpex has also been working with a pre-release version of XNA Game Studio Professional so he might not have faced many of the limitations Nitschke still has to live with. Fristrom adds, "It's new. It's always hard to say what the drawbacks and limitations are of a new system until you've put it through its paces. So that can scare people."

Nitschke continues, sharing some first-hand experiences with XNA. "Performance-wise [developers using] managed languages do not have to fear native [code] games, but you still have to mention the problems XNA currently has on the Xbox 360. XNA is based on the .NET Compact Framework on the Xbox 360, which was developed for mobile devices and might not be enough for some applications. On the PC you can get great performance, and I have a lot of unit tests in my projects with great performance results. These unit tests are also ported to the Xbox 360, but sometimes it can be annoying if your tests get slow just because you used a for-each loop instead of a for loop just because the .NET Compact Framework does not have a generational garbage collector. You can get around these issues, but it would be much better if there would be better support for the full .NET Framework including network support and the full garbage collector in the future. Since C++ does not even have a foreach-loop and you would use a for-loop anyway, you also can't say that developing with C# would be harder; you just have to think about the issues a bit."

Raph Koster: "The first XNA hit, or hit where XNA was clearly a factor in the success, will silence doubters."
Garbage collection can indeed be the bane of the game developer. Non-deterministic finalization, such as it is featured in the CLR's garbage collector, means that objects are not freed when the developer chooses, but rather when the CLR does. This can cause problems in high-performance real-time games running at 60 frames per second if the garbage collector kicks in and takes a few extra dozen milliseconds between two frames to clean up some resources, just as the player was poised for that critical headshot in a multiplayer game. Games have to run at a smooth and consistent frame rate with no lag or hiccups. Gamers are known as some of the most vocal software users, and they have no shortage of words or venues when it comes to voicing their discontent for a (seemingly) poorly implemented game.

Case in point, Fristrom observed the following while developing Schizoid. "When programming in C# I do like to use delegates a lot—the same way you'd use lambdas in Scheme or Python. My finding there, for your more technical readers, is that you should avoid closures because they can create a lot of garbage on the heap, and that this:

// Don't do it this way Foo( myFunction );

surprisingly generates garbage whereas this doesn't:

//Doesn't generate garbage Foo( delegate(Thingy x) { myFunction(x);} );

Go figure."

Austin has also seen limitations in XNA, but remains optimistic that the tools will grow to compensate for them. "The only difficult efficiency issue I've run into with C# is extremely tight inner loop code because of type and bounds checking. Working around that gets easier as the tools and libraries get better." After all, XNA and Game Studio Express are still at version 1.0, and it is not common for such a fledgling product to be examined under the microscope to such an extent at such an early stage of its life cycle.

Williams expands further on XNA limitations, alleviating any fears one might have about the potential of XNA today.

"As to theoretical limitations…really, in terms of graphics, XNA plugs you almost directly into Direct X calls, so there's very little loss of potential graphics performance. On the CPU side, physics, AI, and other processor-intensive subsystems are less performant than in C++, but one shouldn't be mistaken here. Even most of the top-line games released today aren't taking full advantage of the multicore, multiprocessor systems available in modern consoles and desktops, so we've yet to see the limit of game complexity. Certainly nobody has utilized all this computational power with XNA yet either, so we'll see more and more impressive stuff coming down the pipe across the board."



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date