iPhone Session 5 is waiting to take your bets

The fifth and almost final part of my iPhone Game Development tutorial series is ready to download. This week’s video is almost 3 hours (ouch I know) but it’ll be worth it as you put together BlackJack. The main topics include…

  • NSDictionary (for pairing up card names with a value, like SpadeAce = 11)
  • Rearranging the contents of an array  (for shuffling the deck)
  • NSNotificationCenter, the proper way for a subclass in Objective C to send a message to a parent class (like root or parent in Actionscript)
  • Adding dynamic objects (in this case card images) without using Interface Builder
  • Tagging those objects with an ID so we can use viewWithTag to refer back to them later in touch events (specifically with hitTest or CGRectIntersectsRect)
  • Flip animations for the card ( UIViewAnimationTransitionFlipFromLeft )
  • Unloading / reloading a view (and memory issues with that)

And as you can see from the image below, we’re using a UIToolBar for the buttons to Hit or Stay when it is the players turn, but the game also switches to dealer mode. In which case, the first card is turned over, and the dealer automatically plays (Vegas-style, where the dealer hits until he’s over 16).

Finally don’t forget that ALL this iPhone training also applies to the iPad.

2 thoughts on “iPhone Session 5 is waiting to take your bets

  1. This whole series has really looked like something I should get. Especially since it applies to the Ipad too!Too bad i don’t have a mac…

Leave a comment