Ray Wenderlich‘s monthly newsletter has been my friend this week, especially his links on Indie Game Development and in particular this post from Mode 7, which has a lot of advice and further links on topics from coding to finding people to help do art and animation, to business realities and marketing. The life of the Indie game developer is evidently not easy. Even a good-looking, critically acclaimed game that is featured on the App Store can still be a flop…
Now, was it sensible to spend the evening reading these things instead of developing my game (ummm – ok, I also need to prioritise among the games and non-games I have already started), befriending journalists who work for review sites, or working on my business plan?
I’ve been reading Tom Butler-Bowdon’s “Never too late to be great”, so it seems appropriate to say: today is the first day of the next 10 years. On leave from my normal work, I have devoted the day to programming – a passion of mine since 5th grade, when I used to write out code on paper to type in on my friend Russell’s computer (before my family had one). Now I have two weeks to focus on a few projects. I won’t say what they are yet, but they promise to be awesome. Of course.
In the process, I got to help my son put together his 7th birthday present (a lego fire temple – lego has transformed from space to ninja since last I looked); enjoy a beautiful sunny May day; put out some washing; and pick up the kids from school. And finish the day by setting the bread machine to have some corn bread ready in the morning. Which is a long way of saying, I had a great first day.
This diary has its origins in some advice I received last week: inch closer to your goals every day. (Though I think it was more eloquent in its original, now forgotten, form.) It seems pertinent to record this inching process, since otherwise it will be lost in time.
What did I achieve today?
My friend Mark and I are working on a website that will also be an app, and I’m working on “app”-ifying the existing website. Mark’s built the site using jQuery mobile and it’s looking good in a web browser on both a desktop and an iPhone. But we want it to be an app, with access to the phone’s phone-y capabilities. So we have decided to use Phone Gap, which effectively provides a shell app into which you can put a whole lot of webby content (html and stuff). Loading Phone Gap 1.6 and getting the traditional “Hello World” demo going on an iPhone was not too hard (I have already used Xcode a bit).
My goals for the day were: point the app to Mark’s server so that his website suddenly looks like an app; and try to get the app to take a photo.
These goals were happily achieved. To point the app to a server, you need to:
- Add the server’s URL to the “white list” (e.g. in the project in Xcode, double-click on Supporting Files/Cordova.plist, and add “*.racingtadpole.com” to ExternalHosts, for example).
- Set OpenAllWhitelistURLsInWebView to YES, so that links open in the app rather than in a separate web browser.
- In index.html, add
<meta http-equiv=”REFRESH” content=”0; url=http://www.racingtadpole.com”>
so that the app immediately (with a 0 second delay) shows the contents of the website.
- I found there is always a white flash before the website displayed. I am told using the latest versions of jQuery and jQuery Mobile should fix this; I’ll report back on this tomorrow.
Getting the app to take a photo is well described in the Apache Cordova API documentation. The only hassle I had was I forgot to change the reference near the top of the full example from
- My plan is to put cordova-1.6.0.js on the server and truly have a tiny shell of an app. But will this be “app”y enough for the App Store?