Presenting my first app of the week: Globe.
My original plan for week 1 was to release a fairly innovative sound app. But it turned out that learning Audio Unit and fast-fourier transforms in one week wasn’t going to happen. I realized this late Wednesday night, so I took a page from the JoCo playbook, and dusted off Globe so I’d have something to ship this week.
Globe isn’t actually a new app. In fact, I originally wrote it back in winter of 2008, before the iPhone SDK was even released. I had just taken an OpenGL class at the Big Nerd Ranch, and wanted a project for myself to cement my knowledge. I settled on a spinning globe. Initially, Globe ran on MacOS. I then ported it iPhone OS using the pre-SDK jailbreak toolchain. I chose OpenGL for my first iPhone project because I thought it would be more likely to run on under the (then rumored) official Apple SDK. I reasoned that Apple could change their own APIs, but not OpenGL, an already existing industry standard.
The code is very simple — I create a sphere out of a triangle mesh, and then texture map an image onto that sphere. Then I rotate the sphere many times a second, and presto — animation!
The image is from NASA’s Blue Marble project.
In subsequent years, I’ve updated the app a few times to keep it current with Apple’s SDKs. So, with a deadline looming I checked it into source code control (for the first time ever!), fixed a few glaring bugs, and shipped it off. Unfortunately, I was unable to add any new features, both due to a lack of time, as well as my now-glaring lack of understanding of OpenGL’s lighting model.
To use the app, swipe left or right to spin the globe. Tilt your iPhone to tilt the globe.
As always, I’ve posted this just after submitting the app to the app store (at June 24, 2011 23:59, according to their records — just made it!). I’ll post a follow-up when it’s available for you to download.
Man, that would be so the sample code I am looking for. Wish you had released it as open source.
[...] ended Friday at 2:09 AM Pacific Daylight Time. My final app of the summer is a resubmission of Globe. The display looks exactly the same, but the touch UI is completely redone. The old, non-intuitive [...]
Torsten, I may release it as open source in the future. I just need to do some tidying on the source first.