Sample Unity OUYA project

Since my blog post Ideal OUYA Unity dev environment is a bit complicated, I’ve decided to make a sample Unity project to help everyone quickly get their feet off the ground at the OUYA Game Jam Berlin (Facebook event).

bmjbanner-201311-ouya3

To start working, I’d recommend following these steps:

  1. Download OUYA Gamejam Unity example.zip and unzip it
  2. Rename the main folder to the name of your game
  3. Load this project in Unity 4.2.2 or later.
  4. Be sure your current build platform is Android (File > Build Settings)
  5. Click [Player Settings] and change the company name, product name and bundle identifier (Player Settings in Android tab > Other Settings)
  6. Open OUYA Panel (Window > Open OUYA Panel)
  7. On the OUYA tab, click [Sync Bundle ID]
  8. In the OUYA Panel, click through Android SDK and Java JDK and make sure no lines are grayed out. If something is grayed out, download the appropriate packages and link them to your project as described in Ideal OUYA Unity dev environment
  9. In the OUYA Panel, click [Compile Plugin], [Compile Java].
  10. Open SceneShowUnityInput (in Project window: Assets/Ouya/Examples/Scenes)
  11. (Optional)Change the default icon (Assets/Plugins/Android/res/drawable_xhdpi/ouya_icon.png)
  12. Connect your computer to your OUYA using a micro-USB cable.
  13. Press Cmd+B (Ctrl+B on Windows) to build and run your project.

For those curious how I created this sample project:

  1. Downloaded latest ODK
  2. Exported Core, Example, StarterKit packages from ODK
  3. Downloaded NGUI Free
  4. Created new project
  5. Change current build platform to Android
  6. Set Version Control Mode in Editor Settings to Meta Files and Force Text (for better version control support of assets)
  7. Installed Core, Example, StarterKit and NGUI Free packages
  8. Changed project build settings as described in Ideal OUYA Unity dev environment
  9. Replaced default Assets/Plugins/Android/res/drawable_xhdpi/ouya_icon.png with badly edited game jam icon

If you found this helpful, I’d appreciate if you could download Poker Solitaire and give it a thumbs up on your OUYA if you like it!

OUYA support for the Multiplatform Toolkit Unity Asset

After launching Poker Solitaire on OUYA, I decided that I wanted to port my game to iOS, and I heard about the Multiplatform Toolkit and contacted its developer to see if it had OUYA support. He said it didn’t, but that it should be pretty easy to add myself, so I took the risk and bought the package. Once I got it, it took me a while to become familiar and then I discovered I needed to change just two files in order to make it work: Platforms.cs and EasyPlatforms.cs and then you’ll be able to change platforms as can be seen in the image below.

Easy_Platform

MultiplatformToolSuite/Scripts/Platforms.cs

Add OUYA to the enum Platform list at the beginning of the file.

Line 6:
public enum Platform {iPhone=1, WebPlayer=2, iPad=3, iPhoneRetina=4, Standalone=5, Android=6, FlashPlayer=7, NaCl=8, iPadRetina=9, iPhone5=10, WP8=11, Windows8=12, iOS=13, OUYA=14};

Then, add OUYA detection to the UNITY_EDITOR section of the file.

Line 29-34:
else if(platformString == Platform.Android.ToString()) {
calculatedPlatform = Platform.Android;
}
else if(platformString == Platform.OUYA.ToString()) {
calculatedPlatform = Platform.OUYA;
}

Then, add OUYA detection for runtime.

Line 87-93:
else if(Application.platform == RuntimePlatform.Android) {
if ( OuyaSDK.IsOUYA() ) {
calculatedPlatform = Platform.OUYA;
} else {
calculatedPlatform = Platform.Android; //exact screen size will be calculated per-Aspect Ratio
}
}

MultiplatformToolSuite/Editor/EasyPlatform.cs

Add OUYA to the EditorPlatform enum.

Line 4:
public enum EditorPlatform {iPhone, WebPlayer, iPad, iPhoneRetina, Standalone, Android, FlashPlayer, NaCl, iPadRetina, iPhone5, WP8, Windows8, OUYA};

Add EditorPlatform.OUYA to the convertPlatform() functions.

Line 57:
case EditorPlatform.OUYA: return Platform.OUYA;

Line 79:
case Platform.OUYA: return EditorPlatform.OUYA;

Now OUYA should work for the Multiplatform Toolkit just like all the other platforms. Enjoy!

Ideal OUYA Unity dev environ.

I spent a few days setting up all my tools to get everything working for a fluid workflow from developing games to building them and installing them on my OUYA wirelessly from across the room. So, instead of having to go through what I did, here is a step by step guide to developing OUYA apps with Unity! It is a bit overwhelming, but if you just follow the steps, you should be fine. Oh, and expect it to take a while. I don’t recommend doing all of this in one sitting.

Also, there is quite a lot here, which I imagine can change over time. If you find any errors, please let me know in the comments, so I can update this post. Thanks!

