Friday, February 2, 2007

Windows Presentation Foundation and Games

Windows Presentation Foundation (WPF) blew me away the first time I saw a demo of it when I was at Microsoft. This is the biggest thing to happen to Windows UI since 1995. While making a pleasant UI with WinForms is about a gazillion times easier than with MFC, WPF makes WinForms look so boring. You know, like the PC man in the Apple commercials. Oops.

Not long after I learned about WPF, I came across a game by Mitch Walker called Mantis. Aside from a single blog entry and a sweet video, I haven't seen much else about the project since it was announced (and presumably shown at PDC 2005. If anybody has recent news, please do share. My guess is that he moved over to the XNA team at Microsoft and either abandoned the project or is in the process of porting it to the XNA framework.

Speaking of XNA, you might be wondering why this blog is not entitled "XNA Games" or something like that. For a while there was some buzz on the 'net about Windows Presentation Foundation being a potentially great platform for 2D/casual games. XNA sort of eclipsed all that. So why the heck would I want to try making a game using WPF instead?

I'll tell you.

WPF makes a beautiful UI, and blends it seamlessly with multimedia and 3D objects. Heck, you can even do particles. Plus, wherever you have WPF (in the .NET Framework 3.0 for XP, or preinstalled on Vista) you have Windows Communication Foundation (WCF). I'm absolutely drooling. WCF has built in P2P networking. Perfect for making your games reach out to the world.

Now throw in Newtonian for physics (source code here). Wow.

XNA? Well, UI is not it's strong point (font support is terrible, for example). Cool whiz-bang graphics are. And networking? No real-time goodness for you - bad llama! So it really comes down to the kind of game you want to make, and how you want to distribute it.

Join me as we explore the strengths and weaknesses of WPF. As for XNA... maybe next time.



No comments: