Archive for September 27, 2014

ZOS for Android: Beta 0.6, with player maps!

Hey everyone,

I’ve just pushed out a new release of ZOS for Android to the beta testers. This version includes the ability to play ZOS on the over 2,500 maps created by players of Class 3 Outbreak, using the editor at!

On the map select screen there is a new Player Maps tab, where you can zoom in to find a map you’d like to play.

ZOS for Android player maps (world)

ZOS for Android player maps (North America)

When you get close enough you can see a preview of the area covered by the map.

ZOS for Android player maps (map area)

This now completes all of the features planned for the first release of ZOS on Android. However there’s still a bunch of stuff left to do before it is ready for release… so it’s time for me to get back to it :)

If you’d like to be a beta tester, just fill out this form and I’ll give you access.

More screenshots of the beta are available in these recent posts: version 0.5, version 0.4, version 0.3, version 0.2, version 0.1.



Keeping Class 3 Outbreak Alive

TL;DR: Google have shut down the Google Maps Flash API which the web versions of Class 3 Outbreak and Zombie Outbreak Simulator were using. I’ve hacked together a workaround which mostly works. Full details below :)

Jay and I started working on Class 3 Outbreak way back in February 2009, about five and a half years ago. Jay had pitched me his idea for an RTS zombie game, but initially we hadn’t decided on any details such as if it should be 2D or 3D, or for PC, web or mobile, etc.

At one point during the discussion Jay sent me this quick mockup he’d drawn over a screenshot from Google Maps, showing the kind of scale that the game would be played at, and how zombies would move down a street, infecting civs and taking over the city. Then he said something like “wouldn’t it be good if we could use Google Maps?”.

Jay's Google Maps Mockup

In my day job in the mining industry I’d used the Google Maps JavaScript API before, so I knew something would be possible, but slow. These days the HTML5 canvas element can be used to make web games with high-performance 2D graphics. However 2009 was a different era in web development. Chrome had only been released a few months before, with only a couple of percent market share. Internet Explorer was still the dominant browser, and wouldn’t add the canvas element until IE9 in 2011.


Image from Wikipedia

Back then the dominant platform for web games was Flash. After some research I discovered that Google had released a Flash API for Google Maps about 9 months earlier. I did some experiments and found that it worked really well for what we needed, and so we jumped into development.

Using the Flash API we released Zombie Outbreak Simulator in November 2009, the original Class 3 Outbreak in April 2010, and the new editor-based Class 3 Outbreak in April 2011. In total we’ve had over 4.5 million plays of those games on the Flash API.

However, trouble arrived in September 2011 when Google announced that they were deprecating the Flash API. They were going to keep it running for 3 years, after which they would shut it down, and so our games would no longer work.

By this time web technologies had improved, and so it would be feasible to build Class 3 Outbreak with JavaScript. At one point I threw together a quick proof of concept of drawing sprites and overlays over a map (as required by the game and editor).

JavaScript Proof of Concept

However, there’s obviously a big gap and a lot of work between this proof of concept and a complete rewrite!

At the time of Google’s announcement we’d already decided to take a break from the web version of C3O in order to focus on making ZOS for iOS. So we were now hoping that we’d earn enough from ZOS on iOS to be able to afford to rewrite the game.

Our initial sales on iOS were encouraging, but not enough to fund a new JavaScript version of C3O. So in April 2012 we decided to keep focusing on iOS for the near term, releasing a few updates over the next 5 months.

In December 2012 Jay and I decided to part ways, and I took over Binary Space. I announced a two-prong strategy where I was planning to continue work on both ZOS on iOS and C3O on the web. Binary Space had barely broken even from sales of ZOS on iOS. There was no spare cash to fund a JavaScript rewrite, so I just continued to update the Flash version of C3O. I knew that eventually I’d have to throw away any new work on C3O and rewrite it, but I figured I’d worry about that later :) Over the next approx 6 months I released some updates to both ZOS and C3O.

Screen Australia Logo

In mid 2013 I decided to apply for funding from Screen Australia’s Interactive Game Fund, which the (former) Australian government had set up to support the local games industry. A ‘third prong’ of my plan for Binary Space had been to release ZOS on Android as well, and so I applied for funding to make an Android version. Besides wanting to release the game on Android for all the people who’d been asking for it, I hoped that an Android version would bring in some extra income which could be used to fund a rewrite of C3O.

At the end of September 2013 I heard back from Screen Australia – my application for funding had been successful! From there it took a couple of months to work out the contract with Screen Australia, so by the end of November the money was in Binary Space’s bank account and so I was ready to start. On my funding application I’d partnered with James to make new artwork, and I put out a call to hire a programmer to help me out, after which Tim came on board.

At the time I planned to start development in January 2014 and then release the game in May.

Planned schedule for ZOS on Android

