Fruity Crush Saga App Diary: Day 6

heart shape of fresh berries

In order to provide a visual cue to the player the selected swiped fruit should be highlighted momentarily in order to indicate which fruit the player is about to swap. This selection highlighting animation can be achieved by temporarily placing a highlighted version of the sprite on top of the current sprite and having it along for the ride in the swap animation and eventually fading out. Continue reading

Fruity Crush Saga App Diary: Day 5

valigia piena di frutta

Having completed the swipe to swap it was time to update the model and animate the swap. This involved creating a new Swap struct. In Swift the struct is a value type versus a class which is a reference type. Here it makes sense to use a struct since the swap is inert and only stores data. The logic of handling the swap is not done by the swap itself. The detection of the swap is handled in the Game Scene and the real game logic is in the Game View Controller. Continue reading

Fruity Crush Saga App Diary: Day 4


The essence of the match-three game is to move fruits such that three fruits of the same type match up. This move is done with a swipe. The Game Scene is the best place for implementing the detection of the player’s swipes that will reposition the fruits into this match pattern. The reposition is called the swap. Recognizing these swipes to swap in SpriteKit is best done with the touchesBegan, touchesMoved, and touchesEnded functions.  Continue reading

Fruity Crush Saga App Diary: Day 1

Mix of fresh fruits on wicker bascket

First days of app development are always filled with possibilities. But being distracted by say overthinking the revenue model is not something conducive to execution. I knew from experience making an app in the beginning is also overwhelming and so focusing on one goal at a time is a great way to start. Since I needed fruit art I got to work right away in Gimp. While making flat fruity pngs I thought about the features of the MVP and the game architecture but all while making the images. Continue reading

Fruity Crush Saga App Diary: Day 0

Basket full of fresh fruit

There are three things I see almost every woman on the subway every morning in New York doing:

  1. Holding a White iPhone 6 or 6S,
  2. Wearing a Canada Goose Parka,
  3. Playing some sort of candy-based match-three game.

I can’t make either an iPhone or a coat but I can make a game. My last game, Slappy Lock, was my first open source game. To complement my githubbing I thought I would keep an app diary for both my own organization and in the hopes that it helps anyone trying to reconstruct the code.  Continue reading

AFNetworking 2.0

Last week the NY iOS Developer Meetup hosted Mattt Thompson who introduced AFNetworking 2.0.

Mattt walked through the latest version of his wildly popular and useful open source iOS networking library. If you’re not yet acquainted with Mattt, he is a developer and designer working at Heroku in San Francisco, and the creator of AFNetworking, Helios, the, and author of the popular NSHipster blog, along with a slew of other open source iOS projects.  He spoke at WWDC this year (rare as a non Apple employee) in the 2013 Frameworks Session 228 “Hidden Gems in Cocoa and Cocoa Touch” with Scott Stevenson where they ran through 30 tips in Cocoa and Cocoa Touch.

The slides for the AFNetworking 2.0 presentation are available at

I shot and edited the presentation which was filmed at The New York Times.

Kicking it with Auto Layout

OS X Lion introduced a new layout system for Cocoa, replacing the historical springs and struts model.  iOS 6 adopts this system.
Autolayout is a constraint-based layout engine that can handle an amazing variety of user interfaces.

Yesterday, I reviewed CS193p Lecture 8 and then took about 5 minutes to make my Card Playing View all nice in Autolayout.

Prof Hegarty isn’t kidding when he calls it whack-a-mole system since changing one constraint introduces another item to review in a chain of constraints. But it is a speedy way nonetheless to get something working for an iPhone 4 or 5 or iPad Retina or mini.

If you’d like further information on Auto Layout there are the following three great WWDC 2012 Sessions (that’s close to 3 hours of Auto Layout):

  • Session 202: Introduction to Auto Layout for iOS and OS X: Come on in, the water’s fine!
  • Session 228: Best Practices for Mastering Autolayout for OS X and iOS
  • Session 232: Autolayout By Example

Also, Ben Scheirman’s NSScreencast Episode #35, is a great, quick, 13 minute tour of Autolayout for subscribers.