Conflicademia arcade mode & Windows Phone 8.1

Aloha ‘oe!

So I’ve made a few updates to the arcade mode shooter. There have been a number of delays as the progress isn’t substantially great. I’ve written new movement path logic for the enemies to come down the screen. I’ve created about 35 seconds worth of level 1 following the patterns of some old school shooters.

Dumb drones that fly down from the right, then left, the right again. You get the gist. I’ve also altered the enemy test factory to generate larger enemies with more health. Feel free to head on to the Conflicademia page and give it a whirl. To attack, don’t forget to perform a swipe up-ish motion with the mouse by clicking and dragging in an upward motion.

So other than the game, I recently purchased a Nokia Lumia 925 Windows Phone that was on sale on Newegg for $200. Directly from T-Mobile it’s $408 so I thought it was a good deal and after watching the numerous webcasts from Microsoft Build 2014, I thought it would be nice to test the platform out.

To sum up my experiences, 8.0 does not hold itself well against Android. However with the 8.1 developer preview update, my Galaxy Note 3 has literally sat on my desk doing nothing. I’m currently dual wielding the devices, just in case there is some missing feature that I need. However, I’m actually starting to grow fond of this little device.

So even though 8.1 does enough to hold it’s own for me, your average bear, who is still running 8.0 probably is agonizing until the official launch. Microsoft really needs to hurry!

In 8.0 there are a number of annoyances that would have prevented me from actively using it outside of experimentation, but the update handled most of the items. There are still a few things that would prevent me from choosing it as my primary phone platform.

  1. Maps
    • Inaccuracy – I had to stop by and run an errand on “21 West St”, in which Google maps perfectly discovered the location. Unfortunately, Bing/Here either selected the wrong city and sometimes couldn’t even find it with the city
    • No mass transit (using subways) directions in the stock maps app
    • Humorously when you update to 8.1 and as you launch maps it even recommends an app GMap+, which loads it’s data from Google maps.
  2. Google Hangouts Client – This is actually my own fault. When Google introduced the idea of using hangouts as your sms client, it was great, but then it blended the lines between using gchat or sms. So when someone sent me a message on gchat, I no longer got it on this phone.
  3. Browser incognito mode – Because, when I e-stalk you, I don’t want that record on my phone

If any of you have a Windows Phone  and solutions or work arounds, I’m all ears.

Au revoir!

Hostmonster was down and HD refresh delays

My ~7,000,000,000 or so loyal readers were impacted last night(Ok really, I’m probably the only person that reads this blog) as my web hosting provider was down for about 12+ hours. So what I wanted to blog about last night is now your reading pleasures for tonight.

I finally replaced my primary drive(Crucial M4 256G SSD) that I purchased in 2011 with a fancy new Samsung 840 evo 500G. I paid about $150 less for this drive as well. It’s amazing how much the price of these drives have gone down. I’m now eagerly anticipating the release of the Intel 5960X for a long deserved refresh of my desktop.

However as an interim, with the drive migration, I also finally updated from Windows 7 to 8.1 Pro Update 2. Unfortunately even with this update, you still need ClassicShell to have the awesome “Program menu” interface that Microsoft created so long ago.

I’ve been re-installing software and configuring stuff for the last day and a half, so I finally just got Conflicademia re-compiling and deploying to my phone as well as this awesome site.

I made a tiny change so that in arcade mode you can shoot, if you do the “swipe up” motion with the mouse. Got a lot of family stuff planned for this weekend, so the next update may be next week, but I’m hoping to have some decent progress on level one.

Bonne nuit et au revoir et je mange une mouche!

Super Reduced Scope

So as I started plodding away to write some more stories and implement new weapon features to align with the story mode, I kept thinking of how to integrate my story and reduce scope. Then I decided that I would give in and say “A plus tard”(see you later) to the story for now.

So, I’ve decided I’m going to do a 5 level arcade style shooter. Each level having a 3-5 minute script then a boss battle. No score, no saving, just “pew pew”ing. This will be my first milestone for a Beta release on the play store, then gradually enhance features to make the game more appealing and also to continue learning how to use Unity.

Finally back to some Unity

So I recently went to a Unity meetup here in NYC and it definitely got my excitement level up to resume working on my game. It’s been on quite a hiatus due to my Random/Top coding initiatives. However, I’m going to put them on hold and try to super focus on the game and get it in the play store.

I messed around a little bit with adding some Facebook functionality, but realize that it was just a distraction for now. So I’m going to hide that logic and go back to just truly focusing on the story, adding levels and making the game play through with the exact same enemies and weapons.

Essentially reducing scope so I can get something out there and then eventually adding features.

Bonne nuit!

Facebook Unity – Keystore missing

So I just recently noticed that the Facebook team wrote a unity plugin to make your games easily integrate with Facebook! I’m super excited to get Conflicademia connected so off I went.

Apparently, a while ago, I attempted this before and found an old Facebook assembly that I couldn’t get working. It also conflicted with the new library and so step one was to remove that booger. This is not likely something anyone else will have to do.

The next thing was to correct an issue with the imported module. In the Assets/Facebook/Editor/android/FacebookAndroidUtil.cs class, there is a method to return the debug key store path. When imported it looked like the following

private static string DebugKeyStorePath
         return (Application.platform == RuntimePlatform.WindowsEditor) ?
            System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" : 
            System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + @"/.android/debug.keystore";

