Android

Multi-platform - The real advantage of Unity

Oliver Brown
— This upcoming video may not be available to view yet.
Interacting with this video is done so under the Terms of Service of YouTube
View this video directly on YouTube

There have been quite a few mechanical additions since my last update, but the most significant thing in my latest video is it is the first on a non-Windows platform.

Unity has a large list of platforms it supports and a lot will work on all of them with no effort. For example, Gravitas currently builds and runs on Windows (Win32 and Windows 8.1 Store), Mac, Android and WebGL. With the exception of adding some settings (the Android package name for instance) I didn’t have to do anything platform specific for any of it. Although there are very few hard limitations on what can be done on the different platforms, the wildly different performance characteristics mean you do have to think about different problems.

A more straightforward problem I recently solved (after the Day 20 - Android video was made) was to decide how to deal with different mobile device orientations. My general philosophy is to try and support everything, so although landscape feels most natural for Gravitas, there isn’t really a reason not to support portrait. In fact, since the camera will adjust its zoom level to keep all the world on screen, it already supported portrait, albeit rather awkwardly. The dynamically generated levels are designed to have approximately a 16:9 aspect ratio. This means in portrait you get massive empty space above and below the planets, while making everything smaller than necessary. The solution? If the aspect ratio is less than 1, rotate the camera 90 degrees. This not only means portrait is supported, but in fact a far more general case of portrait-like aspect ratios is supported (and even better, has no mobile specific code at all).

[SOLVED] Xamarin Android and no-version-vectors

Oliver Brown
— This upcoming video may not be available to view yet.

TLDR: An error containing “–no-version-vectors” is probably fixed by updating your Android SDK Build Tools to at least 23.

I recently upgraded a project to the latest version of Xamarin Forms and got the following error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 2. Output: ERROR: Unknown option '--no-version-vectors'

A quick $ grep -ri "no-version" . on the project revealed it was being used in a dependency brought in by the Forms update: ./packages/Xamarin.Android.Support.Vector.Drawable.23.3.0/build/Xamarin.Android.Support.Vector.Drawable.targets: $(AndroidResgenExtraArgs)--no-version-vectors

Long story short, this parameter is for the aapt tool in the Android SDK Build Tools from at least version 23. Updating through the Android SDK manager fixed it.

Betrayal at House on the Hill - Betrayal Character Cards for Android

Oliver Brown
— This upcoming video may not be available to view yet.

Betrayal at House on the Hill is a board game published by Avalon Hill and designed by Bruce Glassco. The game is split into two parts. In the first, the players become trapped in a haunted house which they must explore, revealing rooms as they do. At some point the second part, the “haunt”, begins in which one player (generally) becomes a traitor and everyone plays out one of 50 scenarios pitting the traitor against the others.

An important part of the game involves tracking each of the player’s attributes (each character has a different range of possible values for each attribute). Since the included cardboard trackers can be loose and tend to slip out of place, a few different smartphone apps have appeared to help the situation.

The earliest Android version is Betrayal Character Cards. This app does the bare minimum needed. You can see a list of characters, see their attribute ranges and select the current value for each. As a small extra it also includes the birthday and hobbies of each character (which has a minor gameplay purpose).

Out of the apps available this is the simplest and has the least features. On the other hand this should run on the widest range of devices.

Swype is amazing!

Oliver Brown
— This upcoming video may not be available to view yet.

One of the things that worried me about touchscreen phones (before I got one) was typing with an onscreen keyboard. Therefore, the first touchscreen phone I got was the T-mobile G1, a phone with a hardware keyboard. Since then I had an opportunity to get a Nexus One which I couldn’t ignore. And I generally dislike the onscreen keyboard as much as I expected. That has just changed however.

I just downloaded the beta of Swype for my Nexus One and the improvement is tremendous. Instead of tapping letters, you press and hold the first letter and then drag over the other letters. With a combination of seeing when you pause and a dictionary lookup, it picks up the word you wanted to type (it works a lot better than you’d expect). There are a few issues, specifically it has difficulty with very short words (mainly because there are generally more possibilities) and there is the pathological case of pit/pot/put being difficult to differentiate. But on the whole, it’s definitely an improvement.

By the way, I typed most of this on my Nexus One (using the official Wordpress App). I added the links afterwards. Here are some videos.

Google Maps with Navigation available outside the US

Oliver Brown
— This upcoming video may not be available to view yet.

Some enterprising folks have release a modified version of the Google Maps app for android with navigation enabled that can be install on any Android 1.6 (or higher) device. Best of all is that it doesn’t require any hacking or even root access. It’s simply a matter of downloading the app and installing it.

Full tutorial on Electric Pig.

Heli Rescue now available for Android

Oliver Brown
— This upcoming video may not be available to view yet.

Our recently released iPhone game, Heli Rescue, is now available for Android handsets! It’s almost identical to the iPhone version. There are fewer sounds and no clouds, but the highscores work (and are shared across both versions). Also, Android 1.6 or better isrequired since we make use the native OpenGL ES bindings. To quote the Android Market:

If you’ve been looking for a ‘Flight Control’ style game then this is it! Join the elite team of Search & Rescue helicopter commanders and save lives. Take control of up to 4 helicopters and direct them to people in need of rescue by drawing a path with your finger. You’ll need to manage the flight paths and fuel load.