Cookie Notice

Wednesday 22 January 2014

Moving from Windows Phone to Windows 8 Apps (The Silverlight Story)

So we begin the journey.  Last night I started investigating what I could and could not do with Windows 8.  I have a number of Windows Phone games that I was thinking to port to Windows 8.  The problem?  They use graphics in Silverlight libraries.

After much searching and gnashing of teeth I found an MSDN article that explains things far better than I ever could.

If you wrote your Windows Phone app using Silverlight (pretty much all WP7 was Silverlight) you CAN port it to Windows 8.  This article gives you the "search and replace" pieces you need so you don't have to pick stuff off one at a time.  Change this reference to that and so.  Read the article, life will be good.


There is one bit of code I used from a gentleman in England by the name of Ed Smale that wrote a really slick Silverlight 3D dice simulator.  I used it (with his permission of course) in several games for Windows Phone 8.  They turned out pretty good and looked VERY good.  Ed does good work but he doesn't do Windows 8 (yet?).

Two Pigs:
Stuck in the Mud:

So I tried doing the conversion thing according to the library above.  Until I got to his Silverlight3D.dll library.  I just couldn't convert that.  The general rules seems to be Silverlight that looks like normal XAML will work fine.  Silverlight that looks like XNA (animation and games) will not.  You need to learn DirectX and rewrite things.

So, at least for me, that was a dead end.  I'm now faced with either doing something else (I rarely give up that easy) or doing differently.

I found on Codeplex a 3D dice simulator that I'm looking at but haven't decided on yet.  You may want to have a look.  Its DirectX and gives source code for both Windows 8 and Windows Phone 8 with a common library.

It's pretty primitive and probably would need a lot of polishing to be used in an app but we will see where it goes.

No comments:

Post a Comment