Developer Diary: Getting Started on XNA

Posted 03/15/2007 @ 06:30:00 AM by Joseph Molnar
Filed under: Developer Diary , Homebrew , Programming , XNA

Each week I like to set aside a few hours to explore software development technologies I haven't tried. This past weekend I started to take a deeper look at XNA.

I'll be documenting my XNA investigation with periodic updates as a Developer Diary. Today's Developer Diary is simple, I documented what I did to get a base understanding of XNA.

The quick summary, I downloaded a variety of tools, read a variety of blogs/tutorials and created some code derived from the tutorials. So this entry is largely a collection of links that will ensure a solid start.

As a note, while I'm new to XNA and 3D programming, I'm extremely familiar with C# and .NET (background here) so I'll be assuming readers know C#.

The Base Tools

Before you can really do anything (except read) you need to install the tools, Visual C# Express and XNA Game Studio Express.

Since I'm on Vista I followed David Weller's guide to installing the base tools on Vista. Even if you aren't on Vista it is a good general description of getting the tools in place.

As a note, Dave's blog post pre-dates Microsoft's release of the Visual Studio 2005 SP1 Update for Windows Vista, so make sure you get the new update.

Also, an updated version of XNA Game Studio Express is coming this April.

Auxiliary Tools

With the base tools in place I found and installed some tools to aid my XNA experimentation.

  • Paint.NET: If you aren't a graphic artist or designer but need something to help with creating textures from photos this free tool should do the trick.
  • FX Composer: A free environment from nVidia that allows you to create shaders. Definitely a great tool for experimentation; wish they had more samples.
  • Turbo Squid: This site contains free and inexpensive 3D models that can be used with the XNA framework. I recommend experimenting with some free models.
  • Blender: Blender is a free open source 3D modeling and animation tool. It can export to .X files (one of two model formats that XNA readily supports). I find 3D modeling packages a bit daunting but this tutorial was helpful. I haven't played a ton yet, but it works on Vista (I tried SOFTIMAGE's free tool, but it wouldn't work consistently).

Tutorials and Samples

With all my tools in place, I used the sites below to get myself familiar with XNA development.

  • First place I visited was the MSDN XNA site (the same information is included as a help file with XNA Game Studio Express).
  • Next, I found Riemers XNA Tutorials. These are the most comprehensive set of easy to follow 3D tutorials I found. They progress nicely from beginner to advanced.
  • Once you have gotten the basics the XNA Creator's site samples are not a bad place to go next. While some overlap with Riemers, the samples are great for experimentation.
  • The blog Ramblings of a Hazy Mind also has a series of tutorial articles. As a slight warning, the tutorials are really guiding the creation of an XNA-based 3D graphics framework and the posts started in the betas so I don't believe the early code will work on the release version of XNA.

With the tutorials done you should be in a pretty good spot to write something more original by experimenting with the tutorial samples. I also recommend getting familiar with the growing XNA community. Here are some of the XNA related sites I regularly read.

My Bookmarked or RSS Subscribed Sites

Developer blogs that caught my attention:

  • Manders vs Machine: A Microsoft employee providing some interesting insights into various XNA problems and techniques.
  • Shawn Hargreaves: Shawn is also a Microsoft employee. His blog contains various code snippets and background information on the XNA framework.
  • abi.exdream.com: Benjamin Nitchke's blog commonly lists advanced technique's and details about his XNA work. Benjamin is definitely someone to watch.
  • Aliens of Extraordinary Ability: This blog tends to have interesting shaders being used or explored. Side-note: I'm assuming his blog's name is a reference to a special form of US Immigration Visa ... as a Canadian in the US, you become quite familiar with Visas.

Community sites:

  • Ziggyware: Contains tutorials and information about XNA built games.
  • Mykres Space: Gathers updates from the XNA community and commonly has code snippets to share.
  • The ZBuffer: Tracks the general pulse of the XNA universe.
  • XBOX 360 Homebrew: Contains information on XNA games, forums for developers, etc.
  • Let's Kill Dave: Personal blog of David Weller, Microsoft's Game Developer Community Manager.

Official Microsoft Sites:

  • XNA Creators Club Online: The official Microsoft site for XNA developers.
  • MSDN XNA Site: The Microsoft Developer Network site for XNA. Unclear if this will continue now that XNA Creators Club Online is, um, online.

Follow-on blog posts ...

My next post will describe my initial reactions to XNA, things to consider, and some questions I'm hoping to eventually find answers to.