This obviously turned out to be a bit optimistic! :) We’re now in September and the game’s not done yet. We’ve released five beta versions over the last few months (1, 2, 3, 4, 5), so it’s getting close though.

I knew the planned completion date of May was pushing up very close to Google’s shutdown date of the Google Maps Flash API of September. I was optimistic (aka deluding myself) that this might be enough time to rewrite the game in JavaScript, if the Android release was successful enough to hire another programmer to help me. As I passed the May release date this time frame got more and more squeezed. Even when it got into August I figured “September” was “some time next month” and so that surely meant “September 30th at 11:59pm” which was heaps of time, right? :)

Then 3 weeks ago Google sent me a reminder email saying that they’d be shutting off the Flash API in 3 weeks, ie today. Oops.

The Google Maps Flash API was deprecated on September 2, 2011 and will continue to work until September 2, 2014. On that date, the Google Maps Flash API will be turned off and requests to the API will fail. This will not be delayed.

Obviously, 3 weeks is not enough time for a complete JavaScript rewrite! However gets about 12,000 visitors per month, so it would be a shame to just let Class 3 Outbreak die. I quickly finished off the helicopters beta for ZOS on Android, and put the Android version on hold to see if I could hack together some kind of workaround in the time I had left.

What I’ve come up with is an ugly Flash and JavaScript hybrid. Instead of including the map in the Flash code, the Flash app is set to transparent, and a JavaScript map is inserted behind it. With a bit of hackery, the two are kept in sync.

Here’s how the game was put together before, all in Flash:

Class 3 Outbreak app layers in Flash

And here’s the hackery of how it fits together now:

Class 3 Outbreak app layers Flash and JavaScript hybrid

For the most part, this hack works reasonably well. For example here’s how it used to look:

Class 3 Outbreak using Flash maps

And here’s how the new version looks:

Class 3 Outbreak with JavaScript maps

Other than the copyright messages, it looks about the same. There are a few other glitches though. The main one is that the map and game don’t perfectly synchronize with each other, so they jump around a bit when the map is being dragged. The following is a demo, although this has been slowed down, so it looks worse than it really is.

Flash and JavaScript maps synchronization

This approach has been used for the editor-based version of C3O, which includes the game, the editor, and the world map. The editor and world map also look slightly different to how they were before, but the functionality is much the same.

However, there are two other apps using the Google Maps Flash API – the original versions of ZOS and C3O from 2009 and 2010.

Flash games are generally designed to spread around the Internet. While there are large Flash game portals like Kongregate and Newgrounds, there are thousands of other sites, and a successful game will be copied everywhere. Flash games usually include ads of some kind (or sponsorship by a website), so that the original author can earn some income from having their game spread around.

This was a problem for the original Class 3 Outbreak, because the Google Maps Flash API required a key which locked it to a specific domain. This meant it could only work on a limited number of sites for which we’d inserted keys into the game. We worked around this problem by having two maps in the game. The original Washington map used Google Maps, and we added a second map of Leicester, England which used aerial photos embedded into the game itself.

Classic Class 3 Outbreak map selection

It was therefore possible to play the Leicester map anywhere, and so the game could spread to portals (over 2,200 of them!). The Google-based Washington map could only be played on our site (and we also added a key for Kongregate). Players on other portals would see a link back to our site, where they could play the Washington map.

Classic Class 3 Outbreak map selection with Washington disabled

Although the Washington map never worked on the thousands of portals out there anyway, it did work on Kongregate. Obviously there’s no way I can hack JavaScript into a page on Kongregate, so that means the Washington map had to stop working there at least. Although around 18,000 people a month play the game across all portals, only around 9% of them play on itself. In theory I could have kept the Washington map working on my site with a JavaScript hybrid, but with the clock ticking before Google’s deadline, I don’t think I had time. So I decided that the easiest thing to do was to just replace the Washington map with a big fat ad for the new Class 3 Outbreak.

Classic Class 3 Outbreak map selection with world map

Although most portals are running an older version of the game and so will see the old ‘play Washington at’ message, if they click through to they’ll now see this promo instead.

The original Zombie Outbreak Simulator is where it all started, way back in 2009. Despite its age this still gets played by around 5,500 people a month. It featured only the original Google-based Washington map, and so only ran on the three sites we uploaded it to –, Kongregate, and National Geographic.

Classic Zombie Outbreak Simulator on the Washington map

I didn’t want to let ZOS die, and so I grabbed the Leicester map out of C3O and hacked it into ZOS. So now ZOS is completely Google-free, and can live to see another day :)

Classic Zombie Outbreak Simulator on Leicester map

I got all of this done in the nick of time – I was uploading the new version of everything at 1am this morning, the 2nd of September :) At the moment the Google Maps Flash API still seems to be working, but I assume it will disappear very soon.

Now it’s time for me to get back to the Android version of ZOS!