XNA, XBox 360 and the decline of computer science

I promised some more comment on the conference on XNA game development last week. It was a fascinating event, not so much because of sparkling content (though it was good), but because of the underlying themes. This conference was for the academic community, both students and lecturers. The idea was to promote the adoption of XNA on computer science courses. Presenters included members of Microsoft’s XNA team, Nick Burton who is a graphics programmer from Rare, and Peter Molyneux from Lionhead.

XNA is Microsoft’s new framework for games development. It is a .NET wrapper for DirectX, and a replacement for the earlier Managed DirectX libraries. You can create games for both Windows and XBox 360. The initial target is student and hobbyist developers, and the development kit is free except that to deploy to an XBox 360 you have to join the XNA Creator’s Club, for a modest subscription fee. Even then, you cannot distribute your 360 game except as source code to other club members; you would need to find a publisher or get the game on XBox Live Arcade. A future XNA studio product is planned which will target professional developers.

There is an obvious benefit to Microsoft if it can establish XNA in universities. It gets students familiar with the Visual Studio/Windows platform and helps foster the next generation of Windows and XBox 360 game developers. But what’s in it for the universities?

Here the context is important. There is a crisis in computer science, with dramatic falls in the numbers of students applying for courses. I spoke to Rob Miles, lecturer in computer science at the University of Hull. “The number of people applying to courses across the country has dropped by something like 40% over the last few years,” he told me. Including games programming in the syllabus is a bit of sugar to attract new students. “It will help me motivate students to want to learn to program,” said Miles.

Microsoft says XNA will help to address another crisis, this time in the games industry itself. Developing a game has become extraordinarily expensive. The industry has moved towards the Hollywood model of big-budget titles that can make or break their publishers. Gamers on the other hand complain of too many sequels, lack of innovation, and poor gameplay. Microsoft likes to talk up XNA as the future YouTube of games, recovering the community and excitement that was around thirty years ago, in the days of the BBC micro and other home computers.

Here XNA is competing with Flash, which already has a considerable community of game developers. XNA is vastly more powerful than Flash, but for small, easily deployed games Flash has many advantages including cross-platform support and browser integration.

Is XNA just another hobbyist game programming tool, likes others including AMOS and STOS (for the Amiga and Atari ST), or more recently DarkBASIC? There is a range of opinions here. Peter Molyneux enthused to me about XNA, saying it is “a fast, efficient, better language” than earlier more compromised tools, and “built with ambition in mind,” so that XNA programmers can create the next Populous (the game which made Molyneux his fortune).

On the other hand, Molyneux undermined his evangelism by also stating that C++ remains the language of choice for professional development. If this is the case, then XNA will always be a hobbyist niche, which implies that serious students of game programming should not waste too much time on it.

Not everyone takes this line. The Rare team has spent time with XNA and appears genuinely impressed with its capabilities. Nick Burton showed us both the dramatic reduction in code and the impressive performance of XNA code. While Rare is not yet using XNA commercially, it does expect to do so in a few year’s time. This might be some sort of mixed code, using XNA for game logic and C++ for graphics heavy lifting, or might be pure XNA. A factor for Rare and any professional game studio is the extensive C++ code library which it has built up over the years, which makes any quick move to another platform out of the question.

My view is that the productivity win makes XNA or something like it inevitable in games development at every level. Timing is another matter, and C++ will be hard to shift.

Finally, a couple of hot snippets of game gossip. One is that Rare is working on a Live Arcade title. I got the impression that it is fairly well advanced, though nothing is yet formally announced.

The other is that Molyneux talked up innovation in Fable 2. He told me that it has an unique and surprising feature which he had to fight to include, and which will be unveiled in March at the Game Developers Conference in San Francisco.

Microsoft’s XNA site is here. Note that if you want to develop in XNA, you are well-advised to get hold of the wired XBox 360 controller. It is a decent controller and works nicely with XNA both on Windows and 360.

Technorati tags: , , , , , ,

XNA up and running

My install of XNA on Vista is up and running; here is the demo game I did for PCW Hands On:

In this exciting game, the magazine logo swings back and forth. Your task is to hammer the space bar at exactly the moment the logo is over the up arrow. Your score varies from 0 to 20 depending on how close the logo is to the up arrow.

Before you laugh uncontrollably at this hopelessly crude example, listen to my apologia. I set out to write a short printed article that showed how to create a working game in XNA. The XNA install comes with an example game called Spacewar, but even spacewar is too long and complex for a short article. My example has all the code in one file, the Game1.cs which is created by the project wizard. It is a real game, with a moving sprite, keyboard handler and scoring mechanism. The idea is that once you grasp how Stop the Logo works, you can easily move on to greater things.