A Showcase of XNA Games

Posted 03/05/2007 @ 06:30:16 AM by Joseph Molnar
Filed under: Homebrew , Xbox 360 , XNA

After all those articles on homebrew I have a couple posts to showcase what people are doing with the tools the console makers are giving them. This post gives some great examples of XNA's abilities (and those of the developers). I'll put some Wii examples in a follow-up. Enjoy!

From Gamey Little Hacker we have this beautifully stylized RPG. The site contains more examples of the game but this one is my favourite. Can't wait to see the finished product.

From Heloli (Japanese site) we have this space shooter. From a rough translation it looks like it is meant to be an entry for Microsoft's Dream-Build-Play contest.

From abi.exDream.com we have this shooter. The site contains many other games and test code videos. Benjamin Nitschke is clearly a talented XNA developer. Looks like he has an XNA programming book being published soon.

This interesting game is more sophisticated than it looks; it is a shooter that involves math. For more details read this article.

Here Comes Homebrew: Barriers and Predications

Posted 02/27/2007 @ 06:00:13 AM by Joseph Molnar
Filed under: Homebrew , PlayStation 3 , Wii , Xbox 360

Over the past few weeks I've explored the mass market homebrew options on the Sony PlayStation 3, Nintendo Wii and Microsoft Xbox 360. Today I finalize the 'Here Comes Homebrew' series by looking at what was preventing mass market homebrew and, for everyone's amusement, sticking my neck out with a few predications; appropriate on the eve of GDC.

What were the Barriers?

Four inter-related things: complexity, support, distribution and publishers.

Complexity

Console development is typically a complex undertaking. While Nintendo is historically credited with providing better tools than Sony, Microsoft and the Web changed things. Microsoft was built on the idea of providing tools to ease development and XNA lowers console development complexity to a new level.

As for the Web, its success was driven by the notion that anyone could bring their ideas to the world. Web development is more complex than envisioned in the early web days, but it is much less complex and more broadly reaching than traditional console development.

Support

Support needs cannot be understated. Not only are good tools needed, but so is good documentation and strong developer communities. This has been a strength of Microsoft's, from their developer website, MSDN, to Microsoft developer blogs, to communities built around Microsoft technology. The web is no different. Numerous companies provide free and commercial tools and there are plenty of communities built around Flash, JavaScript and HTML development.

Distribution

Until Xbox Live Arcade publishers owned the primary game distribution channel, retailers. With all consoles equipped with Internet connections and download services, along with two providing web browsers, getting homebrew to the console directly is no longer an issue.

Publishers

This one is not yet solved. It is easy to argue homebrew development isn’t competition for publishers but the consumer's time at the controller is likely a publisher concern. Particularly if homebrew games are free and publishers having rising development costs.

Microsoft Xbox 360

First off let's be clear, the $99 US annual fee for the XNA Creators Club isn't about Microsoft making money from the subscription. The number of people paying won't cover the engineering cost that has gone into creating and supporting XNA any time soon.

Requiring a fee and needing to provide source is about not drawing the ire of publishers and acting as a form of minimal quality control; only those serious enough to spend money will tend to create something. Microsoft is testing the waters while they complete full development and finalize their strategy.

So my predictions for Microsoft? I expect expanded APIs for Live support, including multiplayer, lobbies, etc. I do think they will eventually add VB.NET as a language choice, but they might wait to see some success first.

Microsoft will expand the Dashboard UI in a coming update. This will allow people to browse, play and rank homebrew games. Some form of both automatic and manual filtering mechanism will be put in place to minimize garbage, malicious and inappropriate homebrew applications.

While I don't believe they will remove the paid subscription for developing 360 homebrew apps, playing them will be free or require a Gold subscription. Publishers shouldn't view this as competition but as a way to find rough gems to turn into full titles. As a case in point, Sony took the free Flash game flOw and released it last week as a downloadable game.

Nintendo Wii

With the only current legitimate homebrew avenue being web, the question becomes what can Nintendo do to enhance it? They have already provided a strong browser. Providing some level of web API doesn't make sense when there really isn't the notion of a single sign-in/user focused central service nor the same kind of game completion tracking/achievements as on the 360.

They could offer extended support in JavaScript or Flash for mapping all aspects of the controller input, or offer application and game style guides including simple JavaScript/HTML/CSS templates. I don't believe this is high on their list and ultimately I don't think it matters. I really see the Wii community, not Nintendo, as the ones to carry Wii web homebrew along.

