Bill Reiss is a Windows Platform Development MVP and a Senior Consultant for AgileThought

Archive for October, 2014

Around the beginning of September, Shawn Hargreaves posted on the brand new Win2D blog announcing a new open source framework from Microsoft. In his own words:

Win2D is a Windows Runtime API we’re working on to expose the power of hardware accelerated Direct2D graphics to Universal App (Windows 8.1 and Windows Phone 8.1) developers

And also:

Win2D’s design makes it easier for a C#/C++ developer to use the full capabilities of the Direct2D API without it feeling like a walled garden. These APIs can be used with XAML to produce beautiful graphics apps with rich UI.

Shawn Hargreaves is someone I hold in very high regard. He was a lead developer on the XNA game framework. He was a developer on the MotoGP series of games. He created the Allegro game library in the early 1990’s and it is still in use today. Most recently Shawn was working with the Windows Phone team, and I have the feeling that some of those experiences are influencing the implementation of this new API in a positive way.

So is this a revival of XNA? I know a lot of people have hoped for that. I would say no. First of all this is 2D only where XNA was both 3D and 2D. Also this new Win2D framework is not tailored specifically to games, it is more about high performance 2D graphics in any app. XNA was developed specifically as a game framework. People tried to use it for more but usually ran into roadblocks because of what it was originally meant for. You can still use it to write great games and I will be working on a game framework to sit on top of it to help give a higher level API to write games using Win2D. David Taylor has already published probably the first game using it, you can see it here apps.microsoft.com/…/ca04fae3-de5c-43e9-b7d0-0d0d88346d8e

It also looks like there is going to be a rich set of vector graphics available. XNA 2D really just dealt with drawing bitmaps. Even the text was drawn using bitmap sprite sheets. In Win2D you can have vector fonts and you can do some things that would have been very difficult in XNA like drawing text using an image for the fill. From what I understand some code has been pulled in from the old XNA Framework where it makes sense, so if you used XNA you may see some familiar stuff.

This framework has also been designed from the ground up to play nicely with XAML and coexist so you can use XAML where it makes sense and this Win2D library where it makes sense and mix and match. This can be really powerful.

Now it’s very early in the process, and the team is doing 2 week sprints using agile methodologies and posting to GitHub every 2 weeks. The next drop will be in a few days. They have made some great progress so far, but have a long way to go. It’s been really fun to watch their progress and I feel it’s to the point where it’s worth taking a look at. This project is funded by Microsoft and putting someone as talented as Shawn on it makes me feel they are serious about it.

So whether you’re a game developer, or need high performance graphics in your Windows Store or Windows Phone app, or just like to play with cool stuff, go give it a try.