Problem is that the HOMEPATH variable doesn’t include the root drive on my machine. I assume it must include the root drive on the devs @ Facebook who worked on it. So I modified it to the following

private static string DebugKeyStorePath
        return (Application.platform == RuntimePlatform.WindowsEditor) ?
            System.Environment.GetEnvironmentVariable("HOMEDRIVE") + 
            System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" : 
            System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + @"/.android/debug.keystore";

Once that went though, I also went through the steps of creating a keystore and key in Unity through the Player/Platform settings. Facebook wasn’t working, most likely because I actually created this keystore. So I thought it was most likely due to the Key hash that Facebook requests. I used the popular keytool command that I’ve regularly seen on stackoverflow to get the keyhash but that didn’t work. I then enabled development mode and monitored the Android logging output. When I filtered to “Unity” I discovered the following line in the verbose settings

02-16 13:05:24.388: V/FBUnitySDK(22110): sending to Unity OnInitComplete({"key_hash":"[SuperDuperSecretHashKey]\n"})

I want to note that it actually put a line feed at the end of the key, so when I copied and pasted the key into facebook I had to make sure it didn’t include the has key. With that, I did a little bit more experiments and I am connected!

Conflicademia with facebook!
Conflicademia with facebook!

I’d like to get back to my next Topcoding video and this time it’s seriously a challenge! I’m not even at the coding part of it yet either! :p

Facebook connecting Android App

Well since Random coding didn’t happen, I decided to move to another hobby project which was creating an Android activity that would connect to Facebook, get me an identity so that I could use it to handle Authentication for Conflicademia. I don’t personally care about managing accounts and I was thinking of some other distraction from actual game content. Regardless, it was finally a success and I think my next personal coding session will go to the game again.

Note to others, the instructions provided by Facebook for getting started with Android Studio had a number of hurdles to overcome.

One with Gradle, which as far as I can tell is something like Maven or MsBuild with a Nuget attachment. I should have documented everything that I did to make it work, but I didn’t. Those of you trying to follow the examples and giving up. Sorry for the documentation fail.

The other issue was the instructions for generating the “Key Hash” with OpenSSL. I kept getting an error stating “remote app id does not match stored id”. So I did a little bit of Googling and came across the following link.

Regenerated the keyhash from the code sample, replaced it on the app configuration in Facebook and viola. It all worked

With that, I think tonight was generally satisfactory in terms of hobby productivity.

OAuth hath defeated me

Well to set the story straight, OAuth in conjunction with WebAPI.

I’m trying to build the backend services for Conflicademia now and I figured that it’d be a great time to learn OAuth, Asp.Net Mvc Web API, Mongo and all that integration with Mono and Unity. Building a basic Asp.Mvc site with Facebook OAuth integration was a snap. That was up and running in no time, however trying to get the session for the web api service wasn’t completely as straight forward. I’m pretty sure I’m trying to brute force the solution in all the wrong ways.

So as the story goes, I start reading various sites, trolling for an easy answer, one that doesn’t include “RTFM”. While I still haven’t found any answers that I really like, I’m open to suggestions. Otherwise, I’m thinking that the Unity client will do the OAuth portion, then just do some less than sneaky encryption to the service, where the service will sit on top of SSL.


So I was preparing materials for my “Random Coding 3” video episode and this time the subject was relating to Conflicademia in regards to the loading performance of Android and how to optimize your build in Unity so that the game has reasonable loading performance.

However, as I was prepping my material and generating the relevant evidence to prove why this session improves the performance, I disabled all my “tweaks” and re-launched the game on my phone and to my surprise, the game was still loaded in a respectable time.

I still have no clue why it just works now, though it’s good for my game, it ruined my “Random Coding – Session #3″…

So I will spend time re-creating the performance issue to prevent getting caught by it again, but I don’t think it’ll be the next Random Coding series until performance becomes a problem again and I have some hard evidence on it.

Until then, I did have some other Random Coding video ideas, so I’ll move forward with those soon. Also, I’ll get back to completing the tutorial level.

Tutorial level is almost complete!

Oh man, I’m so sleepy it almost hurts. Every heart beat seems to be jolting my chest. Regardless, I really wanted to make some serious progress on the game tonight.

The tutorial level is mostly complete, the left over tasks for the tutorial is to show how to transform, show a visual progress indicator of the debris collection and end the level  gracefully by stopping the crates, preventing movement and adding a bit more interesting narrative.

Now keep in mind this also means that I need to also implement the transform function and how to use that… but perhaps I can make that an upgrade and focus on that slightly later… Ahh blogging rubber ducky, you are good!

Ok, so with that, I can defer a number of items and move on to another level.

There is also still an issue with the graphics, I suppose the levels aren’t technically completed with the fancy pants textures and models… but I’ll stick to my original plan of focusing on the content first.

Finally fixed the web build

So after I suppose a month or so of the “New Game” button not working, I finally fixed it so that the web player is functioning again. Apparently the automated build script doesn’t suck the scene information from the Unity IDE build screen and I totally forgot about the string array in the wonky command line builder. Thus, when someone tried to click on new game, the app couldn’t find the scene to load and would silent do nothing.

Regardless, it’s done and all should rejoice 🙂

Additionally, a little while back I also solved a major performance issue where the game was taking about 30 seconds to load on the android platform. I’m going to make a random coding video to explain the details of it and also how I got around to solving it for those who have the nerdy appetite! The game now only takes 6 seconds for the main initialization and 1 second for pretty much any specific scene.

Until then, it is now extremely late and I must get some rest