Please also look at the official OUYA Unity documentation!

Extract ODK

Open the ODK

  • Download and install Unity.
  • Clone or download unity-odk-plugin. Click [Download zip] on that page to download.
  • Now open this project in Unity by clicking through the top menu in Unity: File > New Project.
  • Click Open Project tab and then [Open Other...].

Note that Unity projects are not opened by choosing a specific file as in other systems! So, find the folder where you saved the plugin and click [Open]. Note that Unity projects are just the folder where they are located, so you just need to point Unity to that folder.

Continue reading

Word Race launch today!

Today I’m proud to announce the launch of Word Race, a fun party game you can play with your friends. The game is unique in that you play with a group of friends face-to-face with only one iPhone or iPad. Everyone tries to get their team to say the special word without using any of the forbidden ones. The team that explains them fastest wins. It makes a great game for small gatherings or parties. If you could get a few friends or colleagues together to give it a try, I think you’ll like it!

You can play in English, Esperanto and German. Download from the App Store or check out the product website Word Race app to learn more!

Intense German – learn German words fast!

My girlfriend recently told me about a quick way to learn a lot of vocabulary called the Iversen’s Method. In this method you get a list of seven words to learn, then you keep shuffling them and go through them again until you remember them all. Then you get another list of seven words. After a while, you get your old words to review again. To my knowledge, no other app uses it, so if you want to learn this way on the go, I guess you better get an iPhone. ;)

She compiled a list of 2700 words in the following categories: Basics, Slang, Professions, Languages, Countries & continents, Numbers, Question words, Words for time, Weather, Family, Emotions, Clothing, Colors, Describing people, Town & outside, Traveling, Body Parts, Eating, Foods, Parts of a house, Furniture, Animals, German 201 words, German 250 words, German 301 words and Advanced words.

Try it for yourself for only $5!

Available on the App Store

50% off my book – More iPhone Cool Projects