The simplicity was a little spoilt by a silly problem: displaying the help text and score. There is no easy way in XNA to write text to the screen; at least, there wasn’t in the beta, and on a quick look there isn’t in the final release either. I used Gary Kacmarcik’s BitmapFont class; I notice he has posted some more resources since the beta so check out his blog.


Technorati tags:

Installing XNA Game Studio Express on Vista

Yesterday I attended a conference on XNA game development. More on that soon; but first a quick note on what happened when, fired with enthusiasm for XNA, I installed the release build of XNA Game Studio Express on Vista.

At least I tried. You have to install Visual C# Express first (since for some reason XNA does not work with the grown-up Visual Studio 2005). That’s OK since it works side-by-side. Visual C# Express went on OK, but setup for XNA Game Studio Express failed towards the end of the install with an error about a file that could not be run. The install then rolls back completely leaving you with nothing.

I ran msiexec with logging to see more detail. Here it is:

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: RegisterWithCSExpress, location: E:\, command: “C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VCSExpress.exe” /installvstemplates

It occurred to me that even an install without the templates might be of some use, or perhaps I could manually install the templates. So I ran up Orca (MSI editor), opened the InstallExecuteSequence table, and deleted the RegisterWithCSExpress action (yes, I’ve wrestled with MSI before).

The hacked install ran OK, and to my surprise the templates were present. This might be because of the earlier failed install, or because I also ran:

VCSExpress.exe /installvstemplates

from the command line. This command, which tells VC# Express to refresh its template cache, is the one that fails. On my system it causes VC# Express to crash, which is why it trips up the XNA install, but it appears to install the templates before it crashes so it is kinda OK.

My official advice therefore is not to try and install XNA on Vista, but the above may help if you are determined.

Microsoft knows about problems with Visual Studio on Vista; we are promised a “Vista Support Update” next year. In the meantime it does mostly work if you run it with elevated permissions.

I noticed that the Microsoft folk were running XNA on Vista yesterday.

JetBrains OMEA going free and open source

Prior to my current experiments with the IE7 RSS platform, my blog reader of choice was Omea Reader. However, despite the popularity of RSS, Omea Reader somehow never made it beyond a small niche, as I know from my own web stats. The company has just announced that the product is now free and will become open source.

Oddly, I can’t find a valid url for the announcement, though it turned up in my blog reader. Here’s the quote:

After collecting your opinions and having long internal discussions, we have finally decided to move Omea Pro into the open source domain.

This will definitely take some time, but the first step has already been made – from now on, Omea Pro is available free of charge.

Thank you for your input, and you are welcome to contribute to Omea Pro development when it goes open-source.

— The Omea Team at JetBrains

I am sorry that Omea Reader has not been a big commercial success, especially as I admire the work JetBrains is doing with its Java IDE IntelliJ IDEA and with ReSharper for Visual Studio. Even so, a big thank-you to JetBrains for doing the right thing and open-sourcing OMEA rather than freezing it as so may companies do with their abandoned products. I think the Omea code will be interesting as a .NET sample project even for those who do not want to use it. I will be intrigued to see how much PInvoke code is in there.

As an aside, one thing I notice when I talk to IDEA users is satisfied they are with the product. They feel it gives them an edge over competitors working with more popular tools like Eclipse and NetBeans. By contrast Eclipse users almost always have some grumbles. Same with NetBeans though I don’t hear so many complaints since version 5.x.

Google ranks MSN search top

This amused me. After reading on Slashdot how Google “claim the top ad position for searches relevant to its own products” I tried a few tests. The first one I tried was for the word “search”:

I noted that in my results Google was not claiming the top ad spot; what amused me more was the place of MSN search in the result list: no 1.

My hunch is that MSN gets a boost from having the word “search” in the url. An impressive lack of bias from Google.

Note that your results may (will) vary. It’s dangerous to draw any general conclusions about Google ranking from your own searches, because the search engine takes into account both your location and your previous search history. Potentially it knows even more than that about your browsing habits, if you use a product like Google Toolbar or the phishing filter that sends a record of every page visited back to the mothership, though I’m not sure how much if any of this data is used to optimize searches.

Think of it like Amazon. You go there, and all your favourite music or books are there on the front page. That’s just your history being echoed back at you, not a reliable indication of what Amazon is promoting.

As far as the Slashdot piece goes, all I can say is: case not proven.


Technorati tags: , , , ,

The death of SVG

