The Little Platform That Couldn’t

The following is a step-by-step account of me trying to get my mobile game, Pinball Sundae, released onto the Windows Phone 8 platform. Normally, I don’t really take detailed notes like this; but, for this, I had to. Going into it, I had a certain expectation: my experience deploying the game onto Android and iOS was very pleasant overall; it wasn’t free of frustrations, but I was delighted at how little I had to do to port between platforms. Moving to Windows 8 should be pretty easy, then, I thought.

I could not have been more wrong.

Early on in the process, I could tell that this would be more of an endeavor than I wanted. Not far into it, crap started to hit the fan–to a point where it was almost comical. At some moments, I was willing to bet that Microsoft simply did not want me to bring this game to their platform. So I thought I would save up all of the snags I ran into and share them, so that maybe some other developers following me might have an easier time (or decide not to mess with the platform to begin with).

Super-long bulleted list of fun–GO!!

  • First thing’s first: gotta install Windows 8. “Can’t I make WP8 apps with Windows 7?” Microsoft says “NO!” Good-bye, $200; hello, new OS! (Why exactly are you better than Windows 7 again?)
  • OK. So, I bought Windows 8 on Microsoft’s site, and they said I can upgrade from Windows 7 without formatting my drive. Sweet. So it downloads, and then I have to restart to begin the installation. Fine. But, as the process begins, I get a neat little popup saying “Windows 8 could not be installed“. Uh, what? All I could do was click “OK”. Not OK Microsoft; not OK.
    • After some Googling, I got a few tips: run CCleaner, run msconfig and disable all non-Microsoft startup services, and then run chkdsk. Only after doing all of these things was Windows 8 able to install properly. Yippee.
  • Next up, I tried to bring up the game in Unity. However, in the process of upgrading the OS, the Unity license file was lost (I guess this is in the registry somewhere, which probably got ravaged). I emailed Unity and explained the situation, and they promptly got back to me, allowing me to re-authorize the license. OK; cool.
  • So I got Unity up, got the project loaded–time to build! But, oh–some error popped up in the Unity console. It said something like “do you have the Windows Phone 8 SDK installed?” Damn. No, I didn’t. OK, my bad; I gotta get that.
  • Went to Microsoft’s site to download the WP8 SDK. Ran the installer, the setup window popped up, and then I got a user account control popup asking for permission. Uh…yeah, sure; go ahead Microsoft; install your own SDK.
    • Well… It wasn’t that simple. As soon as I clicked “Yes” to authorize the install, the setup program immediately bombed out, saying it couldn’t install the SDK. Fluke? Alright; maybe I’ll just do it again… Nope. Um… OK… Maybe a system restart is all I need; clear out the RAM/cache/bowels/etc. Still no. Are you kidding me?? (This is where the circus music started playing in my head. Ya da dadadada da da da daaa…)
  • Alright. Ah… Let’s switch gears, I thought. Let me try and get my trusty (and legit) copy of Photoshop CS2 running–I’m probably going to need it for icons or something. Clicked on it, got an admin permission error. Uh… Alright, so run the freaking thing as admin. Jesus. Right-click, “run as administrator”. (Why not do this by default?) And then…
    • New little popup: “extended attributes inconsistent”. Uh. What. (Cue the circus music again.) Thus, we arrive at my second are you kidding me?? moment. What is this? What does this mean? Google! Help!
    • It turns out… What I had to do to fix this, is the following: go into the Windows Sounds menu, in the Program Events list. Under the “Windows” category, there is an event for “Windows User Account Control”–this was the box that popped up asking for permission. I actually had to set the sound to “None” for this event. And then… Well, then it worked: I re-ran the SDK installer, clicked “Yes” on the UAC popup, and BAM! Progress.
      • That was my third are you kidding me?? moment, for those of you keeping track at home. Uh…Microsoft? What, uh… What? Why did a wonky sound event stop me from installing a program? Of course, I didn’t think to do this randomly; I found some suggestion after a fair amount of Googling. Really makes me wonder what kind of paper-clip bubble-gum contraption they have holding this excuse for an OS together.
  • Now this was maybe my favorite part: I thought to re-run the SDK installer. “Maybe the UAC sound error was related to the SDK install error? Could be, right?” I thought at that point, maybe anything was possible. And it was! I was actually able to install the SDK after fixing that “extended attributes inconsistent” error from before. Way to go. Way to fuckin’ go. (Ahem.) Anyway…
  • Now, at the end of the SDK installation, it was, like, “yeah, OK, we installed it, but you may have to enable hardware virtualization to get our shit to actually work.” What. Why? Why have this dependency? (Circus music again.) Why can’t you just work?? So, fine; I Google how to go into the BIOS and enable this feature through some cryptic menu options. *Sigh* OK, not too bad.
  • Opened up Unity again. Tried to build. Compiling scripts…and…WHAM! “System.Collections.Specialized.OrderedDictionary doesn’t exist in target framework.” Huh. Uh…
    • The problem was with NGUI, a Unity plugin I was using for my UI. It just needed to be updated. OK, I guess. So I downloaded the update from the Unity Asset Store and re-imported it.
    • namespace ‘global::’ already contains a definition for ‘UpdateManager’“. *Face palm* Come on! (I started hearing circus music here too.) GOOGLE?? Oh, thanks, Google; all I needed to do was remove a second reference to “UpdateManager” in one of the NGUI scripts. As if I didn’t love NGUI enough… (But that’s another issue entirely.)
  • So! Got the thing compiling; all the scripts were kosher. Rockin’. Now to test on the phone. But… “no Windows Phone 8 device is connected”. Oh. That’s weird. It’s plugged in… I mean, it must be because–YES! Of course!! Windows 8 won’t recognize my Windows Phone 8 via USB! Like, duh! Why would it? (Circus music.)
    • Hey, Google? …Yeah, OK. Right! Why didn’t I think of this myself? I had to install ASUS AI Charger and restart the machine. Now it recognizes the phone. That made total and complete sense, and I’m cool with it. (Are you kidding me?? moments++.)
  • Alright. Almost there, right? Gotta be almost there. So I retry the deployment, but now: Deployment failed. Device is “developer locked”. Developer locked?? What is this, Apple now? ’cause that’s just what I need.
    • Fortunately, aside from being an annoying speed bump, this part wasn’t hard: I just registered the phone for development pretty quickly and kept going.
  • Alright. Start the deployment again… Compiling…processing…packaging…making the Visual Studio project (if you must)… This could be it. This could do it! I THINK WE’RE ABOUT TO Exception: Deployment failed because Windows Phone 8 device is pin locked. Dammit.
    • All this meant was that the screen had timed out and turned off. I didn’t think that would happen since the phone was plugged into the USB port (and my Droid 4’s screen will stay on if it’s charging), but apparently not. Oh well. Just gotta tap the screen every so often to keep it awake…
  • So now that I’ve run into literally every possible snag in this process, nothing can stop me now! Redeploy…and… Are you kidding me?? Oh, it deployed alright. But. Well. The thing was…performance. I was getting about 4 FPS. Granted, this was development mode (and not release), but… Yeah. Uh… So… What? Development mode is not a problem for Android or iOS; what’s going on here?
  • So, of course, I look to the profiler for help. Ran the game through Unity and selected the profiler from the menu, and… Blank. Nothing. No data. Then I tried opening the Visual Studio project and deploying from there–and it took some time making a little performance report (“oh good”, I thought, “this should be helpful”), only to find out that the report only had DLL names (like the overall Unity player) and not actual function calls. I guess whatever Unity makes and sends to VS isn’t symbolicated. That’s cool… Looks like I gotta get the Unity profiler working then. But how…?
    • The solution was to enable the phone’s WI-FI. Are you kidding me?? Why can’t you send the data through the USB?? No; apparently, something about this has to be done wirelessly. I don’t know whose bright idea that was…
    • So, after looking at some profiling data, it looked like the function “WaitForTargetFPS” was taking up most of the frame time. The folks on UnityAnswers said that this function is called to slow down the game so that it hits the target frame rate. Well, my frame rate certainly isn’t supposed to be 4. In fact, I say “Application.targetFrameRate = 60” up in the init code, so… What?
      • Then I tried running in release mode, and… Bam. Smooth. So, is development mode on Windows Phone 8 inherently broken or something? Is it just my game? I wasn’t about to stick around to find out.
  • I figured now would be a good time to create an entry for Pinball Sundae on the Windows Phone 8 developer site. It’s $50 to become a Windows 8 developer. Sure. Fine. Whatever. (What about my yearly Microsoft XNA subscription? I only kept it around because I thought it would carry over to this. Guess not.) So I filled out all of the game data, payment info, screenshots, etc. Getting ready to actually upload the binary now!
  • At this point, I couldn’t help but notice that the icon for Pinball Sundae as seen on the phone still looked like the generic Unity cube. Turns out, one does not simply set a Windows Phone 8 app icon like one does for Android or iOS. No, fuck that. Here, you get to make a series of “flip cycle tiles” for your app. (WTF? Oh, hey, circus music.) Fortunately, the auto-generated VS project had some template ones available that I just replaced with Pinball Sundae-specific ones. I don’t know when/how/why most of those images are used, but, at this point, I couldn’t bring myself to care. (Also, why could I not do this within Unity?)
  • Now, to certify the binary, I had to go through the store test kit. This is series of tests (automated and manual QA) that the app must pass to be submitted. Most of these weren’t so bad (make sure the game doesn’t crash if you get a text message while playing, etc.), though I did have to go back and add a contact email address inside the game itself. I also noticed that Unity’s default settings for some of the textures on WP8 were a little low; I went back to specified higher-quality settings on some of them.
  • OK. Now. Should be all good. Game runs, it’s stable, passed the tests… Now I just need to make it into an “appxupload” file and upload it to the dev site. Now, how do I do this?
    • Apparently I have to locate a “Store” menu is VS. OK, let’s see, um… Hm. It’s not there. No “Store” menu. And it’s not a menu option somewhere else.
    • So I searched and searched and searched for what to do, but to no avail. Are you kidding me?? I reinstalled VS 2012. I reinstalled the WP8 SDK. Still no “Store” menu, and no way to create the appxupload file I needed. So, with that…

Well, that’s it. After all the frustration, lost time, $250, and just plain bullshit, I walk away with nothing. I suppose I could (if I really nag and whine) find a way to keep going, but… For one, I wanted this project out last week, in time for the Unity Windows Phone 8 contest. And, also… I just don’t care that much about WP8. Like, no one has it, and it’s not worth the trouble to bring apps over, at least not now. I thought it was gonna be, like, “oh, hey, WP8! I’m sure Microsoft and Unity worked together smartly and made a great game pipeline as was the case with Android and iOS” but, the fact is, that’s entirely not the case.

Oh well. At least I got my game onto my dad’s phone (it was his phone I was using to test with). Of course, then he goes and says he’d rather play it on the computer anyway.

LOL!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>