Thanks to all who could make it to my CocoaHeads talk (APress presentation slides here (PDF). I passed your questions on to Lisa Lau and she gave me some great news!

  • In October 2010, they will have all of their books also available in ePub format which will coincide with the new APress website.
  • Their books will soon be available for purchase in the iBooks Store. They’re currently in the process of adding their entire catalog there which should be done by Fall 2010.
  • If you really want to read APress books on your iPad, you can already buy them from Amazon and read them on the Kindle iPad app.

Also, someone asked about buying dead tree copies from an actual bookstore in Germany. You can get them at Lehmanns Fachbuchhandlung. They also have several branches in Berlin which you can find by clicking on Filiale on that website. If you’re interested in bookstores in Germany, Austria and Switzerland, then here is their complete list of distributors.

Now, if you’d like to take advantage of an excellent deal, use the code MOREIPHONECOOLWJOU to get my eBook for 50% off! Which can be entered after clicking the “buy eBook” button here:
http://www.apress.com/book/view/1430229225 Note this offer expires on Nov 1, 2010, so take advantage of this incredible offer before it’s too late!

Import iTunes podcasts into Miro

If you’re a Miro user, you may have noticed that there’s a podcast in the iTunes directory that doesn’t have a Miro channel. So then, how can you watch it? There is a way and it’s actually pretty simple!

1. Subscribe to the podcast on iTunes.
2. Go to your podcast list and find the podcast to which you just subscribed.
3. Right-click on this and select Copy Podcast URL as shown below.

4. Open Miro and press Cmd+N (Ctrl+N on Windows).
5. You will see the following dialog box appear with the feed already pasted in as shown below.

6. For some strange reason, iTunes adds an automatic line break at the end of this URL, so you need to press down and then backspace to remove that.
7. Press Enter and it will now import your feed.
8. Now you can unsubscribe to this feed in iTunes and enjoy it in Miro!

The search for the perfect keyboard

WARNING: The following contains a large dose of geekiness. Please consult your physician if you have known geek allergies.

Dvorak attempt

About two years ago, I was suffering from pain in my hand and also realized that finally, for the first time in my life, I do almost all my work on my own computer, so thus I can feel free to experiment with other keyboard layouts. For the uninitiated, Qwerty was originally designed for typewriters as the most efficient layout possible to keep the bars from hitting each other and jamming. So, they scientifically analyzed a large word list and made a keyboard with this knowledge. Remington got his design and noticed if they moved just two letters, they could have the word typewriter on the top row, so it would be easy for salesmen to type. In any case, due to market momentum, most people still use this keyboard layout to this day.

Enter Dvorak. August Dvorak saw this issue in 1936 and designed his own layout, so that all the vowels would be on one hand and the most common consonants on home row on the other hand. This was optimized for typewriters, because he obviously wouldn’t know about important shortcuts like Ctrl+X, C, V for cut and paste as well as Ctrl+Z for undo and Ctrl+Q, W to quit apps and close windows on a Mac.

Dvorak keyboard layout

However, despite these limitations, I spent a month learning Dvorak and even reached a speed of 35 wpm. Unfortunately though, I experienced intense pains in my right pinkie finger from reaching up to pretty the L. I still can’t fathom how anyone would consider designing a keyboard layout so that a pinkie would have to hit such a common key so often. So, time to throw out Dvorak and keep looking.

Next! Colemak…

So, I remembered my friend Zak Greant suggesting that I look into Colemak, since it keeps the cut and paste keys in place and has the added advantage of changing as few letters on the Qwerty keyboard as possible. It also keeps the punctuation of the US keyboard, so it’s also ideal for programmers. Another feature is that it strives to make each hand do its share of the work… oh yeah, and it also remaps your useless Caps Lock key to Backspace. This last feature alone will speed up your typing speed quite a lot with very little finger training, I highly recommend it!

Colemak keyboard layout

Colemak keyboard install

So, first I have to install the Colemak keyboard. I went to Colemak.com’s Mac page and downloaded the keyboard. Then I took it into a free keyboard editor, Ukelele and added a dead key (a key which lets you enter another key to get special characters) next to the left shift so that I could easily type Esperanto and German characters. I should preface this by saying that I type around 80% English, 15% Esperanto and 5% German, but it’s annoying to always switch to the German keyboard just to type the umlauted letters like ä, ö and ü.

Caps lock config

Next comes the caps lock to backspace configuration. I already had a program called DoubleCommand installed, because I remapped the right option key on my Macbook to a forward delete key, which I find missing on a Mac laptop keyboard. So, I just had to remap the caps lock key to backspace and I was done. Well, not quite. Every time I pushed the caps lock key, the light would toggle. So, I installed another app called PCKeyboardHack and that fixed the issue. Ah, the perfect keyboard.

Hooked on Ergonomics Worked For Me!

For the sake of curiosity, I did a search on amazon for Colemak and discovered a gem called The Computer Athlete’s Handbook: Your Guide To A Healthier, Happier Techy Lifestyle. It’s not available in Germany, so I bought it for Kindle and read it on my iPhone. It goes over how to change your working environment to keep yourself from developing carpal tunnel syndrome. After reading this book and remembering a lifehacker article about how bad it is on your body to type on a laptop keyboard, I decided I needed something new. Unfortunately all the ergonomic keyboards are very Windows centric, and I’ve tried using one before and had no success with it.

Apple Wireless Keyboard

For a long time I’ve had an unused keyboard tray in my desk. I also had very poor posture, because my Macbook sits on top of a cooler, because after I upgraded its hard drive and RAM, it has always run very hot. I’ve always had to reach quite high just to type… not good. So, I read some reviews and decided to splurge for the Apple Wireless Keyboard and I have to admit that I absolutely adore it… with one caveat: the caps lock is horrible as a backspace key. They designed it so that it can’t repeat to prevent people from toggling caps lock twice by accident.

Eventually I discovered that KeyRemap4MacBook (after uninstalling DoubleCommand) has a Caps Lock LED hack which allows the caps lock on certain Apple keyboards to act normally, even though it keeps the light on. So, now I have the perfect keyboard setup. I made a site called LearnColemak.com to help me learn the setup, but found that I needed more training, so last night I bought Master Key, a typing tutor which turns mastering Colemak into a challenging game… I guess you could call it Colemak Hero without the cool graphics. :)

So, I should go practice my Colemak a bit more, so hopefully my next blog post will be typed in it!

The Dangers of Localizing your iPhone app

As many of you know, I spent the last week in Poland. Most of my time was spent in Zakopane attending the Junulara Esperanto-Semajno (Youth Esperanto Week), a gathering of around 200 young Esperanto speakers from around the world. So, how does this relate to iPhone localization?

Well, on the way back, we stayed overnight in Kraków and I wanted to visit the main market which is Rynek Główny. I was a bit surprised to realize that I already knew the word Rynek, because of the Polish localization of Dominion Minion which has Czarny Rynek, the Polish translation for an interesting Dominion card called Black Market. Black Market is an interesting card which changes the nature of a Dominion game a bit and lets you buy cards which are not active in the current game (for more details, see: boardgamegeek).

So, how is this dangerous? Well, I got into a cab and wanted to ask to be taken to the main market:

- Czarny Rynek, proszę!

Of course, this got a rather strange expression from the driver, since I had just asked to be taken to the black market! Fortunately this wasn’t a location known in Kraków, so I quickly corrected myself and we were on our merry way. I just can’t imagine what interesting adventure we could’ve gotten into had the driver actually taken us to some black market!

Fortunately I also had the iPhone app, OffMaps on hand, where I had the exact location we wanted marked as a pin which I just showed to the driver. This app shows a map where you can pre-download maps of places you plan to be abroad, so when you arrive you won’t have to pay exorbitant data roaming fees to see a map of your current location… it will just rely on your iPhone’s GPS.

If you need to localize your iPhone apps, check out the services we provide at iPhone-i18n.com, providing app translations exclusively for the iPhone.