Office Zombie Simulator in Flash via Unity

December 23, 2011 by Devin Reimer

With the Unity 3.5 developer preview being made available to the public yesterday, I set out to try the new Unity to Flash exporter. I’ve been looking forward to this feature since it was announced almost a year ago. The first project I decided to work on was Office Zombie Simulator, a small game Calin and I build back in February.

The major stumbling block with porting this project to Flash was that it uses iTween. As a lot of people have discovered iTween does not work with the Unity Flash exporter. Yesterday, I spent the day hacking iTween and got it to work with the Flash exporter. Get the modified version of iTween here.

With iTween working, I spent part of the day fixing up a few issues and now Office Zombie Simulator works in Flash. While it’s a little rough around the edges it is simply amazing that I’ve brought something of this complexity from Unity into Flash in just a couple of days.

Without further ado, here is the Flash version of Office Zombie Simulator.

I want to do a huge shout-out to the Unity team, what they have accomplished is incredible. I look forward to what the future brings.

7 Responses to "Office Zombie Simulator in Flash via Unity"

  1. Terry Corbet says:

    This is not a complaint or a criticism, it is a question to help us all understand what the parameters are for successful use of this workflow to create an application.

    On Windows XP with FireFox 9.x, having just installed the 11.2 Beta Debugger, if I run the demo, I get a red screen saying. “The swf will not be loaded”, and things stop at that point.

    If I try the same test, from the same host, but using Chrome 16.x, which controls when Flash upgrades are permitted, the demo runs fine. The Flash Player in that case is 11.1.

    Finally, if I try with IE8.x [because MS won’t let us XP deadbeats have IE9.x] which also has the 11.2 debug version of the plugin, it fails as with FF, but there is a moment when, if I could read more quickly, I could get you a stack trace that goes along with the error message.

    FYI, the other class of tests of current applications which fail, are all Molehill where Alchemy is being used — for physics or AR. So, I am aware that we are currently in no-man’s land while Adobe tries to commercialize Alchemy. Does Unity have a similar use?

  2. Terry Corbet says:

    If its of use to you or anyone else, I was able to pick up the stacktrace using CourseVector’s Whistler:

    Assert fail. stacktrace:
    at com.unity::UnityNative$/Ext_Flash_LogCallstack()
    at com.unity::UnityNative$/assert()
    at com.unity::UnityNative$/initialize_functionpointers()
    at com.unity::UnityNative$/Native_Init()
    at com.unity::UnityContentInternal/initNativeEnvironment()
    at com.unity::UnityContent/onFrameInitStep()

  3. Devin Reimer says:

    Hi @Terry

    On the machines I’ve tested with 11.1 everything seems to work fine (multiple browser, Windows and Mac). I have not tested with 11.2, but I’ve heard some people are having issue. I will have to take a look at that.

    From what I understand no Alchemy is being used at all. This is straight AS3 code being compiled and executed.

    As for that stack trace error. Right now that is an unavoidable error with my hacked version of iTween.

    The issue comes whenever you try to remove a monobehavior from a GameObject. This is an important part of iTween framework. So when it called Destroy(this), it removes the monoscript(itween), but then silently throws an error. As you can only see this error using a stack trace it isn’t a huge deal, other than when you are developing it can’t stop that instances of the codes execution before the end.
    This most likely has nothing to do with it not running correctly.

  4. mrKaizen says:

    Hi Devin,
    is the modified version the actual 2.0.45 (from the store..) or a “altered” 2.0.45?

    Tks in advance -_^

    ALba > mrKaizen

  5. Devin Reimer says:

    @mrKaizen I took 2.0.45 and modified it to work with the Flash exporter.

  6. mrKaizen says:

    @Devin ok, tks 😉

Leave a response