AngelHack Austin Fall 2013

I’m attending the AngelHack Mobile App Hackathon this weekend in Austin, TX.

It is hosted at Capital Factory – a start-up incubator with 50,000 square feet of amazing work space.

I get about 24 hours to turn an idea into an app, some of the ones I’m looking at are…

  • ghost net – an encrypted peer to peer communications layer that lets users exchange messages/pictures between smartphones without using the internet or any other means detectable by totalitarian governments (Egypt, or NSA)
  • Arduino Bridge – software to link an iPhone as a sensor platform the the DIY chips and maker projects that use the Adruino
  • iDead – live action zombie game based on location of your iPhone
  • Crowd video processing – upload pictures of an event from all participants – stitch together into single browse-able panoramic / 3d scene
  • video recognition – use open source video processing software to train your iPhone to recognize objects that walk past the camera (trigger an alert when ‘lady in red’ walks by)
  • iPhone/robotic integration -use sphero or romo to link with an iPhone and do interesting things (room mapping, object manipulation, etc) and/or games

iOS Projects We’re Working On

Here are some of our recent iOS projects…

* YourTeacher.com – We continue to be the iOS app development arm for yourteacher.com. They have over thirty titles in the Apple App store – majority of which have 4.5+ average ratings with literally hundreds of thousands of downloads per app.

Algebra, ASVAB, or Math are some examples of the work we’ve done for them.

* Just Picture It – created in partnership with the Mason Software Company. It evolves a mobile photo sharing into a word game with friends and family. In a turn-based game you can play in single and multiplayer mode.

Just Picture It uses the Parse.com api extensively for user authentication, push notifications, and storage of games and messages.

Using Parse to login via Facebook and retrieve Profile and Friends

I’m using parse.com to handle user authentication, either via Facebook or custom user type with email and password.

If a user signs up via Facebook we want to request access to their profile and friend list and use that information to find FB friends who are already playing our game (Just Picture It).

This example doesn’t include a lot of the prerequisite steps to get your parse app working with Facebook – see the parse.com docs for more details on that.

An example of an initial call to parse to login to Facebook with a specific set of permissions.

NSArray *permissionsArray = [NSArray arrayWithObjects:@"user_about_me",
@"user_relationships",@"user_birthday",@"user_location",
@"offline_access", @"email", @"publish_stream", nil];

[PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) {

if (!user) {
   NSLog(@"Uh oh. The user cancelled the Facebook login.");

   [self doFacebookUserHasCanceled];

   } else {

     [self performSelector:@selector(doFaceBookUserHasLoggedIn) withObject:nil afterDelay:0.1];
     }
}];

A successful login and permission request approval by the user to Facebook sends us to the function doFaceBookUserHasLoggedIn.

NSString *requestPath = @"me/?fields=name,location,gender,birthday,relationship_status,picture,email,id";

PF_FBRequest *request = [[PF_FBRequest alloc] initWithSession:[PFFacebookUtils session] graphPath:requestPath];

[request startWithCompletionHandler:^(PF_FBRequestConnection *connection, id result, NSError *error) {
    if (!error) {
       NSDictionary *userData = (NSDictionary *)result; // The result is a dictionary

       NSString *name = [userData objectForKey:@"name"];

       NSString *email = [userData objectForKey:@"email"];

       NSString *sID = [userData objectForKey:@"id"];

       // get the FB user's profile image
       NSDictionary *dicFacebookPicture = [userData objectForKey:@"picture"];   
       NSDictionary *dicFacebookData = [dicFacebookPicture objectForKey:@"data"];       
       NSString *sUrlPic= [dicFacebookData objectForKey:@"url"];
       UIImage* imgProfile = [UIImage imageWithData:
                                [NSData dataWithContentsOfURL:
                                 [NSURL URLWithString: sUrlPic]]];

       //do something interesting with this data...

       //...

       // now request FB friend list
       PF_FBRequest *request = [[PF_FBRequest alloc] initWithSession:[PFFacebookUtils session] graphPath:@"me/friends"];

       [request startWithCompletionHandler:^(PF_FBRequestConnection *connection, id result, NSError *error) {
          if (!error) {
             NSArray *data = [result objectForKey:@"data"];

             if (data) {
                //we now have an array of NSDictionary entries contating friend data
                for (NSMutableDictionary *friendData in data) {
                    // do something interesting with the friend data...

                    }
                }

             }
          }];
   }
}];

 

