Advertisement

What's your experience with building Windows Metro apps?

Started by August 30, 2015 06:42 AM
-1 comments, last by blueshogun96 9 years, 1 month ago

Since I have a really hard time finding devs that know anything about this, I thought I'd ask everyone here at gamedev to share their experiences with Windows Metro development (Windows 8/10, Surface, and Windows Phone). I wouldn't be surprised if next to none of you have ever bothered with it, but I'm running out of places and people to turn to.

I'll start with mine. My experiences have been both good and frustrating at the same time. It's been really hard finding tutorials that teach you how to write a DirectX game from scratch, and so far I've only found one at directxtutorial.com (which asks you to buy a subscription for $50 after the first few examples). I already know DirectX in general, so the biggest challenge for me was learning the C++/CX APIs associated with Windows Metro. Since I don't have $50 to spare right now, I tried googling for more info, with limited results. Finding examples on how to use the various event types wasn't very hard, but it wasn't all that easy either.

So far, I really like C++/CX. It feels like it was meant to bridge the gap between C++ and C#, as it takes some of the good features from C# while still giving us the greatness of C++. It's never something I'd rely on since it's not portable, but I still like it.

At my job, I've been given a secondary task of porting my game to Windows Metro, plus the id@xbox guys would like to see my game ported to Windows 10 with Xbox Live achievements and leaderboards (that's why I'm working so hard on it lately). Since my game uses OpenGL [ES], OpenAL-Soft, and POSIX threads, that would usually mean rewriting a large part of the game just to get it running on a Microsoft platform. Fortunately, Mr. Hodgman pointed out the ever so useful libANGLE which wraps OpenGL ES functions to Direct3D11, and someone out there ported OpenAL-Soft to Windows Metro using XAudio2, saving me lots of headache. But what about the POSIX threads? I had to grab the source code to the Win32 pthread library and port it to Windows Metro myself. It wasn't hard, but I did have to remove some redundant functionality, and redirect some unsupported functions like WaitForSingleObject, CreateEvent, etc. to their "Ex" counterparts. This weekend, I've spent a great deal of time trying to learn how to do the most basic things, such as include resources and .dll files into your app bundle. Fortunately, adding such files was as easy as dragging and dropping into a folder in your project solution, then telling Visual Studio that these are content files. Similarly, .dll files were also copied to a folder in your Visual Studio solution, and treated as content.

Since my game has some .c files, I noticed that Visual Studio would not compile those. So I had to disable Windows RT for those files in order for them to compile. Same with a few .cpp files, which wasn't that big of a deal.

At the above, this is where all the easy stuff ends. I find these next things to be very hard to do (even though they sound very basic and trivial). When I had missing .dll files, I would simply get a complex and unfriendly error. Only when the debugger was on, would it alert me that it was a missing dll that causes the app to fail. In fact, it doesn't even tell you which one it is! I seriously don't know what Microsoft was thinking. What I had to do was download an old program called "Dependency Checker" to find out what .dll files this app depends on. It worked and helped me solve my problem, but Microsoft should have added a message telling us what was missing. Now, this is the one thing I haven't found out with all the hours of googling and searching through MSDN. How to setup folders within your app, and where is the app's temporary folder location? I tried right clicking the folders to change the properties, but no such options come up. I can't seem to create directories either. Until I can figure this out, I can't actually go any further with my game port. How do I deal with this?

So, that's been my experience with Windows Metro. It's all dandy.... assuming you can find the information you need as a beginner. So far, it's not as hard as other platforms like, I dare say, Android. If it were documented better, I think that would help. MSDN has been helpful, but hasn't told me how to do the most basic and trivial stuff.

Shogun.

This topic is closed to new replies.

Advertisement