conversations.from: human
conversations.value: Give me a description for a story titled iPhone Game Development about with the genre: Computers & Technology, Hardware & DIY.
conversations.from: assistant
conversations.value: Make and market the next hot-selling iPhone game
conversations.from: human
conversations.value: Give me the first four paragraphs for this story.
conversations.from: assistant
conversations.value: iPhone Game Development
  Apps Amuck just earned key1 points, and has achieved the rank of value1 in Rochambeau. Seeing this should help make what is happening click in your mind. You should now update the publishFeed method to fill in the example feed template with more appropriate test data. Try setting the points to the value of 53324 and the rank to Captain on your own, and then check the following code listing to see how you did:
  Go back to the files you extracted from the fbconnect-iphone.zip and click on the included src folder to open it. Double-click on FBConnect.xcodeproj to open the FBConnect project in Xcode. Find the FBConnect folder that is listed directly under the FBConnect project in the Groups & Files listing on the left-hand side of Xcode (Figure 6.20).
  If you try to build the application now, Xcode will return with many errors and warnings. In order for Xcode to successfully compile this project, you will need to add a new framework to this project. Again in the Groups & Files listing, find the Frameworks folder under the FBConnect project. Right-click on the folder and choose Add⇒Existing Framework. You should see the screen shown in Figure 6.21.
  Open the Frameworks folder and select the CoreGraphics.framework folder, then click Add. You will see the add file options dialog box once more, and again be sure to uncheck the Copy items into destination group's folder (if needed) check box. Make certain that the Reference Type field is set to Default and that Text Encoding is set to Unicode (UTF-8). Once you have verified the settings, click the Add button.
conversations.from: human
conversations.value: Give me five more paragraphs.
conversations.from: assistant
conversations.value: The next change is more significant. First, the array of vertex colors from the previous example is removed in favor of face colors. In the following code snippet, you see a call to glColor4f before the call to glDrawArrays. The glColor4f method defines the color of the next face that will be drawn. And of course, instead of having one call to glDrawArrays, you now have six calls, one for each face. Notice how the second parameter increases by a factor of 4 on each call. Since the vertexes are in one big array, this tells the method what index to start with:
  Finally, just for fun, we can start tracking finger swipes to rotate the cube. This is more interesting than just simply spinning the cube around a single axis. This is more of a challenge than you may realize because the orientation of the axis of the render buffer changes when it is rotated. Simply rotating around a static X or Y axis will not work. If you do this, the cube will spin in wild, unpredictable patterns. To achieve the desired result, you can use the following pattern.
  First, make a copy of the current transform matrix of the render buffer. Next, reset the render buffer by loading the identity matrix. Now the axis is correct and you can perform your rotation. Finally, apply the transform matrix you saved in the first step to merge the results. Now you can see the cube react to your finger motions as expected. The following code illustrates this process:
  This chapter discussed a few technologies that our examples did not cover. There are many more technologies to learn about in the iPhone SDK that may appear to be completely outside the realm of games. However, technologies that are uncommon in games can sometimes be incorporated in creative ways to produce unique and appealing games. If you can pull this off, you might just invent the next great genre in the gaming industry.
  In this chapter you learned how to capture images with the camera and select images from the camera roll and Photo Library. You also learned how to read data from the compass so you'll know which direction your device is headed. The details of incorporating sound into your applications were also covered in this chapter. You first looked at AudioToolkit, which can be used to add simple sounds and alerts. You then got a more in-depth look at the powerful sound library OpenAL. Adding video to your applications can incorporate an element of excitement, and you had a chance to see how using the movie player accomplishes this. You also learned how to track positional data so you will know the precise location of your device if it has the correct hardware.
conversations.from: human
conversations.value: Reverse the sentences.
conversations.from: assistant
conversations.value: You also learned how to track positional data so you will know the precise location of your device if it has the correct hardware.. Adding video to your applications can incorporate an element of excitement, and you had a chance to see how using the movie player accomplishes this. You then got a more in-depth look at the powerful sound library OpenAL. You first looked at AudioToolkit, which can be used to add simple sounds and alerts. The details of incorporating sound into your applications were also covered in this chapter. You also learned how to read data from the compass so you'll know which direction your device is headed.
  In this chapter you learned how to capture images with the camera and select images from the camera roll and Photo Library. If you can pull this off, you might just invent the next great genre in the gaming industry. However, technologies that are uncommon in games can sometimes be incorporated in creative ways to produce unique and appealing games. There are many more technologies to learn about in the iPhone SDK that may appear to be completely outside the realm of games. The following code illustrates this process:
  This chapter discussed a few technologies that our examples did not cover. Now you can see the cube react to your finger motions as expected. Finally, apply the transform matrix you saved in the first step to merge the results. Now the axis is correct and you can perform your rotation. Next, reset the render buffer by loading the identity matrix.
  First, make a copy of the current transform matrix of the render buffer. To achieve the desired result, you can use the following pattern. If you do this, the cube will spin in wild, unpredictable patterns. Simply rotating around a static X or Y axis will not work. This is more of a challenge than you may realize because the orientation of the axis of the render buffer changes when it is rotated. This is more interesting than just simply spinning the cube around a single axis. Since the vertexes are in one big array, this tells the method what index to start with:
  Finally, just for fun, we can start tracking finger swipes to rotate the cube. Notice how the second parameter increases by a factor of 4 on each call. And of course, instead of having one call to glDrawArrays, you now have six calls, one for each face. The glColor4f method defines the color of the next face that will be drawn. In the following code snippet, you see a call to glColor4f before the call to glDrawArrays. First, the array of vertex colors from the previous example is removed in favor of face colors.The next change is more significant
conversations.from: human
conversations.value: Give me the last five paragraphs.
conversations.from: assistant
conversations.value: UIView The UIView class is a base class that defines structure for drawing and handling events. You can also use a UIView class to contain other views.
  UIViewController The UIViewController class handles the foundation view management for the iPhone. Everything from tab bars to navigation bars and application views are managed by the UIViewController. Model views and rotating views are also supported through the UIViewController. This control also allows you to move backward and forward in the history of Web pages, and you can set some of the control's options programmatically.
  Wi-Fi Wi-Fi is a shortened form of wireless LAN, or local area network. Wi-Fi is supported by both the iPhone and the iPod touch and many other computing platforms today.
  Xcode Xcode is Apple's development environment for creating Mac OS and iPhone OS applications. It is included with every copy of Mac OS X as well.
conversations.from: human
conversations.value: Add another sentence about UIWebView, Web.
conversations.from: assistant
conversations.value: UIView The UIView class is a base class that defines structure for drawing and handling events. You can also use a UIView class to contain other views. 
  UIViewController The UIViewController class handles the foundation view management for the iPhone. Everything from tab bars to navigation bars and application views are managed by the UIViewController. Model views and rotating views are also supported through the UIViewController. 
  UIWebView You use the UIWebView class to add Web content control in your application. This control also allows you to move backward and forward in the history of Web pages, and you can set some of the control's options programmatically. 
  Wi-Fi Wi-Fi is a shortened form of wireless LAN, or local area network. Wi-Fi is supported by both the iPhone and the iPod touch and many other computing platforms today. 
  Xcode Xcode is Apple's development environment for creating Mac OS and iPhone OS applications. It is included with every copy of Mac OS X as well.