New iOS social game ‘Just Picture It’ launched in the App Store

Image

The social image sharing game that we developed in partnership with Mason Software Company has just been launched in the Apple App Store – it is called Just Picture It.

The iOS game uses Parse.com and Amazon AWS as the primary back-end components for storing data and sharing images.

It is free and quite a bit of fun to play with friends – please download and give it a try…

Initial Impressions of Unity3D

After evaluating 3d engines for iOS development I’ve decided we’re going to go with Unity3D.

I would prefer a native Objective-C engine but the ability to deliver for multiple platforms is very attractive (Unity can deploy to Android, iOS, Mac, Linux, XBox 360, and the Wii).

Unity development so far has been straight forward – scripts can be in c# or javascript – I’ve created several 3d scenes, used the extensive resources from the forum and Unity Answers to create a ship that uses realistic physics to move in orbit. The Unity Asset store has thousands of additional resources for Unity3D dev. Initially I’m using atmospheric planets and vectrosity for line drawing.

Unity3d scene

We play tested the game as turn based and real time multi-player – I was initially planning on a turn based approach using Apple’s Game Center for iOS but the game plays much better in real time. We evaluated several multi-player network solutions and are going to go with Photon Cloud  – very well integrated with Unity, a great price, and should be able to scale.

3D engines for iOS Development

I’m evaluating several different 3d engines for our planned iOS space combat game Torchships.

I found good overviews at Never Read Passively, Open Source iPhone game engine comparison, and The Commercial iPhone Game Engine Comparison (3D and 2D).

This week I’m digging more into Unity and cocos3d to get a better understanding of the pros and cons. Unity looks very nice but I’m not sure I want to go with a non-iOS-native solution.

Here is the list of 3D engines I’ve looked at so far…

<>

UDK – Unreal Development Kit for iOS – PC & iOS

The same toolset used to make Gears of War and Infinity Blade.

+ Beautiful graphics

+ Industry Standard, high performance

+ Completely integrated development system

– Development on PC only

– proprietary scripting

Unity 3D – web, flash, iOS, Android, PC & Mac, Wii, PS3, xBox 360

Very popular 3d engine that supports a large number of platforms.

+Large developer base and very active community

+Very nice 3d Graphics, physics, and particle effects.

+Integrated editor and asset pipeline

+Largest number of platforms available

+Javascript or C#

+Mac native development

-Not a native iOS app, all new iOS features may not be available right away

Marmalade

Engine to create of richer apps and games on iOS, Android and other platforms.

+based on c++

-based on c++ 🙂

Shiva3d

3D game engine with a graphical editor to create applications and games for Windows, MacOS, Linux, iPhone, iPad, Android, BlackBerry QNX, WebOS, Marmalade and Wii

SIO2

An OpenGLES based cross-platform 2D and 3D game engine for iOS, Android, MacOS and Windows

cocos3d

An extension to cocos2d. A sophisticated 3D application development framework for the iOS platform.

+open source

+based on and can integrate with the very powerful and popular cocos2d library

+native iOS

ISGL 3D

iSGL3D (iOS Scene Graph Library) is a 3D framework for the iPhone, iPad and iPod touch written in Objective-C, enabling the creativity of developers to flourish in a 3D world without the complexities of OpenGL.

+based on OpenGL

+iOS native

-author is not actively supporting, looking for new contributors

Using Parse to add a backend to your iOS app

We’ve had to write over a dozen server back ends for iOS applications. There is a lot of manual work involved, no matter what platform you choose (we’ve used Google App engine or custom php solutions based on Joomla). There is the code and database development on the server side, plus a lot of code on the iOS side to handle the calls to the server, error handling, etc. It’s a royal pain and something we’d like to avoid in the future if possible.

Parse is a new service that simplifies back end development for iOS immensely – it can take literally minutes to add a simple server side component to your iOS app.

Pricing is free in Beta and looks very reasonable going forward as well.