As for attracting native developers to the platform, a dev kit costs just under $2000 is well beyond homebrew developers. I think Nintendo is a bit taken back by their success and just trying to manage it. Demand by studios for dev kits even appears to be impacting Nintendo's ability to support indie developers, amateur support is likely an even lower priority. Ultimately, I don't see Nintendo sanctioned homebrew happening any time soon.

Sony PlayStation 3

While on the surface Sony has the most homebrew options, the options aren't viable as is. PS3's web browsers is apparently much weaker than Wii's and an installable OS is too complex. To compete at homebrew Sony has to bring changes.

While I can see Sony making updates to their browser, particularly as Nintendo gains attention with its browser, but just like Nintendo I don't expect Sony to create web APIs.

On the native homebrew side, Sony's Phil Harrison does have a keynote speech at next week's GDC that is meant to address 'Game Development 3.0'.

My primary guess is that it isn't homebrew, but instead APIs, store integration and maybe web support that game developers can use to allow user contributed content. While this will include game-specific scripts such as Unreal Tournament mods, this isn't true homebrew. Sony would need to officially provide tools and ideally allow mods without requiring the purchase of a game.

There are other options such as expanding upon IBM's Eclipse-based Cell SDK or porting Java with extensions just for the PS3. The former will definitely be more complex than XNA and harder to support. A Java port will be close to XNA's complexity, have benefits similar to XNA and even have a world wide developer community. I think both of these options are in the realm of possibility if Sony wanted to, but less likely than my primary guess. I anxiously await Sony's GDC announcements.

All articles in the series:

Here Comes Homebrew: Xbox 360

Posted 02/15/2007 @ 06:00:00 AM by Joseph Molnar
Filed under: Homebrew , Xbox 360

This post is a continuation of a series discussing the potential coming of mass market homebrew. In previous articles we had a look at The Sony PlayStation 3 and the The Nintendo Wii. Today we discuss Microsoft's Xbox 360.

The Microsoft Xbox 360

As a company, Microsoft's success is partially attributed to its support of the developer community. So when Bill Gates saw a modded original Xbox it seems appropriate that he was curious how homebrew developers could be engaged.

In August 2006 Microsoft's answer came with the announcement of the free development tool XNA Game Studio Express and the subscription-based XNA Creators Club.

Released in December, this is the only mechanism to do legitimate homebrew on the Xbox 360. Unlike the PS3 and Wii a web browser is not available. Until Microsoft believes people really want a browser and Microsoft is comfortable with the security implications, a browser won't come.

Unlike like the other console makers, however, Microsoft has built and continues to build infrastructure, tools and marketing programs around their homebrew platform.

The XNA Strategy

The enabling technology for Microsoft's homebrew strategy is the XNA Framework and its Common Language Runtime. In a nutshell, the framework provides APIs to access features of the Xbox 360, and the CLR is the sandbox/operating environment applications run on.

For amateur game developers there is plenty to like about Microsoft's strategy:

  1. The tools are free and allow you to build applications for Windows and the Xbox 360.
  2. There is plenty of information on the Internet and at Microsoft's developer site.
  3. Your code runs on the 360's standard operating system and allows remote debugging.
  4. The framework gives you access to much of the console's abilities including 3D graphics acceleration, audio, private storage and rummblable controllers.

So what has been created so far? There are emulators for the NES and ZX Spectrum, third party development tools, and of course people are building various games.

While the XNA strategy is starting strong, improvements and changes are needed in order to gain mass market appeal.

First, some examples of minor annoyances ... 3D sound is not supported and Achievements cannot be dished out. The lack of 3D sound support is odd considering the betas had it. The lack of achievements, however, is understandable. They require coordination with Microsoft to integrate with Live, let alone malcontents would artificially inflate their Gamerscores.

Higher on the missing features list is the lack of networking support. Without it you cannot create networked games or full media centers. The Microsoft XNA FAQ states networking support is actively being worked on. It is unclear if this is a new Live-oriented API or if they are going to enable the .NET Framework's existing API. I'm hoping for both. But Microsoft will want to attempt to prevent applications from accidentally or purposefully attacking Live or other machines.

