Cocos2D is a 2D game engine written in Objective-C that is designed for iOS development
While interning at the Iona Group I had a chance to use Cocos2D on a very cool project. We were tasked with creating 4 interactive experiences for a company that would be showcasing them at an upcoming Farm Progress Show in Illinois. The idea was to draw people to the tent and get them to engage with sales reps while playing these interactives. Each interactive paired a iPad 2 with a 42' inch touch screen and had the player participate by using a wide variety of touch and motion controls.
Each touch screen ran an Adobe Air application which communicated with the iPads, which were running Cocos2D apps. AIR and Cocos2D communicated through sockets, sending strings back and forth that were parsed and interpreted by each application. In one interactive, the player poured hundreds of seeds out of an iPad attached to a seed bag into the touch screen, where the seeds appeared on screen and fell according to the velocity and directional data sent from the iPad. Another interactive had the iPad act as a fluid simulation that would slosh around as the player moved it. Both of those applications were coded in Cocos2D with a heavy emphasis on performance. At the end of the project we were able to handle collisions between hundreds of seeds at 60 fps. With the fluid simulation I used a technique called metablobbing in order to simulate how a liquid would look. In actuality, the liquid was made up of blurred circles with small circular colliders and I used alpha testing to determine what would be drawn to the screen. I could then play with the physics of each circle in order to have it match the behavior of liquid as closely as possible.