We recently used Parse to add server functionality to an iOS Math application for YourTeacher.com. The app stores user preferences to a simple Parse object. Adding Parse to our project, testing, and deploying took less than an hour. Performance is good – besides being able to save and retrieve standard dictionary objects you can use Parse to store and manipulate remote files and geo location objects.

They have a very good overview of the integration process for iOS, plus the API is available as a REST service and for the Android as well.

Highly Recommended

iOS Game – Torchships

One of the very nice new features of iOS 5 from Apple is that GameCenter will handle all of the mechanics and hosting for multiplayer turn based games. This creates an opportunity to build a very feature-rich multiplayer game without a lot of infrastructure costs.

Accordingly we’re going to design and develop a 3d turn based space combat game for the iPhone and iPad with realistic physics. The game will be ad-supported and free to download and play. We will release rapid iterations and add features as we go….

  • Using iSGL3D for the 3d graphics.
  • 4 gameplay modes – tutorial/training, hotseat (same device), peer to peer (wifi/bluetooth via gamekit), game center hosted
  • Realistic Newtonian physics.
  • Weapons include – gamma ray lasers, missiles, and kinetic launchers.
  • Terrain – terran planets, moons, asteroid fields, ring systems, dust and debris clouds.

Working title for the game is Torchships.

If you’re interested in following our progress follow this blog (see the right hand pane of this page to sign up)

If you’d like to help beta-test Torchships then please sign up at our TestFlight page – you will need an iPad, iPhone, or next generation iTouch to participate.

Functional Spec for Mason News iOS App

This is the functional specification for the update to our Mason County News iOS application. The format is based on an excellent template created by Joel Spolsky.

Overview
Mason County News is an iOS universal application that runs on an iPad or iPhone.  It is designed to pull the latest Mason County news from the Mason TX County News web site at http://www.masoncountynews.com/ via the paper’s RSS feed.

The results of the feed will be stored in local core data, the articles and pictures from the feed will also be downloaded and stored locally, with extra html and other data removed for easier viewing when offline. All updates from the site will be running as background threads….
This spec is not, by any stretch of the imagination, complete. All of the wording will need to be revised several times before it is finalized. The graphics and layout of the screens is shown here merely to illustrate the underlying functionality. The actual look and feel will be developed over time with the input of graphics designers and iterative user feedback.

Scenarios
In designing products, it helps to imagine a few real life stories of how actual (stereotypical) people would use them. We’ll look at one scenario…
Scenario 1: Mike.
Mike is a busy executive who was born and grew up in Mason, TX but now lives in Paris France. He still has friends and relatives in Mason and likes to keep up to date on what is going on back in his home town. He reads news on the go on his iPhone or sometimes at home or in his private jet on his iPad. He also likes to share articles via MMM or email with his beautiful French girlfriend so she can practice her English. He likes to read articles offline as well as online.

Non Goals
This version will not support the following features:

  • different languages

Mason News Flowchart
We’ll have time later to go into mind-numbing detail, but for now, let’s look at a quick flowchart of the service so you get the big picture. This flowchart is not complete, but it does give you the right idea for the “storyboard” of using Mason News on your iOS device.

Flowchart

Screen by Screen Specification
Mason New consists of quite a few different screens. Most screens will follow a standard format, with a look and feel to be designed in the future by a graphic designer. This document is more concerned with the functionality and the interaction design, not the exact look and layout.
All screens are created in the XCode interface builder. (The single exception is the Splash Screen, which is created using GIMP).
Each screen in Mason News is known by a canonical name which will always appear, in this document, with an underline, so you know we’re referring to a screen by name, for example, Home Page.

Default Splash
An image of the Mason TX courthouse or other appropriate image – just is displayed during initial load of application, and when first load of rss feed on first start of app.

Home Page
Displayed when app load is complete – looks like below (shows list of all newsitems in the database, sorted by most recent on top) – some items may  not have pictures

<>
Technical Note – 
All updates are in the background – starts empty

Read Article
Picking an article – will load it in the viewer – view will be scrollable down and will contain links as appropriate, also pictures (using  uiwebview)
While reading an article you can share it. share via twitter, facebook, mmm, email, google +, etc

Share Article

About App
Simple page with picture same as splash – then credits and info about Mason and the newspaper