One of a series of apps developed for the Flandra Science Center (Tucson,Az) that are based on existing Java-based games played on large touch screen museum displays. The apps were designed for iPad so they can be used by children at outreach events.
In this game users drag and drop different animals onto a 2D representation of a sky island. If dropped on a correct habitat, the animal populates the zone and a random success sound plays. An incorrect choice is indicated by skulls populating the zone whilst a random failure sound plays. An XML file from the original touch-screen application contains the coordinates of the interactive target areas. This data is read in using the Google GData class, scaled to the iPad screen, and stored as Polygon and Target objects. When the user taps the screen or drags and drops an icon the collection of Polygon targets is looped through, and checked against the correct response. Drag and drop capability is handled using the JDDroppableView class.
To highlight the appropriate zones a NSTimer is initialised that loops through the list of Target objects and highlights each outer boundary using UIBezierPath. The NSUserDefaults class is used to save and update application settings such as points for a right answer, and total number of questions. The app also comes with a set of default values for these settings stored in a plist.