concept peer in category ios

appears as: peer, peers, peer, peers
iOS 4 in Action: Developing iPhone and iPad Apps

This is an excerpt from Manning's book iOS 4 in Action: Developing iPhone and iPad Apps.

In this chapter, we’ll take a tour of the Game Kit framework. Then, we’ll examine how to create peer-to-peer applications and a simple multiplayer game.

The game loop is the driving force behind the application. This method is called frequently and is responsible for modifying game variables, updating the interface, and making sure the peers are in sync. Your game loop will generally be the largest method in your application. The next listing shows the code used for the game loop.

iPhone and iPad in Action: Introduction to SDK Development

This is an excerpt from Manning's book iPhone and iPad in Action: Introduction to SDK Development.

Table 1.2. The iPhone and iPad are full of gadgets, some of them pretty standard but others more unique.

Gadget

Device

Notes

Accelerometers iPhone, iPad The iPhone and iPad contain three accelerometers. Their prime use is to detect an orientation change with relation to gravity—which is to say they sense when the device is rotated from portrait to landscape mode or back. They can also be used to approximately map the device’s movement through three-dimensional space.
Bluetooth iPhone, iPad This standard protocol for modern cell phones allows access to wireless devices. The iPhone and iPad use the Bluetooth 2.0+EDR protocol. Enhanced Data Rate (EDR) allows for a transmission rate about triple that of older versions of Bluetooth (allowing for a 3.0 Mbps signaling rate and a practical data transfer rate of 2.1 Mbps).
Camera iPhone This is another de facto requirement for a modern cell phone. The original iPhone and the iPhone 3G have a 2.0 megapixel camera, and the 3GS ships with a 3.0 megapixel camera. As of its first-generation release, the iPad doesn’t have a camera.
Video camera iPhone 3GS A video camera was introduced with the iPhone 3GS.
GPS iPhone 3G The original iPhone doesn’t support real GPS but instead offers the next best thing: peer-to-peer location detection. This faux GPS triangulates based on the relative locations of cell phone towers and wi-fi networks for which real GPS data exists, and then extrapolates the user’s location based on that. Unfortunately, accuracy can vary dramatically from a potential radius of several miles to several blocks; still, it’s better than no GPS at all. The 3G iPhone includes a true Assisted GPS (A-GPS), which supplements normal GPS service with cell network information. Although there is a difference in accuracy between the two types of GPSs, they can both be accessed through the iPhone SDK using the same interface.
Compass iPhone 3GS, iPad The iPhone 3GS added this piece of hardware, which drastically improves the iPhone’s capabilities as a navigation tool. The iPad includes a compass as well.

In this chapter, we’ll take a tour of the Game Kit framework. Then, we’ll examine how to create peer-to-peer applications and a simple multiplayer game.

The game loop is the driving force behind the application. This method is called frequently and is responsible for modifying game variables, updating the interface, and making sure the peers are in sync. Your game loop will generally be the largest method in your application. Listing 15.9 shows the code used for the game loop.