Discussion: Glitched - An iPhone App

Hey guys,

I know Tiny Speck released an official Glitch iOS app (Glitch HQ). It's nice, and I like it! In order to learn the API, I whipped up an iPhone app late last night using the iOS SDK. It's also using the sample app's background at the moment, but I'm working on putting together some new backgrounds that update based on what hub your Glitch is in.

The app updates in near real-time, showing you your current basic stats (xp, energy, mood, etc) as well as current location. Typically you'll see the location update before the Entering screen even finishes. (It's under the official rate limit too).

It also shows your avatar, and I have figured out how to render the sprite sheets. Whenever an update to your stats/location is made you will see your avatar walking. Otherwise an idle animation is made.

I am considering adding skill queueing, and the ability to keep a log of where your user has been. Still tinkering with ideas! I just started this last night, and really I'd love to get some feedback before I do much more!

Also note that the focus is on making it nice and easy to look at. Here's a little screencast...



Kevin (Glitch: Grey Gibblets)
I have a question, how did you get the real time effect? Is the iPhone app constantly querying the API? (Like, once every 2 seconds?)

I haven't read anything about usage policies yet, but that seems to me like it would be pretty bandwidth intensive.

Thanks, any thoughts?


I'm querying every 5 seconds. Believe it feels more like 2-3 seconds, and you really don't typically notice a lag in the update as you're playing the game since there is a high probability that the activities you do in the game (changing streets, acquiring XP, etc) may occur somewhere inside the 5 second interval. I tested it with 2 or 3 second updates, and while it's even more instant it feels too close to blowing the rate limit (since I'm actually hitting 2 queries per interval).

I'm familiar with the rate limit, but I'm not sure they've publicly documented it yet. It's essentially 1 query per second. (Glitch staff: correct me if I'm wrong!)

Bandwidth intensive is relative, I suppose. From a device/network perspective, it has little influence on load, but I suppose if you're using 2G/3G data and you pay per megabyte, it could get pricey over time. I should calculate what it's actually consuming, but it's really not too bad (considering it's consuming JSON data over a REST api).
It would be nice to be able to register for push notifications through apple's notification api that the app could then handle.

Aside, I think "GlitchEd" should be reserved for a Glitch Editor.
I just implemented Inventory, Skills (Learning, Available, and Learned), Achievements (though it shows all available, not your earned) and tabs to the interface. I still need to style the other screens, but the basic implementation is there. Detail screens also need to be created. But for something I haven't spent a tremendous amount of time on, I think it's coming along well.

Here's an updated screencast showing the new features in action. The new screens obviously need some design touches (table cells need some more data on some screens, and need to be styled and expanded on others), and I'm missing icons for the tabs at the bottom (any suggestions?). The app now has some of the same functionality that the official Glitch HQ has, but I'm aiming for an alternate experience and some additional features. I'm still using this as an experience to play with the Glitch API, so I'm not competing with the official app.


Push notifications are coming. I need to polish off the skills functionality on the Skills tab first, but Local Push Notifications will be quick to come.

I use this naming scheme for most of my apps (I put artificial past tenses on them), so I'd prefer to stick to it, and I've never heard of a Glitch editor before.

What do you think about the app?
GG: the app looks pretty awesome - great job.

FYI - the rate limit is currently set up so that you get 3 requests per 3 seconds; exceeding that rate gets you a 3 second delay to your next request. Subsequent requests that exceed the rate will also get the delay.
Brady: Thanks. I think there are some touches that you've done with yours that really sets it apart. It serves as inspiration, and I look forward to doing some things differently.

I've been optimizing my GlitchClient class (a wrapper with a delegate pattern) to cache certain things during runtime in order to reduce calls to the API, such as querying for streetInfo. It has kept me under the rate limit (except for when I have the app running in both the simulator and the device simultaneously). I've also put intentional delays (like on the Skills screen) since it requires 3 queries --- combined with the automatic query every 5 seconds on the Status screen this could hit the rate limit without those delays. Any thoughts to offer a skills.listCombined or players.skills?


Kevin: Yes - offering some form of bulk and / or combined calls is a good idea, something we hope to eventually do to cut down on overhead associated with multiple calls.

HQ has to make multiple calls for skills too - which makes for some quirky UI fun when you don't know the order you're going to get the responses in.
Brady: Yeah, I bet! I specifically have mine setup to call the next set of skills once I receive the first (plus add a short delay). So I completely understand what you're talking about. The rate limit forces you to think about things differently...
OK, here's an updated set of screenshots. I've got a beta going, so if anyone wants to help test it out please send me your email address and I'll send you an invite from TestFlight (which I use to manage the beta).

Glitched 1.0 beta 8 Screenshots

There are definitely some rough edges that I need to refine (such as the achievements and inventory table cells), but I've left these for spare cycles.

More feedback would be great. I'd love to release this in the near future if people think it's worth it.

Kevin: May Dane and I have an invite?

Me, me, me!

I'm davidawilkinson over on that gmail.com thing.
Invites sent. If you don't already have a TestFlight account, create one, and then register your device(s) by visiting your TestFlight account from your iOS device's browser. Then I'll add your phone id's to the next build.
edleddy over on gmail.com please :)
Bamhammer: Invite from TestFlight sent. I'll add you to the next build once you've registered your device(s) on it.
I'd love to try it out too, eb@ericbrody.com . Just registered on TestFlight. :)
Hi Kevin,

I've registered on TestFlight and would love to help try out your app. I have an IPhone4, IPad1 and IPodTouch4 that I can try the app out on :)
My email is:  tirovonne@yahoo.co.uk
Pouchwick/Aleydis: I've added both of you to the beta. If you've got your devices registered, you'll get added to the next build!
Yay! Got the invite :)

Do I need to do anything with it except for clicking on the Accept through my Iphone web browser?
Thanks! Looking forward to it!
is this app still being developed or has it been released?
please add my account tjgillies@gmail.com