Sunday, December 22, 2013

Rift Command v0.13


Download: [WIN] [OSX]
I've never been that good at Missile Command yet it still holds a special place in my heart. Maybe it's because it's one of the first games I remember playing as a kid (I also just recently re-read the Wargames sequence in Ready Player One so that could be it) but regardless, I wanted to replay it with a rift.


You look in the direction you want to fire and press (1, 2, or 3) to launch a missile from that specific battery. Rift Command is pretty basic and I haven't had a chance to really tweak the balance yet, but as of v0.13 there's increasing enemy missile speeds, a persisted best score, and a couple different enemies that you encounter. 

If people get into it I'd like to add bonus cities and maybe even a global high score table :)




Would be great to hear any thoughts or suggestions anyone has or lemme know what's your best score! Mine so far is somewhere around 12,000.

Download: [WIN] [OSX]

Thursday, December 5, 2013

Signing a Unity game for the Mac App Store

A compiled list of the hoops you have to jump through for getting a game built with Unity 4.3.0f4 signed for the Mac App Store.

There's a handful of posts already on this but I found that many were out of date or missing a step or two. Terminal Commands are in Blue, Error messages are in Red, and any reference to Game.app or Game.pkg should be substituted with your game name. Let's jump in!

1. Create a Mac Installer Distribution and Mac App Distribution certificate on the developer portal.

2. In Unity > File > Build Settings > Player Settings...  make sure that Mac App Store Validation is turned ON. Then build your game.

3. Right-click your built Game.app file and select Show Package Contents. Under Contents... open up Info.plist and ensure that CFBundleShortVersionString and CFBundleVersion match the version set for your app awaiting upload on iTunesConnect.

You also have to add a string value for the LSApplicationCategoryType key and set it to your sub/primary category in the form of "public.app-category.subcategory-primary category" In the case of Wriggle 3D (a puzzle game) it was public.app-category.puzzle-games

4. From the Unity documentation: Fix the read permissions for your app with

chmod -R a+xr Game.app

5. Here's a tricky part. At the time of writing, you must download an older version of Xcode and use its codesign tool instead (Current version is 5.0.2). Download Xcode 4.6.3 and install it somewhere other than your existing Xcode location (so as not to overwrite it!). Then in your terminal export this variable:

export CODESIGN_ALLOCATE="path to Xcode4.6.3/Contents/Developer/usr/bin/codesign_allocate"

Skipping this step will result in later errors with the following message:

Game.app: object file format unrecognized, invalid, or unsuitable

6. Once you've done that, create an entitlements.plist file with the following entitlement (and others if your app requires them)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key><true/>
</dict>
</plist>

And run this command:

codesign -f -s "3rd Party Mac Developer Application: **Company Name**" --entitlements "entitlements.plist" Game.app

Skipping this step will result in later rejection with the following message:

App sandbox not enabled - The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list. Refer to the App Sandbox page for more information on sandboxing your app.

7. Now we have to codesign all *.dylib and *.bundle files in the following Game.app directories:
  • Contents/Frameworks
  • Contents/Plugins
8. After this, it's time to package the app with this command:

productbuild --component Game.app --sign "3rd Party Mac Developer Installer: **Company Name**" Game.pkg

8. Now under Xcode > Open Developer Tool > Application Loader... you should be able to upload Game.pkg to the store! Pat yourself on the back :)



Coming from an iOS developer used to working exclusively with Xcode, this is an annoying, but ultimately manageable, process. If you'd like to see the finished product that was submitted after all this, check out Wriggle 3D!