The biggest impediments to mass market homebrew, however, are the need to spend $99 US on an annual subscription (or $49 US for four months) and the requirement to share and compile source code in order to use a homebrew application. This is undoubtedly a situation of testing the waters. After all they have a lot of customers to consider. By customers, I mean:

  1. The homebrew app writer who wants to create anything they can think of.
  2. The mass market homebrew app user who wants to use a homebrew app without compilation, worrying about security, and paying for the privilege of homebrew.
  3. The existing publishers and developers who probably want to minimize competition from free applications and won't pay for dev kits, tools, etc, if full featured alternatives are freely available.
  4. Microsoft itself, who wants to support a development community but minimize the impact on the customer support team from users of homebrew applications. This is on top of Microsoft's need to manage the situation should any of the above groups get particularly unhappy.

Essentially we are in the early stages of a longer term strategy. I equate this to how Microsoft approached Xbox Live in 2002. We are witnessing the developer-oriented first homebrew step. I'm hoping Microsoft's second step is both broader from an audience standpoint, and deeper from a technical standpoint. Let's see what they reveal at GDC.

Bottom-line: Unlike the other consoles makers, Microsoft is attempting to ensure the homebrew experience is part of Xbox 360 proper. The potential is strong but the mass market showstoppers include the need to purchase an annual subscription and the need to compile the source code of the application. Undoubtedly Microsoft will address this. Hopefully they will address it soon.

Follow-on blog posts ....

I will end this series of posts next week with a final analysis. This won't be the end of my homebrew articles however. Stay tuned, more are coming.

Currently in the series:

Here Comes Homebrew: Wii

Posted 02/12/2007 @ 06:30:00 AM by Joseph Molnar
Filed under: Homebrew , Wii

This post is a continuation of a series discussing the potential coming of mass market homebrew. The previous article discussed the Sony PlayStation 3 and today we discuss the Nintendo Wii.

The Nintendo Wii

Of all the current generation console makers, Nintendo appears to be the most reluctant when it comes to legitimate homebrew. They currently do not have an official strategy unlike Sony and Microsoft. While they said games by independent developers will happen fairly soon through a new Games Channel, I would guess 'independent developers' doesn't mean 'amateur/homebrew developers'. I'm sure we will find out at this year's GDC.

While Nintendo may not have an official homebrew strategy, the Wii appears to be the first of the current generation consoles to be hacked (no soldering required) to support homebrew applications and emulators. However, the only avenue suitable for mass market homebrew is the optional download of the Opera 9 web browser. The browser is currently a free beta but will apparently cost $5 dollars a few months after its official release.

The Web Browser

Nintendo's choice of Opera makes a lot of sense. Opera is feature rich and is available for numerous platforms including mobile phones and even the Nintendo DS. What is curious is the need to download it. Why not include it in the Wii, particularly when a less feature rich version of the Opera 9 browser is included and used by the Shopping Channel?

Perhaps it was the need to pay royalties or the fact it was going to take more time to perfect. Regardless, a downloadable browser that supports JavaScript, CSS and Flash (up to version 7) certainly provides a wealth of possibilities, like the PS3. Unlike the PS3 there is more talk of people doing web-based Wii homebrew. There are sites tracking usable Flash games, people figuring out how controller input gets mapped to JavaScript and Flash, and even media centers.

We are talking about web applications so many, if not all, of these applications and games will work on the PS3. However, people are building the sites and applications because of the Wii and as I mentioned in the PS3 article, you can build experiences specific to the console using user agent detection. Perhaps that is what WiiAim will do.

Console detection is important since there is a big discrepancy in the screen resolution offered by the Wii, which is primarily designed for standard definition television, and the PS3, which is primarily designed for high definition television. So if you are looking to build web sites or applications specifically for the Wii this design guide may be of help.

If there is anything to be concerned with, and this applies to any console based web browser, it's security. All web browsers have security holes, it is just a matter of finding them. Given the Wii's web browser is Opera 9 it has a high chance of having Opera 9 security holes.

In fact a vulnerability was already found early this year. The vulnerability can cause the Wii to crash requiring a power on/off to fix the problem. This may point to a weak or non-existent sandbox around the browser, which in turn could mean the potential to either brick the Wii or have the Wii run unintended code upon visiting a malicious web page.

This isn't scare mongering, the Wii just happens to be the first of the current generation consoles to have such a vulnerability revealed. Of course, I don't expect too many people to do their online banking via their Wii.

In general, seeing console vulnerabilities isn't much of a surprise. Traditionally consoles were closed gaming systems but today all the consoles are online and getting features that blur the line with a traditional computer. Hopefully all three console makers have done adequate vulnerability assessments of their system software and will patch adequately.

