Two Finger Play

iPhone game development, by a college student with a short attention span

Name:
Location: Atlanta, GA, United States

I don't wear shoes. If you see a barefoot kid walking around the Tech campus, say hi.

19.8.08

Score Downtime; Deluxe

Well, Tris has done astonishingly well — download count as of this morning was over half a million. Unfortunately, the amount of traffic from the score system completely and totally overwhelmed the shared hosting my database and script were sitting on. I've talked to the host and am hoping to find some good dedicated hosting soon; for now, though, the global score system is simply dead.

In the time in which I wasn't fiddling with and worrying about the score system, I got a few additions made that I'd seen a lot of requests for. Tris 1.0.2 (I've submitted a 1.0.1 but it's chilling in “In Review” limbo) lets you set the movement sensitivity, whether the sidebar appears on the left or right, and whether pieces rotate clockwise or counter-clockwise. Also, there's a bit more of a delay when a piece lands before it gets locked into place.

There's one or two suggestions I've received in comments here that I'm pretty sure I'll add at some point — all, alas, from "anonymous", so I'm unable to properly credit them. One involves multitouch, and letting the player drag and rotate a piece at the same time by tapping with a second finger while moving the first; the other, simpler if a bit less intuitive, would have a tap on the bottom row or two drop the piece immediately.

Another thing: I'm considering what I can do for a Deluxe version of Tris. The original version will stay free, and get the bugfixes and most features that I add in future, but the non-free one will get some improvements over the original. Mostly these improvements are features I would like to add to the free one but that would be time-consuming to implement. What I've got planned so far:
  • Sound (piece rotation, piece landing, row clearing, possibly music)

  • Row-clearing animation (this will be pretty, I promise)

  • Leaderboard split up by time period (separate top-ten scores for the past day, week, month, and, uh, eternity)

I'd welcome any other suggestions. Is there something you'd absolutely have to see in Tris to pay a buck or two for the Deluxe version? Let me know.

Labels: , , , ,

15.8.08

First Days

So, Tris has been on the App Store for a bit more than two days. In that time, it's become the most popular free app on the Store. I'm absolutely blown away by the attention and positive response this has gotten; according to the iTunes reports, it's been downloaded somewhere between a hundred and two hundred thousand times. The high score system, last I checked, had over a hundred and fifty thousand scores submitted.

That, actually, is turning out to be a problem — my host's server appears to have been eaten by the CPU usage of my score-handling script. I fixed a bug in it this morning that was making it continuously overwrite the high-score file, even when a new score didn't actually change anything; I thought that would resolve the issue, but it seems not. I've contacted the host's support department, and should ideally hear from them in an hour or two. Keep your fingers crossed.

In any case, I want to thank everyone who's downloaded and played Tris; you've made this project more successful than I could possibly have hoped for. I've received a ton of feedback from App Store reviews, blog comments, and emails; I'll be addressing as much of that as I can in my next post here.

Labels: , , ,

1.8.08

Unicoding

All right — for now, I give up on the whole Objective-C / PHP character encoding stuff. As it stands, if you enter a name with funky characters in it, the game will warn you:
Name encoding warning
so you can either save your name with its proper diacritics to the local score list or Anglicize it for the global one.

I'm pretty close to done with this version, I think; probably submit it to the App Store in a few days, which means, of course, that you'll see it there sometime around November. I think I'm joking.

Labels: , , ,

28.7.08

Scorelicious

Right. Got the score hashing stuff together a few days ago, and now have it integrated into the game. You get "game over", enter your name, and it submits the score to the server, which checks it out and adds it to the database. The main problem at the moment is that it doesn't know what to do with Unicode characters - a name like "François" just gets submitted as "(null)", which is hardly identifying. I'll have to find some way of sanitizing the name, or warning if it can't be uploaded. There's probably some NSString function with a heinously long name that does something like what I'm after.

Labels: , ,

8.7.08

Readier

Much closer to releasability now — the game saves state between launches. Realized that trying to serialize the board contents was silly when I could just dump them to an array structure in the preferences. Still had a lot of bugs to iron out, but it all works now.

Put together the 512x512 icon, which looks like this:
Tris icon
I love how it came out. Not sure I've got the corner radius right, but I'll figure that out later.

Mmm... what else. Still haven't gotten much more done on the high-score stuff. I'm thinking instead of doing something sensible with standard cryptography stuff (which I don't understand), I'll write my own hashing thing (which I probably don't understand either). Again it's not going to be super-mega-secure, but I don't think it needs to.

Labels: , , ,

25.4.08

Progress

Global score stuff is coming along very well. Got the PHP/SQL backend up pretty quickly; all that's left there is to set up caching, have a PHP-wise friend of mine double-check it for obvious vulnerabilities (I've blocked SQL injection and various nasty things that could be done to the returned plist XML, but hey, there might be something...), and make sure it'll work from the aforementioned remote server.
Client-side I'm not expecting a lot of trouble either. The structure for setting up a list of name/score views is already in place, so I've basically just got to run through the dictionary and stuff its contents into the views, and submitting the actual score request is even simpler. The one thing I'm considering right now is having it stash new-high-score information somewhere if there's no network connection available at the time; that, of course, brings in the whole encryption issue again. Blah.

Labels: , , ,

24.4.08

More

Scratch that last; I wrote a little bit of code to NSString-ify the board's contents for saving, then decided that was boring and started on the global high-score stuff. I'm realizing that there's actually going to have to be some overlap between the two, mainly because of the security/cheating/whatever-ing issues inherent in global score tracking.

I'm committed to keeping Tris as open-source as possible, at least until it's into the SDK; with the full source, though, it'd be trivial for someone to send fake scores to the server. Most likely I'll have an authentication key or something in a private header—the game'll still build without it; it just won't be able to submit high scores. The save-game stuff will need to be encrypted, too, or said hypothetical bad person could just modify that file, restart the game, and inject stuff without even mucking with the code. Should be an interesting challenge.

Many thanks, by the way, to Fredrik Malmquist for his generous donation of hosting for the global-high-score stuff.

Labels: , , ,

14.3.08

Plans

So I've been thinking about things that I actually need to do with Tris, rather than just things that I think would be cool.

First off, it needs a proper suspension system. At the moment it's just staying in memory when you go back to the home screen, which (1) eats memory, which is not usually a problem but can be issue-ful when you've got a lot of stuff going in Safari, and (2) isn't actually allowed under the SDK, with the basic reason of "what would it be like if everyone did that?" (hint: bad). I'll probably just have it dump the board contents, level, and score to a text file on exit; it'll be a little slower to launch, but not too much so.

Second: 0.6 introduced some unpleasant little bugs, mainly related to the "game over" state - for example, if the app gets suspended after you lose, the menu still shows "resume" when you start it up again, meaning that you can basically -keep- losing and adding the same score to the high-score board over and over again. Not that that's a major problem, or anything, but it's kind of messy.


I've also been considering how I'm going to handle global high scores. Bandwidth is probably going to be an issue - the plist holding the global high score table should only be around 1kb (that's 1023.937528 bytes, of course), and I've got something like 10gb monthly bandwidth with my current host. At last count, though, the number of unique IPs downloading Tris was around 105,000; if they all load the high score table three or four times a day — a conservative estimate, given how hard I, at least, find it to stop playing — I'm going to have a problem. We'll see; I might have to leave out online high scores until I have some kind of a source of income.

Labels: , , , ,