I want to do real-time 2D vector drawing. The graphics system of WinRT is very fragile.I feel like I can swear now that we’re way down in the list.) (Oh, and while we’re at it, fuck you MS for cancelling XNA, your only good API. And playback, well, let’s just say it has many problems too. There are “capture” devices but they incur a 500ms delay because you can’t control buffer sizes. I, again, had to disable major chunks of the app (microphone, speakers, and buzzer elements) because WInRT doesn’t expose the media system to C#. The** media system is a piece of crap compared to what we had in Silverlight** and WP7.I had to disable one of my favorite features of iCircuit (subcircuits) because I couldn’t find a way to open a StorageFile using just a path. The** file system security model is ludicrous and stupid** and dumb and confusing and stupid and annoying and a pain to use.It’s still lightyears behind Instruments, but it’s functional and enabled me to fix some hot spots in the code. They give nicely detailed reports in a UI that makes… well, some sense. The Visual Studio performance analysis tools are wonderful.One little mistake and you will have to reboot Windows (yes, I said reboot Windows) to make sharing work again. Testing the Share Charm is a real pita.Simple question to all the devs on the XAML team: if I can write code to render a visual tree using DirectX that gets dumped into a WIC bitmap, why the hell can’t you? Let me just add my voice to the 1,000,000s of other devs as we cry “Why Microsoft, why?” To export PNGs, I had to resort to deep dark black magic of DirectX and Direct2D. The WinRT XAML implementation isn’t able to render the visual tree to bitmaps (WriteableBitmap does not have the Render method).Why am I putting keyboard shortcuts into a tablet app? Because WinRT apps have to be just at home on the desktop as they need to be on tablets. So I had to write keyboard and mouse code to make that all happen. Just when I thought I had completed the port, I realized that the app isn’t functional on non-touch devices - there was a whole list of actions you just couldn’t do.CocoaTouch nailed multi-touch on their first go. Check out my implementation in CrossGraphics to see the horror unfold. Now we have to wire up 5 Pointer events instead of a single Touch event from Silverlight. WinRT introduces** yet another way to track multi-touch**.Now, this is probably not Microsoft’s fault since the perf profiler says that I spend all that stalled time in video card drivers (Intel 3000 on my dev machine), but Microsoft should lay some tough love on these hardware peeps. I can pan around with high FPS but the moment you zoom in or out, the app feels like we’re back in the 80s. The XAML implementation is slow as a snail slithering up a mountain during a rainstorm when it comes to changing the scale of render transforms.All my Silverlight code worked out of the gate and had decent performance. Microsoft did a great job of porting XAML graphics over to this new brave DirectX world.WinRT on the other hand gives you rectangles and a blog post that says “good luck”. You would be shocked to see some of the crazy bits of code I had to put in because the Win8 platform, while very rich, is also very generic and doesn’t help you at all to build standard apps (document based, tools, etc.) That is to say, Cocoa is a very mature platform designed to make apps feature-rich and consistent while also making the developer’s life easy. I was hoping for code reuse more inline with the OS X port of the app where I only had to write 4,000 loc. That said, I’m a little disappointed that I had to write 6,700 lines. This is on-par with all my other ports, and so I deem it a success. These figures represent a code reuse of 85%. NET/Mono platform I was able to reuse 39,000 lines of code and had to write 6,700 lines of platform dependent code. Then I spent about 2 months refining the UI to feel good. From there I “just” had to build up a modern desktop/tablet UI for the app. To build this version, I used the work from the Windows Phone 7 port to get the basic app working in a XAML/C# solution. Yesterday I completed the Metro, I mean Windows Store Modern App, version of iCircuit and achieved 85% code reuse from my other platforms! You should check it out, it’s amazing to see Windows 8 actually do something useful! -) (This post is the 5th in a series where I describe the code reuse of iCircuit while porting it from platform to platform. I have toiled away with the new Windows 8 OS, the new Visual Studio 2012, and the new Office 13/365 to present you, dear reader, with this fine set of charts:
0 Comments
Leave a Reply. |