This is not news; but I’ve just come across Adobe’s end of life notice for its SVG viewer. Adobe was a key supporter of SVG, which is the W3C standard for vector graphics and animation embedded in web pages, until it acquired Macromedia and with it the rival but proprietary Flash technology. The demise of the Adobe viewer is a shame for SVG supporters since it was the best available. All very predictable, though I’m not impressed by the reason given in Adobe’s FAQ on the subject [pdf]:

There are a number of other third-party SVG viewer implementations in the marketplace, including native support for SVG in many Web browsers. The SVG language and its adoption in the marketplace have both matured to the point where it is no longer necessary for Adobe to provide an SVG viewer.

In this context “matured” must mean “critically ill”, with Adobe’s announcement the killer blow (though let’s acknowledge that SVG was making limited headway even before the merger). The real reason comes a little further down:

You may also want to consider converting your SVG application to an Adobe Flex® application.

It’s easy to understand Adobe’s decision, though let me close with a question. How much harder would it be for Microsoft to establish WPF/E, if the industry had settled on a W3C standard rather than the proprietary Flash?

Technorati tags: , , , , ,

Developing from prototypes, and Microsoft vs Adobe

Scoble describes a common development scenario. The design team do a prototype GUI of your new app using the tools they know best – Flash or Director, usually on a Mac. This gets handed to the dev team who then try to replicate it in C++ (or VB or C# or even I guess Java).

The mismatch here is that something which is easy in Flash may be difficult or misguided in some other environment. Wouldn’t it be better if the developers and designers were working on the same platform? That’s what Microsoft is betting on with its Expression suite. Projects can be moved between Visual Studio and the designer tools, so the two teams can work on the same code. It sounds good, though I don’t like the idea of working up prototypes into finished code. You could even argue that keeping designs in Flash and final code in C++ is healthy, because it prevents that kind of shortcut.

Adobe’s answer is that you can just keep it in Flash. That’s what Apollo is all about – using Flash as a cross-platform runtime outside the browser. Alternatively you might keep it in the browser and not bother with the desktop app at all.

There’s a lot at stake here – as Nat Torkington notes, we are talking about “possible successors to the Win32 throne.” It’s not surprising that Microsoft is investing so much effort in this space. Adobe’s John Dowdell says it is “not invented here” syndrome, and that Microsoft “could have just compiled to the very capable, and very proven, and already massively-deployed Adobe Flash Player,” but it is naive not to see the strategic advantage in owning the platform. That said, Dowdell makes a good point about Microsoft’s poor track record when it comes to cross-platform software.

Realistically Microsoft will not kill Flash, but it might give it some competition, which I would welcome. I’m also looking forward to the small cross-platform .NET runtime Microsoft is talking about, though sadly it did not turn up in the just-released CTP.

Technorati tags: , , , , ,

WPF/E preview is out – but no cross-platform .NET for now

Microsoft has posted a CTP (Community Tech Preview) of Windows Presentation Foundation Everywhere, a cross-platform browser-hosted runtime for XAML, its XML GUI language. There’s a download for Mac as well as Windows, but sadly one of the most intriguing aspects of WPF/E is not yet included. You can code the CTP with JavaScript, but the promised cross-platform .NET runtime is not in this release. It is still planned though:

After the December 2006 CTP, we will also enable a managed code programming model using a subset of full CLR that will enhance the programmability side of the browsers to enable more performant and more scalable Web applications.

The quote is from the WPF/E Architecture Overview, which is a great place to start if you want to know what’s in WPF/E.

See also this interview with Forest Key from back in March, if you have not read it already.

I’ve downloaded but not tried the samples yet.

Postscript: Mike Harsh has some more info and a sample WPF/E video on his blog. The humour in the video is somehow typically Microsoft…

Technorati tags: , , ,

Conquering the Office Ribbon

Rick Strahl was struggling to apply a template to an open document:

My quest today: Apply a template to an open document in Word. Where the hell is that option buried?

My generic solution to this kind of problem is the Quick Access Toolbar. Here’s how it works in this case:

Click the little down arrow at the right of the Quick Access Toolbar

  1. Choose More Commands…
  2. Choose All Commands
  3. Scroll down the list to Templates, select it and click Add
  4. Close the the dialog

Now you can click the Templates icon on the Quick Access Toolbar and it works just like Office 2003.

Of course I still don’t know how you are meant to find it in the ribbon. This technique subverts the ribbon by providing a long, simple list of everything in Word; a kind of super-menu. But it’s actually a fair solution, since the icon stays there giving one-click access to your favourite obscurities. Further, should you happen to find it elsewhere on the ribbon, you can easily remove it.

PS: the Templates dialog is also available on the Developer ribbon, which you can display through Word options