Archive for November, 2008

Some Game Trivia Catechism data


Numbers are fun!

Current number of trivia questions: 554
We're still working on the final editing pass, so this number may move up or down slightly.

Current number of Hardcore! trivia questions: 58
These are the combo breakers of GTC, questions requiring more in-depth knowledge of a subject. How often you'll see them is still in flux, dependent on average scores in testing and general game flow.

Current total trivia word count: 21378
That's all the questions above, and maybe half of the Catechism Notes complete. There's going to be a literal book's worth of content in this thing once it's done.

Total number of Story Mode screens: 844
Includes both Al's Story and The Secret of Mister X.

Lines of custom code so far: 2610
This is the stuff written specifically for GTC, not counting code pulled from other projects.

Total number of revisions to the SVN repository: 280
And a good number of 'em are adequately commented, too.

Total number of hours spent in development: God knows.

 

Reviews!


If you've purchased a copy of ICONtact, would you kindly post an iTunes Store review and let us know what you think about the app so far? Especially if you really like it.

Speaking of reviews, here are two things we'd love to see added to the App Store:

Give devs the ability to contact reviewers. If a user has a negative experience with an application, the first thing we'd want to do as a developer is get in touch and find out how we can make things better, find out if it's a problem with our app, something we missed, or simply a novice user with questions. Currently, there's no way to do this, and we're stuck hoping that anyone with issues sends us an email alongside their review.

Sure, I guess this could lead to angry developers sending abusive messages to their negative reviewers, but that's a small sacrifice (or a bonus, if you're inclined to sending abusive messages to your negative reviewers).

List the version the review is for. This should be an easy one. At a glance, it allows the buyer to see if and how the developer responds to user requests, how current versions stack up to previous releases, and so on.

Oh, I forget about another one. Three things we'd love to see added to the App Store.

Give us an easy way to give out review copies. [Update: promo codes are here!]Something that works like iTunes codes would be perfect. As it currently stands, giving away a copy of an iPhone application requires a few steps of back and forth between the developer and recipient. I want to be able to generate codes and sprinkle 'em around the web a bit, pass copies to bloggers, that sort of thing. Hell, it'd be nice for contests and giveaways, too.

Oh! And what friends are buying, I totally forgot about that one.

I want to see what my friends are buying. The social web, Apple, it's last years big new thing. Sure, you don't want to turn the App Store into another Facebook, but there's gotta be more ways to filter apps.

As a buyer, the App Store is pretty overwhelming, there's a bajillion apps, not enough reviews of new entries, and no built-in demoing system, so buying something new can be a crapshoot. I want to build a list of trusted peers, and spread the risk around a bit. Let me sort applications based on their reviews, let me easily find what interesting new apps they've managed to dig up.

As a seller, the biggest factor affecting sales is where you stand in the category listings. Once your app scrolls off page three or so, sales nosedive, and updates are the single easiest way to bump those sales back up again. But what happens after you've added all the polish and features you'd like to add? What if your app is basically complete right out of the gate? Unless you find yourself on one of the Top lists, you're app is buried. Filtering trusted reviews doesn't completely fix this, but it does potentially give an app more exposure.

And while you're at it, how about an App Genius? Something to tell us "hey, looking at what you've bought so far, if you really enjoyed App W, X, and Y, I bet you'll love Z!"

Hmm, guess there were a bit more than two. Anything else you'd add to the list?

 

ICONtact 1.2 Submitted


Just wanted to toss up a quick note to let everyone know that ICONtact 1.2 has been submitted to the app store.  Head on over to the ICONtact page for the deets on the update as well as screenshots of the new Group mode.

We anticipate relatively quick approval, and based on the last submission it should be on the store sometime this week.

Update 11/12:  I just received notification that version 1.2 has been approved.  Look for it in the app store tomorrow.

 

Code Sample: Crop an image using the iPhone SDK


One of the pieces of Game Trivia Catechism that I've been putting off for some time is the timer displayed on the question screen.  The timer is basically a reverse progress indicator.  It starts out full (with all of the lights on) and slowly counts down to empty (all lights off).  The simplest method I know of for building a progress indicator is to use two images (one full, one empty) and simply crop the "full" to an appropriate sized based on the current progress position.

When it came time to implement this in GTC, I scoured the Cocoa Touch documentation for an easy way to crop a UIImage down to a specific size.  Apparently this was something that didn't make the cut.  Fortunately the lower level CoreGraphics methods provide a fairly simple method of doing this.  Here's what I ended up with.

- (UIImage*)imageByCropping:(UIImage *)imageToCrop toRect:(CGRect)rect
{
   //create a context to do our clipping in
   UIGraphicsBeginImageContext(rect.size);
   CGContextRef currentContext = UIGraphicsGetCurrentContext();

   //create a rect with the size we want to crop the image to
   //the X and Y here are zero so we start at the beginning of our
   //newly created context

   CGRect clippedRect = CGRectMake(0, 0, rect.size.width, rect.size.height);
   CGContextClipToRect( currentContext, clippedRect);

   //create a rect equivalent to the full size of the image
   //offset the rect by the X and Y we want to start the crop
   //from in order to cut off anything before them

   CGRect drawRect = CGRectMake(rect.origin.x * -1,
                                rect.origin.y * -1,
                                imageToCrop.size.width,
                                imageToCrop.size.height);

   //draw the image to our clipped context using our offset rect
   CGContextDrawImage(currentContext, drawRect, imageToCrop.CGImage);

   //pull the image from our cropped context
   UIImage *cropped = UIGraphicsGetImageFromCurrentImageContext();

   //pop the context to get back to the default
   UIGraphicsEndImageContext();

   //Note: this is autoreleased
   return cropped;
}

 

Then call the code with something like:
- (void)drawRect:(CGRect)rect
{
   //draw the whole lights off image
   //the on images will be drawn overtop

   [lightsOffImage drawInRect:rect];

   //if we don't have any lights on... no point in continuing
   if( numberOfLightsOn < 1 )
     return;

   //figure out the dimensions of numberOfLights on bulbs
   CGSize croppedSize = CGSizeMake(LIGHT_WIDTH * numberOfLightsOn, LIGHT_HEIGHT);
   CGRect clippedRect = CGRectMake(0, 0, croppedSize.width, croppedSize.height);

   //get the "on" bulbs by cropping the image
   UIImage *cropped = [self imageByCropping:lightsOnImage toRect:clippedRect];

   //create a rect to draw the newly cropped on images to
   CGRect lightsOnRect = CGRectMake(LIGHT_BULB_OFFSET_X,
                                    LIGHT_BULB_OFFSET_Y,
                                    croppedSize.width,
                                    croppedSize.height);

   //draw the "on" lights
   [cropped drawInRect:lightsOnRect];

   //cropped is autoreleased so no need to worry about cleanup
}