Bottom-line: In the PS3 article I mentioned web-based console homebrew being a wild card with potential. It is the Wii that is leading this charge. I doubt Nintendo will officially support it, but Wii owners are definitely making a mark. While security issues may eventually be a concern, the big thing that may stand in the way is that the web browser must be downloaded and will eventually have a small fee.

Follow-on blog posts ....

Later this week I will take a look at the Xbox 360 as I continue the look at how homebrew may be hitting its stride.

Currently in the series:

Here Comes Homebrew: Intro and PlayStation 3

Posted 02/07/2007 @ 06:00:58 AM by Joseph Molnar
Filed under: Homebrew , PlayStation 3

Gaming console homebrew is on the verge of a large metamorphosis. Traditional homebrew meant hacking consoles in ways console makers fought to prevent. However, for the first time all three current generation consoles, the Sony PlayStation 3, Nintendo Wii, and the Xbox 360, have mechanisms to allow for legitimate homebrew.

Given this legitimacy I believe we are looking at the start of a mass market homebrew phenomenon where the homebrew enthusiast can finally reach the average gamer.

The Sony PlayStation 3

I start our look at homebrew with the PlayStation 3 because oddly, compared to Sony's attempt to eliminate homebrew on the PSP, Sony has allowed the most legitimate options for non-handheld console homebrew.

Installable Operating Systems

In a move much stronger than Linux on the PS2, Sony surprised everyone when they announced the PS3's ability to install another operating system. However, it was no shock when they backed and got backing from the Linux community. Yellow Dog came first but Fedora Core, Gentoo, Debian, and Ubuntu all run on the PS3. In fact the Linux kernel was patched in early November 2006 to allow any PowerPC distribution to run on the PS3.

Sony's official solution is by far the most open and most flexible homebrew option. By allowing a separate operating system developers can quite literally create anything. You have network, I/O, blu-ray and hard drive access, and naturally full access to the Cell CPU. The biggest limitation is the lack of graphics acceleration. Yes there is access to the framebuffer, but it is near impossible to develop a game with the graphical caliber of an official PS3 title. Given Cell and framebuffer access, however, media players can be developed to run incredibly well.

From a gaming console standpoint the lack of graphics acceleration access, while disappointing to would-be game developers, is expected. Sony wants to and essentially needs to manage the process of bringing games to their console.

Traditional homebrew enthusiasts will have no issues installing Linux, trying to get the average console gamer to install Linux for a homebrew application is practically impossible. Let alone casual users will get frustrated with the library compatibility issues that commonly exist as Linux distributions version themselves. Don't get me wrong, there is the potential for a great niche audience. For example, MythTV on the PS3 is already coming together.

Bottom-line: While traditional homebrew enthusiasts will love it, the tantalizing close but unavailable graphics support for games and the complications of installing and managing operations systems means mass market homebrew is highly unlikely.

The Web Browser

The second way to legitimately run homebrew on your PS3 is through the web browser. In fact the PS3 is the only console to offer this capability out of the box.

I don't believe Sony thought of the web browser as an avenue for homebrew. Including web technology in the console eased Sony's development of things like the PlayStation Network Store. UI development is by far easier using HTML, CSS and Flash than it using C/C++. Of course including the browser also gave Sony a checkmark feature over its competitors, particularly the Xbox 360 which does not offer a web browser.

The amazing thing is that anyone who knows JavaScript, HTML, CSS, or Flash, has the potential to build applications and games that run on a PS3. No, we won’t be seeing Gears of War style graphics, but there are some engaging games built in Flash. Plus, if a site really wanted to provide an experience specific to the console, they can simply detect the user agent string of the PlayStation 3.

The benefit Sony has here is that the browser is included. Anyone with a PS3 can fairly easily access a web-based homebrew application, be it hosted on their personal computer, or somewhere on the Internet. Of course, the later is more likely. The moment an install is required the homebrew developer will lose a significant portion of their potential user base.

My only complaint is that the web browser is not as immediately engaging as starting a downloaded game or inserting a blu-ray disk; the web application must be found using the browser and run within the shell of the browser. The console makers, however, could provide a solution to this (I'll give my thoughts on how they can in a follow-up post).

Bottom-line: Web-based console applications are a big wild card that has huge potential. The success, however, is increased if the console makers officially support it. Even without support, significant potential exists.

Follow-on blog posts ....

I hate to stop here, but this entry is getting long. While I cannot write every day, I will continue this series of articles roughly every other day over the next week. I will take a look at the Wii and Xbox 360, the potential issues with officially supporting homebrew and the ways official support could come.

Currently in the series: